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
Kate
Commits
361d01d5
Commit
361d01d5
authored
Jan 19, 2021
by
Waqar Ahmed
Committed by
Christoph Cullmann
Jan 20, 2021
Browse files
Draw a tiny shadow to make the button look more real
parent
bf73e9dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
kate/katecommandbar.cpp
View file @
361d01d5
...
...
@@ -173,10 +173,16 @@ public:
int
i
=
0
;
painter
->
setRenderHint
(
QPainter
::
Antialiasing
);
// :)
for
(
const
auto
&
pxm
:
btnRects
)
{
// draw rounded rect
// draw rounded rect
shadown
painter
->
setPen
(
Qt
::
NoPen
);
painter
->
setBrush
(
option
.
palette
.
button
());
QRect
r
(
dx
,
y
,
pxm
.
first
.
width
(),
pxm
.
first
.
height
());
auto
shadow
=
r
.
translated
(
0
,
1
);
painter
->
setBrush
(
option
.
palette
.
shadow
());
painter
->
drawRoundedRect
(
shadow
,
3
,
3
);
// draw rounded rect itself
painter
->
setBrush
(
option
.
palette
.
button
());
painter
->
drawRoundedRect
(
r
,
3
,
3
);
// draw text inside rounded rect
...
...
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