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
46043ff1
Commit
46043ff1
authored
Sep 12, 2021
by
Niklas Freund
Browse files
Fixed bitset buttons being blurry
parent
11ccb441
Changes
1
Hide whitespace changes
Inline
Side-by-side
kcalc_bitset.cpp
View file @
46043ff1
...
...
@@ -44,15 +44,15 @@ void BitButton::paintEvent(QPaintEvent *)
}
// Calculate button size (make it square)
QRect
F
square
=
rect
();
QRect
square
=
rect
();
if
(
square
.
width
()
>
square
.
height
())
square
.
setWidth
(
square
.
height
());
else
if
(
square
.
height
()
>
square
.
width
())
square
.
setHeight
(
square
.
width
());
// Draw button
painter
.
translate
(
QPoint
F
(
0.
0
,
(
rect
().
height
()
-
square
.
height
())
/
2
.0
));
// center button
painter
.
drawRect
(
square
.
adjusted
(
1
.0
,
1
.0
,
-
1
.0
,
-
1
.0
));
painter
.
translate
(
QPoint
(
0
,
(
rect
().
height
()
-
square
.
height
())
/
2
));
// center button
painter
.
drawRect
(
square
.
adjusted
(
1
,
1
,
-
1
,
-
1
));
}
//------------------------------------------------------------------------------
...
...
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