Draft: change position of 'Scale multiplier' field in UI

Fixes #16501.
This commit is contained in:
Roy-043
2024-12-04 19:44:35 +01:00
parent a97677ed2f
commit afdf07717d
3 changed files with 183 additions and 131 deletions

View File

@@ -282,9 +282,39 @@
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Texts</string>
<string>Annotations</string>
</property>
<layout class="QGridLayout" name="gridLayout_3" columnstretch="1,0" columnminimumwidth="0,100">
<item row="0" column="0">
<widget class="QLabel" name="label_ScaleMultiplier">
<property name="text">
<string>Scale multiplier</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="ScaleMultiplier">
<property name="toolTip">
<string>The annotation scale multiplier is the inverse of the scale set in the
Annotation scale widget. If the scale is 1:100 the multiplier is 100.</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Texts</string>
</property>
<layout class="QGridLayout" name="gridLayout_4" columnstretch="1,0" columnminimumwidth="0,100">
<item row="0" column="0">
<widget class="QLabel" name="label_TextFont">
<property name="text">
@@ -337,34 +367,13 @@
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_ScaleMultiplier">
<property name="text">
<string>Scale multiplier</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="ScaleMultiplier">
<property name="toolTip">
<string>The annotation scale multiplier is the inverse of the scale set in the
Annotation scale widget. If the scale is 1:100 the multiplier is 100.</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_TextColor">
<property name="text">
<string>Text color</string>
</property>
</widget>
</item>
<item row="4" column="1">
<item row="3" column="1">
<widget class="Gui::ColorButton" name="TextColor">
<property name="toolTip">
<string>The color for texts, dimension texts and label texts</string>
@@ -375,11 +384,11 @@ Annotation scale widget. If the scale is 1:100 the multiplier is 100.</string>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Lines and arrows</string>
</property>
<layout class="QGridLayout" name="gridLayout_4" columnstretch="1,0" columnminimumwidth="0,100">
<layout class="QGridLayout" name="gridLayout_5" columnstretch="1,0" columnminimumwidth="0,100">
<item row="0" column="0">
<widget class="QLabel" name="label_AnnoLineWidth">
<property name="text">
@@ -459,11 +468,11 @@ Annotation scale widget. If the scale is 1:100 the multiplier is 100.</string>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_5">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>Dimensions</string>
</property>
<layout class="QGridLayout" name="gridLayout_5" columnstretch="1,0" columnminimumwidth="0,100">
<layout class="QGridLayout" name="gridLayout_6" columnstretch="1,0" columnminimumwidth="0,100">
<item row="0" column="0">
<widget class="QLabel" name="label_ShowUnit">
<property name="text">

View File

@@ -13,13 +13,13 @@
<property name="windowTitle">
<string>Annotation Styles Editor</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayout_1">
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QGroupBox" name="groupBox_1">
<property name="title">
<string>Style name</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="horizontalLayout_1">
<item>
<widget class="QComboBox" name="comboBoxStyles">
<property name="sizePolicy">
@@ -161,11 +161,55 @@
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Text</string>
<string>Annotations</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayout_1">
<item row="0" column="0">
<widget class="QLabel" name="label">
<widget class="QLabel" name="label_ScaleMultiplier">
<property name="toolTip">
<string>A multiplier factor that affects the size of texts and markers</string>
</property>
<property name="text">
<string>Scale multiplier</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="ScaleMultiplier">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>A multiplier factor that affects the size of texts and markers</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Texts</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_FontName">
<property name="toolTip">
<string>The font to use for texts and dimensions</string>
</property>
@@ -194,7 +238,7 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="label_FontSize">
<property name="toolTip">
<string>The font size in system units</string>
</property>
@@ -214,12 +258,12 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="label_LineSpacing">
<property name="toolTip">
<string>The line spacing for multi-line texts and labels (relative to the font size)</string>
</property>
<property name="text">
<string>Line spacing</string>
<string>Line spacing factor</string>
</property>
</widget>
</item>
@@ -231,7 +275,7 @@
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<widget class="QLabel" name="label_TextColor">
<property name="toolTip">
<string>The color of texts, dimension texts and label texts</string>
</property>
@@ -251,18 +295,18 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Lines and arrows</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<widget class="QLabel" name="label_ShowLine">
<property name="toolTip">
<string>If it is checked it will display the dimension line</string>
</property>
<property name="text">
<string>Show line</string>
<string>Show dimension line</string>
</property>
</widget>
</item>
@@ -283,7 +327,7 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_6">
<widget class="QLabel" name="label_LineWidth">
<property name="toolTip">
<string>The width of the lines</string>
</property>
@@ -303,7 +347,7 @@
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_7">
<widget class="QLabel" name="label_ArrowType">
<property name="toolTip">
<string>The type of arrows or markers to use for dimensions and labels</string>
</property>
@@ -357,7 +401,7 @@
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_8">
<widget class="QLabel" name="label_ArrowSize">
<property name="toolTip">
<string>The size of the arrows or markers in system units</string>
</property>
@@ -377,7 +421,7 @@
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_9">
<widget class="QLabel" name="label_LineColor">
<property name="toolTip">
<string>The color of lines and arrows</string>
</property>
@@ -397,36 +441,13 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Units</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="label_10">
<property name="toolTip">
<string>A multiplier factor that affects the size of texts and markers</string>
</property>
<property name="text">
<string>Scale multiplier</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="ScaleMultiplier">
<property name="toolTip">
<string>A multiplier factor that affects the size of texts and markers</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_11">
<widget class="QLabel" name="label_ShowUnit">
<property name="toolTip">
<string>If it is checked it will show the unit next to the dimension value</string>
</property>
@@ -435,7 +456,7 @@
</property>
</widget>
</item>
<item row="1" column="1">
<item row="0" column="1">
<widget class="QCheckBox" name="ShowUnit">
<property name="toolTip">
<string>If it is checked it will show the unit next to the dimension value</string>
@@ -448,8 +469,8 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_12">
<item row="1" column="0">
<widget class="QLabel" name="label_UnitOverride">
<property name="toolTip">
<string>Specify a valid length unit like mm, m, in, ft, to force displaying the dimension value in this unit</string>
</property>
@@ -458,24 +479,24 @@
</property>
</widget>
</item>
<item row="2" column="1">
<item row="1" column="1">
<widget class="QLineEdit" name="UnitOverride">
<property name="toolTip">
<string>Specify a valid length unit like mm, m, in, ft, to force displaying the dimension value in this unit</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_13">
<item row="2" column="0">
<widget class="QLabel" name="label_Decimals">
<property name="toolTip">
<string>The number of decimals to show for dimension values</string>
</property>
<property name="text">
<string>Decimals</string>
<string>Number of decimals</string>
</property>
</widget>
</item>
<item row="3" column="1">
<item row="2" column="1">
<widget class="QSpinBox" name="Decimals">
<property name="toolTip">
<string>The number of decimals to show for dimension values</string>
@@ -486,18 +507,18 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_5">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>Dimension details</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="label_14">
<widget class="QLabel" name="label_DimOvershoot">
<property name="toolTip">
<string>The distance the dimension line is additionally extended</string>
</property>
<property name="text">
<string>Dimension overshoot</string>
<string>Dimension line overshoot</string>
</property>
</widget>
</item>
@@ -512,12 +533,12 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_15">
<widget class="QLabel" name="label_ExtLines">
<property name="toolTip">
<string>The length of the extension lines</string>
</property>
<property name="text">
<string>Extension lines</string>
<string>Extension line length</string>
</property>
</widget>
</item>
@@ -532,12 +553,12 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_16">
<widget class="QLabel" name="label_ExtOvershoot">
<property name="toolTip">
<string>The distance the extension lines are additionally extended beyond the dimension line</string>
</property>
<property name="text">
<string>Extension overshoot</string>
<string>Extension line overshoot</string>
</property>
</widget>
</item>
@@ -552,7 +573,7 @@
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_17">
<widget class="QLabel" name="label_TextSpacing">
<property name="toolTip">
<string>The distance between the dimension text and the dimension line</string>
</property>

