rpms/qt/devel 287-qmenu-respect-minwidth.patch, NONE, 1.1 qt.spec, 1.306, 1.307 287-qmenu-respect-minwidth, 1.1, NONE

Rex Dieter rdieter at fedoraproject.org
Sat Aug 15 20:18:11 UTC 2009


Author: rdieter

Update of /cvs/pkgs/rpms/qt/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13934

Modified Files:
	qt.spec 
Added Files:
	287-qmenu-respect-minwidth.patch 
Removed Files:
	287-qmenu-respect-minwidth 
Log Message:
sanitize patch name (oops)


287-qmenu-respect-minwidth.patch:
 qmenu.cpp |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE 287-qmenu-respect-minwidth.patch ---
>From 01f26d0756839fbe783c637ca7dec5b7987f7e14 Mon Sep 17 00:00:00 2001
From: Aaron Seigo <aseigo at kde.org>
Date: Mon, 27 Jul 2009 21:46:22 -0600
Subject: [PATCH] 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(-)

diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index 9fbbb04..5d62ea6 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -280,7 +280,7 @@ void QMenuPrivate::calcActionRects(QMap<QAction*, QRect> &actionRects, QList<QAc
 
 
         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)) {
-- 
1.6.1



Index: qt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/qt/devel/qt.spec,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -p -r1.306 -r1.307
--- qt.spec	15 Aug 2009 20:15:15 -0000	1.306
+++ qt.spec	15 Aug 2009 20:18:11 -0000	1.307
@@ -63,7 +63,7 @@ Patch55: qt-x11-opensource-src-4.5.2-tim
 
 ## qt-copy patches
 # http://qt.gitorious.org/+kde-developers/qt/kde-qt/commit/01f26d0756839fbe783c637ca7dec5b7987f7e14.patch
-Patch287: 287-qmenu-respect-minwidth
+Patch287: 287-qmenu-respect-minwidth.patch
 # http://qt.gitorious.org/+kde-developers/qt/kde-qt/commit/1a94cd7b132497f70a2b97ec2b58f6e2b1c5076a.patch
 Patch0288: 0288-more-x-keycodes.patch
 # we'll want to switch to the kde-qt branches, e.g.:
@@ -404,7 +404,7 @@ popd
 %patch54 -p1 -b .mysql_config
 %patch55 -p1 -b .timestamp
 
-%patch287 -p1 -b .287-qmenu-respect
+%patch287 -p1 -b .287-qmenu-respect-minwidth
 %patch0288 -p1 -b .0288-more-x-keycodes
 
 # drop -fexceptions from $RPM_OPT_FLAGS


--- 287-qmenu-respect-minwidth DELETED ---




More information about the scm-commits mailing list