summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qgtkstyle.cpp
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-04-22 13:55:28 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-04-22 14:00:54 (GMT)
commit3696886a327fc4894518c5570b02d5238dcede8a (patch)
treeb8efb56be47302373ad348f0b4198ad515c125e4 /src/gui/styles/qgtkstyle.cpp
parentf8be94bf4e8fa359bfc71a10aa7dc6b12daf5dea (diff)
downloadQt-3696886a327fc4894518c5570b02d5238dcede8a.zip
Qt-3696886a327fc4894518c5570b02d5238dcede8a.tar.gz
Qt-3696886a327fc4894518c5570b02d5238dcede8a.tar.bz2
QGtkStyle: Fix broken transparency on line edits in Clearlooks
This basically uses a workaround to hint to our gtk theme that we do not want it to fill our line edit backgrouns with the background brush. This was suggested by Benjamin berg. More information can be found here: https://bugzilla.mozilla.org/show_bug.cgi?id=405421 Reviewed-by: Tor Arne
Diffstat (limited to 'src/gui/styles/qgtkstyle.cpp')
-rw-r--r--src/gui/styles/qgtkstyle.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index b7fa575..ca71da2 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -951,14 +951,15 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
"interior-focus", &interior_focus,
"focus-line-width", &focus_line_width, NULL);
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=405421 for info about this hack
+ g_object_set_data(G_OBJECT(gtkEntry), "transparent-bg-hint", GINT_TO_POINTER(TRUE));
+
if (!interior_focus && option->state & State_HasFocus)
rect.adjust(focus_line_width, focus_line_width, -focus_line_width, -focus_line_width);
-
gtkPainter.paintShadow(gtkEntry, "entry", rect, option->state & State_Enabled ?
GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE,
GTK_SHADOW_IN, gtkEntry->style,
option->state & State_HasFocus ? QLS("focus") : QString());
-
if (!interior_focus && option->state & State_HasFocus)
gtkPainter.paintShadow(gtkEntry, "entry", option->rect, option->state & State_Enabled ?
GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE,