Skip to content

Commit

Permalink
Interface preferences: group into Skin and Misc, remove unneeded spacer
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed Dec 12, 2023
1 parent ba3dd4f commit 814c0f9
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 104 deletions.
10 changes: 1 addition & 9 deletions src/preferences/dialog/dlgprefinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ DlgPrefInterface::DlgPrefInterface(
warningLabel->setText(sizeWarningString);

ComboBoxSkinconf->clear();
// align left edge of preview image and skin description with comboboxes
skinPreviewLabel->setStyleSheet("QLabel { margin-left: 4px; }");
skinPreviewLabel->setText("");
skinDescriptionText->setStyleSheet("QLabel { margin-left: 2px; }");
skinDescriptionText->setText("");
skinDescriptionText->hide();

Expand Down Expand Up @@ -169,12 +166,7 @@ DlgPrefInterface::DlgPrefInterface(
this,
&DlgPrefInterface::slotSetScheme);
} else {
lableSkin_2->hide();
labelColorScheme->hide();
ComboBoxSkinconf->hide();
ComboBoxSchemeconf->hide();
skinDescriptionText->hide();
skinPreviewLabel->hide();
groupBoxSkinOptions->hide();
}

// Screensaver mode
Expand Down
131 changes: 36 additions & 95 deletions src/preferences/dialog/dlgprefinterfacedlg.ui
Original file line number Diff line number Diff line change
Expand Up @@ -13,73 +13,30 @@
<property name="windowTitle">
<string>Interface Preferences</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="3" column="0">
<spacer name="verticalSpacer2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<layout class="QVBoxLayout" name="gridLayout_skin">

<item>
<widget class="QGroupBox" name="groupBoxSkinOptions">
<property name="title">
<string/>
<string>Skin</string>
</property>
<layout class="QGridLayout" name="GridLayout1">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="skinLayout">

<item row="0" column="0">
<widget class="QLabel" name="lableSkin_2">
<property name="enabled">
<bool>true</bool>
</property>
<property name="font">
<font/>
</property>
<property name="text">
<string>Skin</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<property name="buddy">
<cstring>ComboBoxSkinconf</cstring>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<item>
<widget class="QComboBox" name="ComboBoxSkinconf">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font/>
<property name="accessibleName">
<string>Skin selector</string>
</property>
</widget>
</item>

<item row="3" column="0" rowspan="2">
<item>
<widget class="QLabel" name="labelColorScheme">
<property name="enabled">
<bool>true</bool>
Expand All @@ -98,24 +55,22 @@
</property>
</widget>
</item>
<item row="3" column="1" rowspan="2" colspan="2">

<item>
<widget class="QComboBox" name="ComboBoxSchemeconf">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font/>
</property>
<property name="toolTip">
<string>Select from different color schemes of a skin if available.</string>
</property>
</widget>
</item>

<item row="5" column="1" colspan="2">
<item>
<widget class="QLabel" name="skinDescriptionText">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
Expand All @@ -135,7 +90,7 @@
</widget>
</item>

<item row="6" column="1" colspan="2">
<item>
<widget class="QLabel" name="warningLabel">
<property name="text">
<string/>
Expand All @@ -146,42 +101,25 @@
</widget>
</item>

<item row="7" column="1">
<item>
<widget class="QLabel" name="skinPreviewLabel">
<property name="text">
<string notr="true">skin preview screenshot goes here</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

<item row="8" column="0">
<spacer name="verticalSpacer1">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBoxMiscOptions">
<property name="title">
<string>Miscellaneous</string>
</property>
<layout class="QGridLayout" name="gridLayout_Misc">

<item row="9" column="0">
<item row="0" column="0">
<widget class="QLabel" name="textLabelLocale">
<property name="text">
<string>Locale</string>
Expand All @@ -191,22 +129,25 @@
</property>
</widget>
</item>
<item row="9" column="1" colspan="2">
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="ComboBoxLocale">
<property name="toolTip">
<string>Locales determine country and language specific settings.</string>
</property>
</widget>
</item>

<item row="10" column="0">
<item row="1" column="0">
<widget class="QLabel" name="labelScaleFactor">
<property name="text">
<string>HiDPI / Retina scaling</string>
</property>
<property name="buddy">
<cstring>spinBoxScaleFactor</cstring>
</property>
</widget>
</item>
<item row="10" column="1">
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QDoubleSpinBox" name="spinBoxScaleFactor">
Expand Down Expand Up @@ -246,7 +187,7 @@
</layout>
</item>

<item row="11" column="0">
<item row="2" column="0">
<widget class="QLabel" name="labelFullscreenOption">
<property name="text">
<string>Full-screen mode</string>
Expand All @@ -256,15 +197,15 @@
</property>
</widget>
</item>
<item row="11" column="1" colspan="2">
<item row="2" column="1" colspan="2">
<widget class="QCheckBox" name="checkBoxStartFullScreen">
<property name="text">
<string>Start in full-screen mode</string>
</property>
</widget>
</item>

<item row="12" column="0">
<item row="3" column="0">
<widget class="QLabel" name="labelTooltips">
<property name="enabled">
<bool>true</bool>
Expand All @@ -283,7 +224,7 @@
</property>
</widget>
</item>
<item row="12" column="1" colspan="2">
<item row="3" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="radioButtonTooltipsOff">
Expand Down Expand Up @@ -318,14 +259,14 @@
</layout>
</item>

<item row="13" column="0">
<item row="4" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Screen saver</string>
</property>
</widget>
</item>
<item row="13" column="1" colspan="2">
<item row="4" column="1" colspan="2">
<widget class="QComboBox" name="comboBoxScreensaver"/>
</item>

Expand Down

0 comments on commit 814c0f9

Please sign in to comment.