Sketcher: Coinmanager: remove dpi (#22941)
* Sketcher: Coinmanager: remove dpi * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -374,7 +374,6 @@ void EditModeCoinManager::ParameterObserver::updateElementSizeParameters(
|
||||
|
||||
int sketcherfontSize = hGrp->GetInt("EditSketcherFontSize", defaultFontSizePixels);
|
||||
|
||||
double dpi = Client.getApplicationLogicalDPIX();
|
||||
double devicePixelRatio = Client.getDevicePixelRatio();
|
||||
|
||||
// simple scaling factor for hardcoded pixel values in the Sketcher
|
||||
@@ -385,10 +384,9 @@ void EditModeCoinManager::ParameterObserver::updateElementSizeParameters(
|
||||
// internally. Coin, at least our coin at this time, takes pixels, not points.
|
||||
|
||||
Client.drawingParameters.coinFontSize =
|
||||
std::lround(sketcherfontSize * devicePixelRatio); // this is in pixels
|
||||
Client.drawingParameters.labelFontSize =
|
||||
std::lround(sketcherfontSize * devicePixelRatio * 72.0f
|
||||
/ dpi); // this is in points, as SoDatumLabel uses points
|
||||
std::lround(sketcherfontSize * devicePixelRatio); // in pixels
|
||||
Client.drawingParameters.labelFontSize = std::lround(
|
||||
sketcherfontSize * devicePixelRatio * 0.75); // in points, as SoDatumLabel uses points
|
||||
Client.drawingParameters.constraintIconSize =
|
||||
std::lround(0.8 * sketcherfontSize * devicePixelRatio);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user