Skip to content
GitLab
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
c82f5857
Commit
c82f5857
authored
Sep 08, 2021
by
Niklas Freund
Browse files
Fixed font loading regression
parent
2fbdc5e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
kcalc.cpp
View file @
c82f5857
...
...
@@ -2452,30 +2452,27 @@ void KCalculator::setFonts()
// Please note these constants are arbitrarily chosen for lack of a better solution.
// If issues with scaling arise (due to abnormally wide/tall fonts), increase them to compensate.
buttonFont
.
setPointSizeF
(
qMax
(
KCalcSettings
::
buttonFont
().
pointSizeF
(),
qMin
(
minButtonWidth
/
4.8
,
minButtonHeight
/
3.6
)));
}
// Step 3: Apply the new font size to all buttons.
// Step 3: Apply the new font
(and
size
)
to all buttons.
const
auto
leftPadLst
=
leftPad
->
children
();
for
(
QObject
*
obj
:
leftPadLst
)
{
if
(
auto
const
button
=
qobject_cast
<
KCalcButton
*>
(
obj
))
{
button
->
setFont
(
buttonFont
);
}
for
(
QObject
*
obj
:
leftPadLst
)
{
if
(
auto
const
button
=
qobject_cast
<
KCalcButton
*>
(
obj
))
{
button
->
setFont
(
buttonFont
);
}
}
const
auto
numericPadLst
=
numericPad
->
children
();
for
(
QObject
*
obj
:
numericPadLst
)
{
if
(
auto
const
button
=
qobject_cast
<
KCalcButton
*>
(
obj
))
{
button
->
setFont
(
buttonFont
);
}
for
(
QObject
*
obj
:
numericPadLst
)
{
if
(
auto
const
button
=
qobject_cast
<
KCalcButton
*>
(
obj
))
{
button
->
setFont
(
buttonFont
);
}
}
const
auto
rightPadLst
=
rightPad
->
children
();
for
(
QObject
*
obj
:
rightPadLst
)
{
if
(
auto
const
button
=
qobject_cast
<
KCalcButton
*>
(
obj
))
{
button
->
setFont
(
buttonFont
);
}
for
(
QObject
*
obj
:
rightPadLst
)
{
if
(
auto
const
button
=
qobject_cast
<
KCalcButton
*>
(
obj
))
{
button
->
setFont
(
buttonFont
);
}
}
updateGeometry
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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