vcl/inc/unx/gtk/gtkgdi.hxx | 1 + vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-)
New commits: commit fe47dda7ec8bf9e13efe65781681d52cfd01829c Author: Caolán McNamara <[email protected]> Date: Mon Sep 4 11:19:57 2017 +0100 Resolves: tdf#111864 render progress bar for Ambiance theme properly Change-Id: I8ce43e4516413ea3779a128b374a931b080ae970 Reviewed-on: https://gerrit.libreoffice.org/41881 Tested-by: Jenkins <[email protected]> Reviewed-by: Adolfo Jayme Barrientos <[email protected]> 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);
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
