summaryrefslogtreecommitdiff
path: root/debian/patches/0287-qmenu-respect-minwidth.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0287-qmenu-respect-minwidth.diff')
-rw-r--r--debian/patches/0287-qmenu-respect-minwidth.diff26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/patches/0287-qmenu-respect-minwidth.diff b/debian/patches/0287-qmenu-respect-minwidth.diff
new file mode 100644
index 0000000..430f011
--- /dev/null
+++ b/debian/patches/0287-qmenu-respect-minwidth.diff
@@ -0,0 +1,26 @@
+From 01f26d0756839fbe783c637ca7dec5b7987f7e14 Mon Sep 17 00:00:00 2001
+From: Aaron Seigo <aseigo@kde.org>
+Date: Mon, 27 Jul 2009 21:46:22 -0600
+Subject: [PATCH 15/18] Make QMenu respect the minimum width set
+
+If one sets a minimum width on a QMenu and that size is larger than the
+smallest size needed by the large menu item, it ignores the minimum
+width and just uses the largest menu item size.
+
+This results in ugly painting artifacts. This currently affects
+(at least) the tasks widget in Plasma in KDE4.
+---
+ src/gui/widgets/qmenu.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+--- a/src/gui/widgets/qmenu.cpp
++++ b/src/gui/widgets/qmenu.cpp
+@@ -280,7 +280,7 @@ void QMenuPrivate::calcActionRects(QMap<
+
+
+ if (!sz.isEmpty()) {
+- max_column_width = qMax(max_column_width, sz.width());
++ max_column_width = qMax(q->minimumWidth(), qMax(max_column_width, sz.width()));
+ //wrapping
+ if (!scroll &&
+ y+sz.height()+vmargin > dh - (q->style()->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, 0, q) * 2)) {