From d30f8777882dff845c77e20dcef9e8ea626dc207 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Thu, 7 Jan 2021 08:12:16 +0100 Subject: [PATCH] Sketcher: Preferences - add 3D view scaling factor ================================================== In addition to the font size in pixels, which controls the 3D View font size (and indirectly the constraint icons), it is now possible to configure a scaling factor controlling the width of geometry, axes, information layer, and constraint lines. --- src/Mod/Sketcher/Gui/SketcherSettings.cpp | 2 + .../Sketcher/Gui/SketcherSettingsDisplay.ui | 67 ++++++++++++++++--- 2 files changed, 60 insertions(+), 9 deletions(-) diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.cpp b/src/Mod/Sketcher/Gui/SketcherSettings.cpp index 322fd78cab..cef95407e2 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettings.cpp +++ b/src/Mod/Sketcher/Gui/SketcherSettings.cpp @@ -147,6 +147,7 @@ SketcherSettingsDisplay::~SketcherSettingsDisplay() void SketcherSettingsDisplay::saveSettings() { ui->EditSketcherFontSize->onSave(); + ui->viewScalingFactor->onSave(); ui->SegmentsPerGeometry->onSave(); ui->dialogOnDistanceConstraint->onSave(); ui->continueMode->onSave(); @@ -166,6 +167,7 @@ void SketcherSettingsDisplay::saveSettings() void SketcherSettingsDisplay::loadSettings() { ui->EditSketcherFontSize->onRestore(); + ui->viewScalingFactor->onRestore(); ui->SegmentsPerGeometry->onRestore(); ui->dialogOnDistanceConstraint->onRestore(); ui->continueMode->onRestore(); diff --git a/src/Mod/Sketcher/Gui/SketcherSettingsDisplay.ui b/src/Mod/Sketcher/Gui/SketcherSettingsDisplay.ui index 4fd3814ea9..a02ea56599 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettingsDisplay.ui +++ b/src/Mod/Sketcher/Gui/SketcherSettingsDisplay.ui @@ -33,7 +33,7 @@ Sketch editing - + A dialog will pop up to input a value for new dimensional constraints @@ -52,14 +52,14 @@ - + Segments per geometry - + Current constraint creation tool will remain active after creation @@ -78,7 +78,7 @@ - + Line pattern used for grid lines @@ -88,7 +88,7 @@ - + Base length units will not be displayed in constraints. @@ -118,7 +118,7 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. - + true @@ -290,7 +290,7 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. - + Current sketcher creation tool will remain active after creation @@ -309,14 +309,14 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. - + Grid line pattern - + Number of polygons for geometry approximation @@ -335,6 +335,50 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. + + + + + 182 + 0 + + + + View scale ratio + + + + + + + The 3D view is scaled based on this factor + + + Qt::ImhPreferNumbers + + + 2 + + + 0.500000000000000 + + + 5.000000000000000 + + + 0.050000000000000 + + + 1.000000000000000 + + + ViewScalingFactor + + + View + + + @@ -351,6 +395,11 @@ Supports all unit systems except 'US customary' and 'Building US/Euro'. QCheckBox
Gui/PrefWidgets.h
+ + Gui::PrefDoubleSpinBox + QDoubleSpinBox +
Gui/PrefWidgets.h
+
EditSketcherFontSize