aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gtk/ScintillaGTK.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 80a247305..e5932a78b 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -2724,6 +2724,24 @@ gboolean ScintillaGTK::DrawText(GtkWidget *, cairo_t *cr, ScintillaGTK *sciThis)
gboolean ScintillaGTK::DrawThis(cairo_t *cr) {
try {
+#ifdef GTK_STYLE_CLASS_SCROLLBARS_JUNCTION /* GTK >= 3.4 */
+ // if both scrollbars are visible, paint the little square on the bottom right corner
+ if (verticalScrollBarVisible && horizontalScrollBarVisible && !Wrapping()) {
+ GtkStyleContext *styleContext = gtk_widget_get_style_context(PWidget(wMain));
+ PRectangle rc = GetClientRectangle();
+
+ gtk_style_context_save(styleContext);
+ gtk_style_context_add_class(styleContext, GTK_STYLE_CLASS_SCROLLBARS_JUNCTION);
+
+ gtk_render_background(styleContext, cr, rc.right, rc.bottom,
+ verticalScrollBarWidth, horizontalScrollBarHeight);
+ gtk_render_frame(styleContext, cr, rc.right, rc.bottom,
+ verticalScrollBarWidth, horizontalScrollBarHeight);
+
+ gtk_style_context_restore(styleContext);
+ }
+#endif
+
gtk_container_propagate_draw(
GTK_CONTAINER(PWidget(wMain)), PWidget(scrollbarh), cr);
gtk_container_propagate_draw(