File gtk-qt-engine-0.7-domino-scrollbar-fix.patch of Package kde3-gtk-qt-engine

diff -Naur gtk-qt-engine/src/qt_qt_wrapper.cpp gtk-qt-engine.patched/src/qt_qt_wrapper.cpp
--- gtk-qt-engine/src/qt_qt_wrapper.cpp	2006-07-05 23:38:38.000000000 +0200
+++ gtk-qt-engine.patched/src/qt_qt_wrapper.cpp	2007-07-09 02:43:29.000000000 +0200
@@ -325,7 +325,8 @@
 	isBaghira = (QString(qApp->style().name()).lower() == "baghira");
 	isKeramik = (QString(qApp->style().name()).lower() == "keramik");
 	isAlloy   = (QString(qApp->style().name()).lower() == "alloy");
-	
+	isDomino  = (QString(qApp->style().name()).lower() == "domino");
+		
 	// Set Gtk fonts and icons
 	/*setGnomeFonts();
 	setGnomeIcons();*/
@@ -899,20 +900,40 @@
 
 void drawScrollBarSlider(GdkWindow* window, GtkStyle* style, GtkStateType state, int orientation, GtkAdjustment* adj, int x, int y, int w, int h)
 {
+	int wCorrected, hCorrected;
+
 	if (!gtkQtEnable)
 		return;
 	
-	QPixmap pixmap(w, h);
+	wCorrected = w;
+	hCorrected = h;
+	if (isDomino)
+	{
+		if (orientation == GTK_ORIENTATION_HORIZONTAL)
+		    wCorrected = w + 14;
+		else
+		    hCorrected = h + 14;
+	}
+	QPixmap pixmap(wCorrected, hCorrected);
 	QPainter painter(&pixmap);
-	
+
 	QStyle::SFlags sflags = stateToSFlags(state);
 	if (orientation == GTK_ORIENTATION_HORIZONTAL)
 		sflags |= QStyle::Style_Horizontal;
 	
-	qApp->style().drawPrimitive(QStyle::PE_ScrollBarSlider, &painter, QRect(0,0,w,h), qApp->palette().active(), sflags);
+	qApp->style().drawPrimitive(QStyle::PE_ScrollBarSlider, &painter, QRect(0,0,wCorrected,hCorrected), qApp->palette().active(), sflags);	
 	
 	GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
-	gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
+	if (isDomino)
+	{
+		if (orientation == GTK_ORIENTATION_HORIZONTAL)
+			gdk_draw_drawable(window, style->bg_gc[state], pix, 7, 0, x, y, w, h);
+		else
+			gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 7, x, y, w, h);		    
+	} else
+	{
+		gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
+	}
 	g_object_unref(pix);
 }
 
diff -Naur gtk-qt-engine/src/qt_qt_wrapper.h gtk-qt-engine.patched/src/qt_qt_wrapper.h
--- gtk-qt-engine/src/qt_qt_wrapper.h	2006-06-25 02:50:21.000000000 +0200
+++ gtk-qt-engine.patched/src/qt_qt_wrapper.h	2007-07-09 02:12:12.000000000 +0200
@@ -68,6 +68,7 @@
 int isBaghira;
 int isKeramik;
 int isAlloy;
+int isDomino;
 int openOfficeFix;
 int gtkQtDebug;
 
openSUSE Build Service is sponsored by