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
49b1dc1a
Commit
49b1dc1a
authored
Feb 18, 2021
by
Waqar Ahmed
Browse files
Make sure button rects look good on gnome
parent
80e73f52
Changes
1
Hide whitespace changes
Inline
Side-by-side
kate/katecommandbar.cpp
View file @
49b1dc1a
...
...
@@ -181,8 +181,17 @@ public:
return
list
;
}();
btns
.
reserve
(
list
.
size
());
const
int
height
=
options
.
rect
.
height
();
for
(
const
QString
&
text
:
list
)
{
if
(
text
.
isEmpty
())
{
continue
;
}
QRect
r
=
option
.
fontMetrics
.
boundingRect
(
text
);
// this happens on gnome so we manually decrease the
// height a bit
if
(
r
.
height
()
==
height
)
{
r
.
setHeight
(
r
.
height
()
-
4
);
}
r
.
setWidth
(
r
.
width
()
+
8
);
btns
.
append
({
r
,
text
});
}
...
...
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