From 275e859bf9f3abd90aa85ed7eea9ab50a259eafd Mon Sep 17 00:00:00 2001 From: rjb330 <122177540+rjb330@users.noreply.github.com> Date: Sun, 27 Oct 2024 00:13:27 -0700 Subject: [PATCH] Additional scrollbar corrections Signed-off-by: rjb330 <122177540+rjb330@users.noreply.github.com> --- src/qt_qt_wrapper.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) 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); }