Commit 49b1dc1a authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Make sure button rects look good on gnome

parent 80e73f52
......@@ -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});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment