mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-05 17:02:40 +00:00
Make size of text box in 'Settings' window fixed
This fixes the window resizing with long descriptions for options, which causes problems with Gamescope and as a result Steam Deck, as well as when maximizing the Settings window on normal desktops
This commit is contained in:
parent
2fb410b548
commit
0c78d0c1c7
@ -510,22 +510,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;
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>970</width>
|
||||
<height>750</height>
|
||||
<height>820</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -67,8 +67,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>932</width>
|
||||
<height>593</height>
|
||||
<width>946</width>
|
||||
<height>605</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="generalTabVLayout" stretch="0">
|
||||
@ -638,7 +638,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>946</width>
|
||||
<height>585</height>
|
||||
<height>595</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0">
|
||||
@ -922,7 +922,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>946</width>
|
||||
<height>585</height>
|
||||
<height>595</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="graphicsTabVLayout" stretch="0,0">
|
||||
@ -1176,7 +1176,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>946</width>
|
||||
<height>585</height>
|
||||
<height>595</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="pathsTabLayout" stretch="0">
|
||||
@ -1233,7 +1233,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>946</width>
|
||||
<height>585</height>
|
||||
<height>595</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,1">
|
||||
@ -1404,10 +1404,16 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="descriptionText">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>70</height>
|
||||
<height>120</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
|
Loading…
Reference in New Issue
Block a user