mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-06 01:12:33 +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 {
|
} else {
|
||||||
ui->descriptionText->setText(defaultTextEdit);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>970</width>
|
<width>970</width>
|
||||||
<height>750</height>
|
<height>820</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -67,8 +67,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>932</width>
|
<width>946</width>
|
||||||
<height>593</height>
|
<height>605</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="generalTabVLayout" stretch="0">
|
<layout class="QVBoxLayout" name="generalTabVLayout" stretch="0">
|
||||||
@ -638,7 +638,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>946</width>
|
||||||
<height>585</height>
|
<height>595</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0">
|
<layout class="QVBoxLayout" name="inputTabVLayout" stretch="0,0">
|
||||||
@ -922,7 +922,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>946</width>
|
||||||
<height>585</height>
|
<height>595</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="graphicsTabVLayout" stretch="0,0">
|
<layout class="QVBoxLayout" name="graphicsTabVLayout" stretch="0,0">
|
||||||
@ -1176,7 +1176,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>946</width>
|
||||||
<height>585</height>
|
<height>595</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="pathsTabLayout" stretch="0">
|
<layout class="QVBoxLayout" name="pathsTabLayout" stretch="0">
|
||||||
@ -1233,7 +1233,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>946</width>
|
<width>946</width>
|
||||||
<height>585</height>
|
<height>595</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,1">
|
<layout class="QVBoxLayout" name="debugTabVLayout" stretch="0,1">
|
||||||
@ -1404,10 +1404,16 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="descriptionText">
|
<widget class="QTextEdit" name="descriptionText">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>70</height>
|
<height>120</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
|
Loading…
Reference in New Issue
Block a user