diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-04 16:31:37 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-04-12 17:16:57 +0200 |
commit | 9379ed5cf45dd091231661fa97cbe0f697b5633f (patch) | |
tree | d90df2ad40f7717d2a0ad6d5b83fd8b7690ed97d /vcl | |
parent | 8a5173e71654291dc55a3e3d171757bb1774869a (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit 1a9eff02e49c11787810b61b23f1d74b5a9e9952)
Diffstat (limited to 'vcl')
-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 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: { |