From 848b4e21f975a0b05639e8ee47fb3dcbb4dbf37d Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 22 Sep 2009 13:08:50 +0200 Subject: Fix autotest failure on combo box with Gtk+ We were not respecting the rect offset on combo box arrows. This was preventing the autotest from happily completing with GTK+ style. Reviewed-by: joao --- src/gui/styles/qgtkstyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index f3dc4ac..414580e 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -3063,14 +3063,14 @@ QRect QGtkStyle::subControlRect(ComplexControl control, const QStyleOptionComple if (!arrowWidget) return QCleanlooksStyle::subControlRect(control, option, subControl, widget); - QRect buttonRect(arrowWidget->allocation.x, arrowWidget->allocation.y, + QRect buttonRect(option->rect.left() + arrowWidget->allocation.x, + option->rect.top() + arrowWidget->allocation.y, arrowWidget->allocation.width, arrowWidget->allocation.height); switch (subControl) { case SC_ComboBoxArrow: // Note: this indicates the arrowbutton for editable combos rect = buttonRect; - break; case SC_ComboBoxEditField: { -- cgit v0.12