summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-12-22 18:14:55 -0600
committerTimothy Pearson <[email protected]>2013-12-22 18:14:55 -0600
commita90aa09722d47f5f4009b089d8d874354899bdb8 (patch)
tree42b89b909552fb57ae2bb5ff39a5d715bdadee26 /src
parent6e6dbb068e03a8bb818a76ba774d6f94ade7389f (diff)
downloadgtk-qt-engine-a90aa09722d47f5f4009b089d8d874354899bdb8.tar.gz
gtk-qt-engine-a90aa09722d47f5f4009b089d8d874354899bdb8.zip
Fix Firefox scrollbars
Diffstat (limited to 'src')
-rw-r--r--src/qt_qt_wrapper.cpp2
-rw-r--r--src/qt_theme_draw.c22
2 files changed, 16 insertions, 8 deletions
diff --git a/src/qt_qt_wrapper.cpp b/src/qt_qt_wrapper.cpp
index 928aef3..eebcc93 100644
--- a/src/qt_qt_wrapper.cpp
+++ b/src/qt_qt_wrapper.cpp
@@ -2098,7 +2098,7 @@ void setRcProperties(GtkRcStyle* rc_style, int forceRecreate)
stream << parse_rc_string("GtkScrollbar::stepper-size = " + TQString::number(tqApp->style().querySubControlMetrics(TQStyle::CC_ScrollBar, &sbar, TQStyle::SC_ScrollBarSubLine).width() - 1), "*");
stream << parse_rc_string("GtkScrollbar::min-slider-length = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_ScrollBarSliderMin)), "*");
- stream << parse_rc_string("GtkScrollbar::slider-width = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_ScrollBarExtent)-2), "*");
+ stream << parse_rc_string("GtkScrollbar::slider-width = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_ScrollBarExtent)), "*");
stream << parse_rc_string("GtkButton::child-displacement-x = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_ButtonShiftHorizontal)), "*");
stream << parse_rc_string("GtkButton::child-displacement-y = " + TQString::number(tqApp->style().pixelMetric(TQStyle::PM_ButtonShiftVertical)), "*");
diff --git a/src/qt_theme_draw.c b/src/qt_theme_draw.c
index e84c4f7..4a2ee12 100644
--- a/src/qt_theme_draw.c
+++ b/src/qt_theme_draw.c
@@ -506,13 +506,16 @@ draw_arrow(GtkStyle* style,
{
sanitize_size(window, &width, &height);
- if (gtkQtDebug)
+ if (gtkQtDebug) {
printf("Arrow (%d,%d,%d,%d) Widget: %s Detail: %s\n", x, y, width, height,gtk_widget_get_name(widget),detail);
-
- if (DETAIL("hscrollbar") || DETAIL("vscrollbar"))
+ }
+
+ if (DETAIL("hscrollbar") || DETAIL("vscrollbar")) {
return;
- if (DETAIL("spinbutton"))
+ }
+ if (DETAIL("spinbutton")) {
return;
+ }
if (DETAIL("notebook"))
{
drawArrow(window, style, state_type, arrow_type, x, y, width, height);
@@ -688,7 +691,12 @@ draw_box(GtkStyle * style,
int orientation = ((width>height) ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL);
if (area) gdk_gc_set_clip_rectangle(style->bg_gc[state_type], area);
- drawScrollBar(window, style, state_type, orientation, adj, x, y, width, height);
+ if (orientation == GTK_ORIENTATION_VERTICAL) {
+ drawScrollBar(window, style, state_type, orientation, adj, x+1, y, width, height);
+ }
+ else {
+ drawScrollBar(window, style, state_type, orientation, adj, x, y+1, width, height);
+ }
if (area) gdk_gc_set_clip_rectangle(style->bg_gc[state_type], NULL);
}
return;
@@ -1363,12 +1371,12 @@ draw_slider(GtkStyle * style,
if (orientation == GTK_ORIENTATION_VERTICAL) {
if (area) gdk_gc_set_clip_rectangle(style->bg_gc[state_type], area);
- drawScrollBarSlider(window, style, state_type, orientation, adj, x-1, y, width+2, height, y-widgetY, widget->allocation.height);
+ drawScrollBarSlider(window, style, state_type, orientation, adj, x, y, width, height, y-widgetY, widget->allocation.height);
if (area) gdk_gc_set_clip_rectangle(style->bg_gc[state_type], NULL);
}
else {
if (area) gdk_gc_set_clip_rectangle(style->bg_gc[state_type], area);
- drawScrollBarSlider(window, style, state_type, orientation, adj, x, y-1, width, height+2, x-widgetX, widget->allocation.width);
+ drawScrollBarSlider(window, style, state_type, orientation, adj, x, y, width, height, x-widgetX, widget->allocation.width);
if (area) gdk_gc_set_clip_rectangle(style->bg_gc[state_type], NULL);
}
return;