View File

@@ -17,9 +17,61 @@
<item>
<widget class="QGroupBox" name="groupBox_1">
<property name="title">
<string>Texts</string>
<string>Annotations</string>
</property>
<layout class="QGridLayout" name="gridLayout_1">
<item row="0" column="0">
<widget class="QLabel" name="label_DefaultAnnoScaleMultiplier">
<property name="text">
<string>Scale multiplier</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Gui::PrefDoubleSpinBox" name="spinBox_DefaultAnnoScaleMultiplier">
<property name="minimumSize">
<size>
<width>140</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>The default annotation scale multiplier. This is the inverse of the scale set
in the Annotation scale widget. If the scale is 1:100 the multiplier is 100.</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
<property name="value">
<double>1.0</double>
</property>
<property name="prefEntry" stdset="0">
<cstring>DefaultAnnoScaleMultiplier</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Draft</cstring>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Texts</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_textfont">
<property name="text">
@@ -87,7 +139,7 @@ as &quot;Arial&quot;, a style such as &quot;sans&quot;, &quot;serif&quot; or &qu
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_1">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -120,43 +172,13 @@ as &quot;Arial&quot;, a style such as &quot;sans&quot;, &quot;serif&quot; or &qu
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_DefaultAnnoScaleMultiplier">
<property name="text">
<string>Scale multiplier</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="Gui::PrefDoubleSpinBox" name="spinBox_DefaultAnnoScaleMultiplier">
<property name="toolTip">
<string>The default annotation scale multiplier. This is the inverse of the scale set
in the Annotation scale widget. If the scale is 1:100 the multiplier is 100.</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
<property name="value">
<double>1.0</double>
</property>
<property name="prefEntry" stdset="0">
<cstring>DefaultAnnoScaleMultiplier</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Draft</cstring>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_DefaultTextColor">
<property name="text">
<string>Text color</string>
</property>
</widget>
</item>
<item row="4" column="1">
<item row="3" column="1">
<widget class="Gui::PrefColorButton" name="colorButton_DefaultTextColor">
<property name="toolTip">
<string>The default color for texts, dimension texts and label texts</string>
@@ -180,11 +202,11 @@ in the Annotation scale widget. If the scale is 1:100 the multiplier is 100.</st
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Lines and arrows</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0" colspan="3">
<widget class="Gui::PrefCheckBox" name="checkBox_DimShowLine">
<property name="toolTip">
@@ -234,7 +256,7 @@ in the Annotation scale widget. If the scale is 1:100 the multiplier is 100.</st
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -354,11 +376,11 @@ in the Annotation scale widget. If the scale is 1:100 the multiplier is 100.</st
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Units</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0" colspan="3">
<widget class="Gui::PrefCheckBox" name="checkBox_showUnit">
<property name="toolTip">
@@ -406,7 +428,7 @@ or cm, leave blank to use the current unit defined in FreeCAD.</string>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_3">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -471,11 +493,11 @@ or cm, leave blank to use the current unit defined in FreeCAD.</string>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Dimension details</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QLabel" name="label_dimovershoot">
<property name="text">
@@ -512,7 +534,7 @@ or cm, leave blank to use the current unit defined in FreeCAD.</string>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_4">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@@ -615,7 +637,7 @@ used for linear dimensions.</string>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_5">
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
<string>ShapeStrings</string>
</property>