diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-08-30 14:56:28 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-08-30 14:56:28 +0900 |
commit | 54d44a9bd04cfbed8426614fc69c027a46f41a14 (patch) | |
tree | 34bdf65a6e8d5d6d4016154345d1d803ba0da379 /gtk/gtkcellrendererprogress.c | |
parent | b3b22c31b997fb85b3319b392a1a69407703184c (diff) | |
parent | 67194ed77b153eb5a7eb6c596f3c20e274b7787a (diff) | |
download | gtk+-native-layout.tar.gz |
Merge branch 'master' into native-layoutnative-layout
Conflicts:
gtk/gtkplug.c
gtk/gtkscrolledwindow.c
Diffstat (limited to 'gtk/gtkcellrendererprogress.c')
-rw-r--r-- | gtk/gtkcellrendererprogress.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/gtk/gtkcellrendererprogress.c b/gtk/gtkcellrendererprogress.c index f6f3a9937a..60f0bdbdb6 100644 --- a/gtk/gtkcellrendererprogress.c +++ b/gtk/gtkcellrendererprogress.c @@ -534,6 +534,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell, { GtkCellRendererProgress *cellprogress = GTK_CELL_RENDERER_PROGRESS (cell); GtkCellRendererProgressPrivate *priv= cellprogress->priv; + GtkStyle *style; PangoLayout *layout; PangoRectangle logical_rect; gint x, y, w, h, x_pos, y_pos, bar_position, bar_size, start, full_size; @@ -541,6 +542,8 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell, GdkRectangle clip; gboolean is_rtl; + style = gtk_widget_get_style (widget); + is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL; gtk_cell_renderer_get_padding (cell, &xpad, &ypad); @@ -553,7 +556,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell, * but some engines don't paint anything with that detail for * non-GtkProgressBar widgets. */ - gtk_paint_box (widget->style, + gtk_paint_box (style, window, GTK_STATE_NORMAL, GTK_SHADOW_IN, NULL, widget, NULL, @@ -601,7 +604,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell, clip.y = bar_position; } - gtk_paint_box (widget->style, + gtk_paint_box (style, window, GTK_STATE_SELECTED, GTK_SHADOW_OUT, &clip, widget, "bar", @@ -620,13 +623,13 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell, else text_xalign = priv->text_xalign; - x_pos = x + widget->style->xthickness + text_xalign * - (w - 2 * widget->style->xthickness - logical_rect.width); + x_pos = x + style->xthickness + text_xalign * + (w - 2 * style->xthickness - logical_rect.width); - y_pos = y + widget->style->ythickness + priv->text_yalign * - (h - 2 * widget->style->ythickness - logical_rect.height); - - gtk_paint_layout (widget->style, window, + y_pos = y + style->ythickness + priv->text_yalign * + (h - 2 * style->ythickness - logical_rect.height); + + gtk_paint_layout (style, window, GTK_STATE_SELECTED, FALSE, &clip, widget, "progressbar", x_pos, y_pos, @@ -646,7 +649,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell, clip.height = bar_position - y; } - gtk_paint_layout (widget->style, window, + gtk_paint_layout (style, window, GTK_STATE_NORMAL, FALSE, &clip, widget, "progressbar", x_pos, y_pos, @@ -667,7 +670,7 @@ gtk_cell_renderer_progress_render (GtkCellRenderer *cell, clip.height = y + h - (bar_position + bar_size); } - gtk_paint_layout (widget->style, window, + gtk_paint_layout (style, window, GTK_STATE_NORMAL, FALSE, &clip, widget, "progressbar", x_pos, y_pos, |