diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-04 11:19:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-04 13:14:54 +0200 |
commit | 1d094369dced5f84991b95aa965ade12e68f69c5 (patch) | |
tree | e96e26b74115b1ba3e685f5fcb1c5d77a25c55ab /vcl | |
parent | 96654770b311825226c122cf60a624f0f155a3a2 (diff) |
Resolves: tdf#111864 render progress bar for Ambiance theme properly
Change-Id: I8ce43e4516413ea3779a128b374a931b080ae970
Reviewed-on: https://gerrit.libreoffice.org/41879
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/unx/gtk/gtkgdi.hxx | 1 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 16 |
2 files changed, 16 insertions, 1 deletions
diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx index 4b0a670763da..345f7282fc1e 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 f0d57e34069b..898df4499adc 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -1588,6 +1588,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)); @@ -1921,6 +1928,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)); @@ -3496,7 +3510,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); |