diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-04 16:31:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-04-04 18:56:00 +0100 |
commit | 6f0f2278662e29d054690a85bad6583b5c65f918 (patch) | |
tree | 5d6756355acd31e3155681e78af46039b7a9caa9 /vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | |
parent | fb5cd5d734c56d30f26a5ab510457dc42be88674 (diff) |
Resolves: tdf#106725 paint default window bg before spin button bg
Change-Id: I0c7f982c3a47f45d022271eba69ebed896288d78
Diffstat (limited to 'vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx')
-rw-r--r-- | vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index fc0e94149545..6d0edca0c829 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -1124,11 +1124,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()); @@ -1511,11 +1517,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: { |