summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-09-04 11:19:57 +0100
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2017-09-10 13:55:33 +0200
commitfe47dda7ec8bf9e13efe65781681d52cfd01829c (patch)
tree87abee3a80fe87d5a2c39228a326b5e537293848
parent9e20ef275a9c2bbb9a817a752c6e8e50c69b01f8 (diff)
Resolves: tdf#111864 render progress bar for Ambiance theme properly
Change-Id: I8ce43e4516413ea3779a128b374a931b080ae970 Reviewed-on: https://gerrit.libreoffice.org/41881 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r--vcl/inc/unx/gtk/gtkgdi.hxx1
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx16
2 files changed, 16 insertions, 1 deletions
diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index 168c98d82dbb..0d04de19e918 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -70,6 +70,7 @@ enum class GtkControlPart
ScrollbarHorizontalSlider,
ScrollbarHorizontalButton,
ProgressBar,
+ ProgressBarTrough,
ProgressBarProgress,
Notebook,
NotebookHeader,
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 6d0edca0c829..248347b0ae18 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -1596,6 +1596,13 @@ GtkStyleContext* GtkSalGraphics::createNewContext(GtkControlPart ePart, gtk_widg
gtk_widget_path_iter_add_class(path, -1, GTK_STYLE_CLASS_HORIZONTAL);
return makeContext(path, nullptr);
}
+ case GtkControlPart::ProgressBarTrough:
+ {
+ GtkWidgetPath *path = gtk_widget_path_copy(gtk_style_context_get_path(mpProgressBarStyle));
+ gtk_widget_path_append_type(path, GTK_TYPE_PROGRESS_BAR);
+ set_object_name(path, -1, "trough");
+ return makeContext(path, mpProgressBarStyle);
+ }
case GtkControlPart::ProgressBarProgress:
{
GtkWidgetPath *path = gtk_widget_path_copy(gtk_style_context_get_path(mpProgressBarTroughStyle));
@@ -1929,6 +1936,13 @@ GtkStyleContext* GtkSalGraphics::createOldContext(GtkControlPart ePart)
gtk_widget_path_iter_add_class(path, -1, GTK_STYLE_CLASS_HORIZONTAL);
return makeContext(path, nullptr);
}
+ case GtkControlPart::ProgressBarTrough:
+ {
+ GtkWidgetPath *path = gtk_widget_path_copy(gtk_style_context_get_path(mpProgressBarStyle));
+ gtk_widget_path_append_type(path, GTK_TYPE_PROGRESS_BAR);
+ gtk_widget_path_iter_add_class(path, -1, GTK_STYLE_CLASS_TROUGH);
+ return makeContext(path, mpProgressBarStyle);
+ }
case GtkControlPart::ProgressBarProgress:
{
GtkWidgetPath *path = gtk_widget_path_copy(gtk_style_context_get_path(mpProgressBarTroughStyle));
@@ -3506,7 +3520,7 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
/* Progress Bar */
mpProgressBarStyle = createStyleContext(set_object_name, GtkControlPart::ProgressBar);
- mpProgressBarTroughStyle = createStyleContext(set_object_name, GtkControlPart::ProgressBar);
+ mpProgressBarTroughStyle = createStyleContext(set_object_name, GtkControlPart::ProgressBarTrough);
mpProgressBarProgressStyle = createStyleContext(set_object_name, GtkControlPart::ProgressBarProgress);
gtk_widget_show_all(gDumbContainer);