mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-17 17:05:02 +00:00
qt: Improve user experience on Steam Deck and window managers (#2103)
This commit is contained in:
parent
90b04e8cc0
commit
40385e13e7
3 changed files with 310 additions and 341 deletions
|
@ -522,22 +522,6 @@ bool SettingsDialog::eventFilter(QObject* obj, QEvent* event) {
|
|||
} else {
|
||||
ui->descriptionText->setText(defaultTextEdit);
|
||||
}
|
||||
|
||||
// if the text exceeds the size of the box, it will increase the size
|
||||
QRect currentGeometry = this->geometry();
|
||||
int newWidth = currentGeometry.width();
|
||||
|
||||
int documentHeight = ui->descriptionText->document()->size().height();
|
||||
int visibleHeight = ui->descriptionText->viewport()->height();
|
||||
if (documentHeight > visibleHeight) {
|
||||
ui->descriptionText->setMaximumSize(16777215, 110);
|
||||
this->setGeometry(currentGeometry.x(), currentGeometry.y(), newWidth,
|
||||
currentGeometry.height() + 40);
|
||||
} else {
|
||||
ui->descriptionText->setMaximumSize(16777215, 70);
|
||||
this->setGeometry(currentGeometry.x(), currentGeometry.y(), newWidth,
|
||||
initialHeight);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue