vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
New commits: commit 1a9eff02e49c11787810b61b23f1d74b5a9e9952 Author: Caolán McNamara <[email protected]> Date: Tue Apr 4 16:31:37 2017 +0100 Resolves: tdf#106725 paint default window bg before spin button bg Change-Id: I0c7f982c3a47f45d022271eba69ebed896288d78 (cherry picked from commit 6f0f2278662e29d054690a85bad6583b5c65f918) Reviewed-on: https://gerrit.libreoffice.org/36097 Tested-by: Jenkins <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index c8be8916e9d4..04b682c98f12 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -1126,11 +1126,17 @@ void GtkSalGraphics::PaintSpinButton(GtkStateFlags flags, if (nPart == ControlPart::Entire) { + gtk_style_context_set_state(mpWindowStyle, flags); + + gtk_render_background(mpWindowStyle, cr, + 0, 0, + rControlRectangle.GetWidth(), rControlRectangle.GetHeight()); + gtk_style_context_set_state(mpSpinStyle, flags); gtk_render_background(mpSpinStyle, cr, 0, 0, - rControlRectangle.GetWidth(), rControlRectangle.GetHeight() ); + rControlRectangle.GetWidth(), rControlRectangle.GetHeight()); } cairo_translate(cr, -rControlRectangle.Left(), -rControlRectangle.Top()); @@ -1513,11 +1519,11 @@ GtkStyleContext* GtkSalGraphics::createNewContext(GtkControlPart ePart, gtk_widg } case GtkControlPart::SpinButton: { - GtkWidgetPath *path = gtk_widget_path_new(); + GtkWidgetPath *path = gtk_widget_path_copy(gtk_style_context_get_path(mpWindowStyle)); gtk_widget_path_append_type(path, GTK_TYPE_SPIN_BUTTON); set_object_name(path, -1, "spinbutton"); gtk_widget_path_iter_add_class(path, -1, GTK_STYLE_CLASS_HORIZONTAL); - return makeContext(path, nullptr); + return makeContext(path, mpWindowStyle); } case GtkControlPart::SpinButtonEntry: {
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
