From 2431932ae1421f25ffc4e1ee6ea30e75ce8aaf54 Mon Sep 17 00:00:00 2001 From: Syres916 <46537884+Syres916@users.noreply.github.com> Date: Tue, 14 Feb 2023 11:49:31 +0000 Subject: [PATCH] [Sketcher] Fix cursor coordinates text size... ...to stay in proportion to the constraint text size. Fixes https://github.com/FreeCAD/FreeCAD/issues/7080 --- src/Mod/Sketcher/Gui/EditModeCoinManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp b/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp index 6e570cede3..147d45ba30 100644 --- a/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp +++ b/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp @@ -709,6 +709,8 @@ void EditModeCoinManager::createEditModeInventorNodes() float transparency; SbColor cursorTextColor(0,0,1); cursorTextColor.setPackedValue((uint32_t)hGrp->GetUnsigned("CursorTextColor", cursorTextColor.getPackedValue()), transparency); + int defaultFontSizePixels = defaultApplicationFontSizePixels(); // returns height in pixels, not points + int cursorFontSize = hGrp->GetInt("EditSketcherFontSize", defaultFontSizePixels); // stuff for the EditMarkers +++++++++++++++++++++++++++++++++++++++ SoSeparator* editMarkersRoot = new SoSeparator; @@ -746,7 +748,7 @@ void EditModeCoinManager::createEditModeInventorNodes() Coordsep->addChild(CoordTextMaterials); SoFont *font = new SoFont(); - font->size.setValue(drawingParameters.coinFontSize); + font->size.setValue(cursorFontSize); Coordsep->addChild(font);