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 | 23d7a2675bf26ff7b81ae7c5676b759846eb417d (patch) | |
tree | 06a0ad762f5ab8430c45c86b3dfc9e883e62f531 | |
parent | 3a5bc363b8e6db3563deab7493ce8eccd5a4db9f (diff) | |
download | scintilla-mirror-23d7a2675bf26ff7b81ae7c5676b759846eb417d.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( |