diff options
author | Colomban Wendling <ban@herbesfolles.org> | 2015-05-22 23:50:52 +0200 |
---|---|---|
committer | Colomban Wendling <ban@herbesfolles.org> | 2015-05-22 23:50:52 +0200 |
commit | c660db2072a0cd58766f34949c389d1c5fac3ea7 (patch) | |
tree | 11b2ce3207030a722b7e8885b6bf99c3348fc949 | |
parent | 58416e2d1cc92a27e5eaf9813755da9ae31b821d (diff) | |
download | scintilla-mirror-c660db2072a0cd58766f34949c389d1c5fac3ea7.tar.gz |
GTK: Fill the scrollbars junction
Fill the scrollbars junction square with the appropriate style on
GTK version having a style for it (GTK >= 3.4).
Mostly fixes [bugs:#1611].
-rw-r--r-- | gtk/ScintillaGTK.cxx | 18 |
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( |