Custom Layout options now uses X, Y, Width Height

Previously used Left, Top, Right, Bottom positions
This commit is contained in:
OpenSauce04 2024-05-26 21:10:57 +01:00 committed by OpenSauce
parent 9665f95306
commit e74d7c65fb
2 changed files with 32 additions and 28 deletions

View File

@ -379,12 +379,16 @@ FramebufferLayout CustomFrameLayout(u32 width, u32 height, bool is_swapped) {
Common::Rectangle<u32> top_screen{Settings::values.custom_top_left.GetValue(), Common::Rectangle<u32> top_screen{Settings::values.custom_top_left.GetValue(),
Settings::values.custom_top_top.GetValue(), Settings::values.custom_top_top.GetValue(),
Settings::values.custom_top_right.GetValue(), (u32)(Settings::values.custom_top_left.GetValue() +
Settings::values.custom_top_bottom.GetValue()}; Settings::values.custom_top_right.GetValue()),
(u32)(Settings::values.custom_top_top.GetValue() +
Settings::values.custom_top_bottom.GetValue())};
Common::Rectangle<u32> bot_screen{Settings::values.custom_bottom_left.GetValue(), Common::Rectangle<u32> bot_screen{Settings::values.custom_bottom_left.GetValue(),
Settings::values.custom_bottom_top.GetValue(), Settings::values.custom_bottom_top.GetValue(),
Settings::values.custom_bottom_right.GetValue(), (u32)(Settings::values.custom_bottom_left.GetValue() +
Settings::values.custom_bottom_bottom.GetValue()}; Settings::values.custom_bottom_right.GetValue()),
(u32)(Settings::values.custom_bottom_top.GetValue() +
Settings::values.custom_bottom_bottom.GetValue())};
if (is_swapped) { if (is_swapped) {
res.top_screen = bot_screen; res.top_screen = bot_screen;

View File

@ -197,14 +197,14 @@
<string>Top Screen</string> <string>Top Screen</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0"> <item row="0" column="0">
<widget class="QLabel" name="lb_top_left"> <widget class="QLabel" name="lb_top_left">
<property name="text"> <property name="text">
<string>Left</string> <string>X Position</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="0" column="1">
<widget class="QSpinBox" name="custom_top_left"> <widget class="QSpinBox" name="custom_top_left">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
@ -214,14 +214,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="1" column="0">
<widget class="QLabel" name="lb_top_top"> <widget class="QLabel" name="lb_top_top">
<property name="text"> <property name="text">
<string>Top</string> <string>Y Position</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="1" column="1">
<widget class="QSpinBox" name="custom_top_top"> <widget class="QSpinBox" name="custom_top_top">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
@ -231,14 +231,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="2" column="0">
<widget class="QLabel" name="lb_top_right"> <widget class="QLabel" name="lb_top_right">
<property name="text"> <property name="text">
<string>Right</string> <string>Width</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="2" column="1">
<widget class="QSpinBox" name="custom_top_right"> <widget class="QSpinBox" name="custom_top_right">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
@ -248,14 +248,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="3" column="0">
<widget class="QLabel" name="lb_top_bottom"> <widget class="QLabel" name="lb_top_bottom">
<property name="text"> <property name="text">
<string>Bottom</string> <string>Height</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="3" column="1">
<widget class="QSpinBox" name="custom_top_bottom"> <widget class="QSpinBox" name="custom_top_bottom">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
@ -280,14 +280,14 @@
<string>Bottom Screen</string> <string>Bottom Screen</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="2" column="0"> <item row="0" column="0">
<widget class="QLabel" name="lb_bottom_left"> <widget class="QLabel" name="lb_bottom_left">
<property name="text"> <property name="text">
<string>Left</string> <string>X Position</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="0" column="1">
<widget class="QSpinBox" name="custom_bottom_left"> <widget class="QSpinBox" name="custom_bottom_left">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
@ -297,14 +297,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="1" column="0">
<widget class="QLabel" name="lb_bottom_top"> <widget class="QLabel" name="lb_bottom_top">
<property name="text"> <property name="text">
<string>Top</string> <string>Y Position</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="1" column="1">
<widget class="QSpinBox" name="custom_bottom_top"> <widget class="QSpinBox" name="custom_bottom_top">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
@ -314,14 +314,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="2" column="0">
<widget class="QLabel" name="lb_bottom_right"> <widget class="QLabel" name="lb_bottom_right">
<property name="text"> <property name="text">
<string>Right</string> <string>Width</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="2" column="1">
<widget class="QSpinBox" name="custom_bottom_right"> <widget class="QSpinBox" name="custom_bottom_right">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
@ -331,14 +331,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="3" column="0">
<widget class="QLabel" name="lb_bottom_bottom"> <widget class="QLabel" name="lb_bottom_bottom">
<property name="text"> <property name="text">
<string>Bottom</string> <string>Height</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="3" column="1">
<widget class="QSpinBox" name="custom_bottom_bottom"> <widget class="QSpinBox" name="custom_bottom_bottom">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>