Skip to content

Commit

Permalink
Merge pull request #12429 from ronso0/pref-layout-fixes
Browse files Browse the repository at this point in the history
Preferences: simplification & layout fixes
  • Loading branch information
daschuer authored Dec 14, 2023
2 parents 993deb9 + 814c0f9 commit 5b13308
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 203 deletions.
195 changes: 96 additions & 99 deletions src/preferences/dialog/dlgprefcolorsdlg.ui
Original file line number Diff line number Diff line change
Expand Up @@ -19,105 +19,102 @@
<property name="windowTitle">
<string>Color Preferences</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBoxPalettes">
<property name="title">
<string>Colors</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="0">
<widget class="QLabel" name="labelHotcueDefaultColor">
<property name="text">
<string>Hotcue default color</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="pushButtonReplaceCueColor">
<property name="text">
<string>Replace…</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButtonEditHotcuePalette">
<property name="text">
<string>Edit…</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="comboBoxHotcueDefaultColor"/>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="pushButtonEditTrackPalette">
<property name="text">
<string>Edit…</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="comboBoxHotcueColors">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelHotcueColors">
<property name="text">
<string>Hotcue palette</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelTrackColors">
<property name="text">
<string>Track palette</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxTrackColors">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="labelLoopDefaultColor">
<property name="text">
<string>Loop default color</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="comboBoxLoopDefaultColor"/>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
<layout class="QGridLayout" name="gridLayout">

<item row="0" column="0">
<widget class="QLabel" name="labelTrackColors">
<property name="text">
<string>Track palette</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBoxTrackColors">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="pushButtonEditTrackPalette">
<property name="text">
<string>Edit…</string>
</property>
</widget>
</item>

<item row="1" column="0">
<widget class="QLabel" name="labelHotcueColors">
<property name="text">
<string>Hotcue palette</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="comboBoxHotcueColors">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pushButtonEditHotcuePalette">
<property name="text">
<string>Edit…</string>
</property>
</widget>
</item>

<item row="2" column="0">
<widget class="QLabel" name="labelHotcueDefaultColor">
<property name="text">
<string>Hotcue default color</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="comboBoxHotcueDefaultColor"/>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="pushButtonReplaceCueColor">
<property name="text">
<string>Replace…</string>
</property>
</widget>
</item>

<item row="3" column="0">
<widget class="QLabel" name="labelLoopDefaultColor">
<property name="text">
<string>Loop default color</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="comboBoxLoopDefaultColor"/>
</item>

<item row="4" column="0" colspan="2">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>

</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<tabstops>
Expand Down
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
Loading

0 comments on commit 5b13308

Please sign in to comment.