diff options
author | rjb330 <122177540+rjb330@users.noreply.github.com> | 2024-10-27 00:13:27 -0700 |
---|---|---|
committer | rjb330 <122177540+rjb330@users.noreply.github.com> | 2024-10-27 00:13:27 -0700 |
commit | 275e859bf9f3abd90aa85ed7eea9ab50a259eafd (patch) | |
tree | 45d6015e6858d5b5fa0492b4644e0da6615920b0 | |
parent | 6a0df8d27155cf74066ca2b91ad7f4cea6479d94 (diff) | |
download | gtk-qt-engine-275e859bf9f3abd90aa85ed7eea9ab50a259eafd.tar.gz gtk-qt-engine-275e859bf9f3abd90aa85ed7eea9ab50a259eafd.zip |
Additional scrollbar corrections
Signed-off-by: rjb330 <122177540+rjb330@users.noreply.github.com>
-rw-r--r-- | src/qt_qt_wrapper.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/qt_qt_wrapper.cpp b/src/qt_qt_wrapper.cpp index fd7e8c1..e7644dd 100644 --- a/src/qt_qt_wrapper.cpp +++ b/src/qt_qt_wrapper.cpp @@ -1227,12 +1227,35 @@ void drawScrollBarSlider(GdkWindow* window, GtkStyle* style, GtkStateType state, int wCorrected = w; int hCorrected = h; + int xOffset = 0; + int yOffset = 0; if (isDomino) { if (orientation == GTK_ORIENTATION_HORIZONTAL) wCorrected = w + 14; else hCorrected = h + 14; + } else if (isKeramik) { + if (orientation == GTK_ORIENTATION_HORIZONTAL) { + wCorrected = w + 3; + hCorrected = h - 1; + yOffset = 1; + } else { + wCorrected = w - 1; + hCorrected = h + 3; + xOffset = 1; + } + } + if (mozillaFix) { + if (orientation == GTK_ORIENTATION_HORIZONTAL) { + hCorrected-= 2; + wCorrected-= 1; + yOffset+= 1; + } else { + wCorrected-= 2; + hCorrected-= 1; + xOffset+= 1; + } } TQPixmap pixmap(wCorrected, hCorrected); TQPainter painter(&pixmap); @@ -1294,7 +1317,7 @@ void drawScrollBarSlider(GdkWindow* window, GtkStyle* style, GtkStateType state, gdk_draw_drawable(window, style->bg_gc[state], pix, 0, endsSkip, x, y, w, h-1); } else - gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h); + gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x+xOffset, y+yOffset, w, h); g_object_unref(pix); } |