Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
KCalc
Commits
ee3594b5
Commit
ee3594b5
authored
Sep 23, 2021
by
Niklas Freund
Browse files
Fix history not keeping zoom factor for very small font zoom
parent
3292024a
Changes
1
Hide whitespace changes
Inline
Side-by-side
kcalchistory.cpp
View file @
ee3594b5
...
@@ -168,7 +168,7 @@ void KCalcHistory::updateFont(double zoomFactor)
...
@@ -168,7 +168,7 @@ void KCalcHistory::updateFont(double zoomFactor)
// Calculate actual font size by keeping the ratio, keeping previous zoomFactor, using historyFont as minimum size
// Calculate actual font size by keeping the ratio, keeping previous zoomFactor, using historyFont as minimum size
double
ratio
=
(
minimumSize
().
width
()
-
contentsMargins
().
left
()
-
contentsMargins
().
right
())
/
baseFont
().
pointSizeF
();
double
ratio
=
(
minimumSize
().
width
()
-
contentsMargins
().
left
()
-
contentsMargins
().
right
())
/
baseFont
().
pointSizeF
();
idealPointSizeF_
=
contentsRect
().
width
()
/
ratio
;
idealPointSizeF_
=
contentsRect
().
width
()
/
ratio
;
newFont
->
setPointSizeF
(
qMax
(
double
(
baseFont
().
pointSizeF
()),
idealPointSizeF_
*
zoomFactor
)
)
;
newFont
->
setPointSizeF
(
qMax
(
double
(
baseFont
().
pointSizeF
()),
idealPointSizeF_
)
*
zoomFactor
);
// Apply font
// Apply font
QTextEdit
::
setFont
(
*
newFont
);
QTextEdit
::
setFont
(
*
newFont
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment