Skip to content

Commit

Permalink
[Measure] Remove unused properties from measure preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
hlorus committed May 3, 2024
1 parent ede7243 commit 5ed7f2f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 87 deletions.
4 changes: 0 additions & 4 deletions src/Mod/Measure/Gui/DlgPrefsMeasureAppearanceImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ DlgPrefsMeasureAppearanceImp::~DlgPrefsMeasureAppearanceImp()

void DlgPrefsMeasureAppearanceImp::saveSettings()
{
ui->cbMirror->onSave();
ui->dsbDistFactor->onSave();
ui->sbFontSize->onSave();
ui->cbText->onSave();
ui->cbLine->onSave();
Expand All @@ -54,8 +52,6 @@ void DlgPrefsMeasureAppearanceImp::loadSettings()
ui->cbText->onRestore();
ui->cbBackground->onRestore();
ui->cbLine->onRestore();
ui->cbMirror->onRestore();
ui->dsbDistFactor->onRestore();
}

/**
Expand Down
120 changes: 37 additions & 83 deletions src/Mod/Measure/Gui/DlgPrefsMeasureAppearanceImp.ui
Original file line number Diff line number Diff line change
Expand Up @@ -52,35 +52,18 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QGridLayout" name="gridLayout_5" columnstretch="1,1">
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<layout class="QGridLayout" name="gridLayout_5" columnstretch="2,1">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Distance Factor</string>
<string>Text size</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Text color</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Gui::PrefColorButton" name="cbText">
<property name="color">
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</property>
<property name="prefEntry" stdset="0">
<cstring>DefaultTextColor</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Measure/Appearance</cstring>
<string>Line color</string>
</property>
</widget>
</item>
Expand All @@ -103,90 +86,71 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Gui::PrefColorButton" name="cbLine">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="color">
<item row="3" column="1">
<widget class="Gui::PrefColorButton" name="cbBackground">
<property name="color" stdset="0">
<color>
<red>255</red>
<green>255</green>
<blue>255</blue>
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</property>
<property name="prefEntry" stdset="0">
<cstring>DefaultLineColor</cstring>
<cstring>DefaultTextBackgroundColor</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Measure/Appearance</cstring>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<item row="3" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Text size</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="Gui::PrefDoubleSpinBox" name="dsbDistFactor">
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="value">
<double>1.000000000000000</double>
</property>
<property name="prefEntry" stdset="0">
<cstring>DefaultDistFactor</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Measure/Appearance</cstring>
<string>Background color</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Line color</string>
<item row="2" column="1">
<widget class="Gui::PrefColorButton" name="cbLine">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="Gui::PrefCheckBox" name="cbMirror">
<property name="text">
<string>Mirror</string>
<property name="color" stdset="0">
<color>
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</property>
<property name="prefEntry" stdset="0">
<cstring>DefaultMirror</cstring>
<cstring>DefaultLineColor</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Measure/Appearance</cstring>
</property>
</widget>
</item>
<item row="5" column="0">
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Background color</string>
<string>Text color</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="Gui::PrefColorButton" name="cbBackground">
<property name="color">
<item row="1" column="1">
<widget class="Gui::PrefColorButton" name="cbText">
<property name="color" stdset="0">
<color>
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</property>
<property name="prefEntry" stdset="0">
<cstring>DefaultTextBackgroundColor</cstring>
<cstring>DefaultTextColor</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Measure/Appearance</cstring>
Expand Down Expand Up @@ -229,16 +193,6 @@
<extends>Gui::ColorButton</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
<customwidget>
<class>Gui::PrefCheckBox</class>
<extends>QCheckBox</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
<customwidget>
<class>Gui::PrefDoubleSpinBox</class>
<extends>QDoubleSpinBox</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="Resources/Measure.qrc"/>
Expand Down

0 comments on commit 5ed7f2f

Please sign in to comment.