summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-04 16:31:37 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-04-10 16:21:30 +0200
commit1a9eff02e49c11787810b61b23f1d74b5a9e9952 (patch)
tree20dd1ba2c510d10be72020d1f7644fe87c64bc97
parent506b228992ccb5a12486e2a8607ee3c81e3467a1 (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>
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx12
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:
{