[murrine/gtk+3] GtkScrollbar's trough is under draw_shadow
- From: Andrea Cimitan <acimitan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [murrine/gtk+3] GtkScrollbar's trough is under draw_shadow
- Date: Fri, 26 Nov 2010 15:32:21 +0000 (UTC)
commit ee3e2f306f2a48ba6f4f91a0cc430b1e73a2c24e
Author: Andrea Cimitan <andrea cimitan gmail com>
Date: Fri Nov 26 16:31:50 2010 +0100
GtkScrollbar's trough is under draw_shadow
src/murrine_style.c | 78 +++++++++++++++++++++++++-------------------------
1 files changed, 39 insertions(+), 39 deletions(-)
---
diff --git a/src/murrine_style.c b/src/murrine_style.c
index 99ace6e..891538f 100644
--- a/src/murrine_style.c
+++ b/src/murrine_style.c
@@ -489,6 +489,45 @@ murrine_style_draw_shadow (DRAW_ARGS)
murrine_set_color_rgb (cr, &colors->shade[5]);
cairo_stroke (cr);
}
+ else if ((DETAIL ("trough-upper") || DETAIL ("trough-lower")) && widget && (MRN_IS_VSCROLLBAR (widget) || MRN_IS_HSCROLLBAR (widget) || MRN_IS_SCROLLBAR (widget)))
+ {
+ WidgetParameters params;
+ ScrollBarParameters scrollbar;
+ boolean within_bevel = FALSE;
+
+ if (gtk_widget_get_parent (widget) && MRN_IS_SCROLLED_WINDOW (gtk_widget_get_parent (widget)))
+ gtk_widget_style_get (gtk_widget_get_parent (widget), "scrollbars-within-bevel", &within_bevel, NULL);
+
+ scrollbar.horizontal = TRUE;
+ scrollbar.junction = murrine_scrollbar_get_junction (widget);
+ scrollbar.stepperstyle = murrine_style->stepperstyle;
+ scrollbar.within_bevel = within_bevel;
+ scrollbar.trough_upper = DETAIL ("trough-upper");
+ gtk_widget_style_get (widget, "stepper-size", &scrollbar.steppersize, NULL);
+
+ murrine_set_widget_parameters (widget, style, state_type, ¶ms);
+
+ if (within_bevel)
+ params.corners = MRN_CORNER_NONE;
+
+ scrollbar.horizontal = gtk_orientable_get_orientation ((GtkOrientable*)widget) == GTK_ORIENTATION_HORIZONTAL;
+
+ if (murrine_style->stepperstyle != 1 && murrine_style->stepperstyle != 3 && !params.mrn_gradient.use_rgba)
+ {
+ if (scrollbar.horizontal)
+ {
+ x += 2;
+ width -= 4;
+ }
+ else
+ {
+ y += 2;
+ height -= 4;
+ }
+ }
+
+ STYLE_FUNCTION(draw_scrollbar_trough) (cr, colors, ¶ms, &scrollbar, x, y, width, height);
+ }
else
{
WidgetParameters params;
@@ -1033,45 +1072,6 @@ murrine_style_draw_box (DRAW_ARGS)
STYLE_FUNCTION(draw_progressbar_trough) (cr, colors, ¶ms, &progressbar, x, y, width, height);
}
- else if ((DETAIL ("trough-upper") || DETAIL ("trough-lower")) && widget && (MRN_IS_VSCROLLBAR (widget) || MRN_IS_HSCROLLBAR (widget)))
- {
- WidgetParameters params;
- ScrollBarParameters scrollbar;
- boolean within_bevel = FALSE;
-
- if (gtk_widget_get_parent (widget) && MRN_IS_SCROLLED_WINDOW (gtk_widget_get_parent (widget)))
- gtk_widget_style_get (gtk_widget_get_parent (widget), "scrollbars-within-bevel", &within_bevel, NULL);
-
- scrollbar.horizontal = TRUE;
- scrollbar.junction = murrine_scrollbar_get_junction (widget);
- scrollbar.stepperstyle = murrine_style->stepperstyle;
- scrollbar.within_bevel = within_bevel;
- scrollbar.trough_upper = DETAIL ("trough-upper");
- gtk_widget_style_get (widget, "stepper-size", &scrollbar.steppersize, NULL);
-
- murrine_set_widget_parameters (widget, style, state_type, ¶ms);
-
- if (within_bevel)
- params.corners = MRN_CORNER_NONE;
-
- scrollbar.horizontal = gtk_orientable_get_orientation ((GtkOrientable*)widget) == GTK_ORIENTATION_HORIZONTAL;
-
- if (murrine_style->stepperstyle != 1 && murrine_style->stepperstyle != 3 && !params.mrn_gradient.use_rgba)
- {
- if (scrollbar.horizontal)
- {
- x += 2;
- width -= 4;
- }
- else
- {
- y += 2;
- height -= 4;
- }
- }
-
- STYLE_FUNCTION(draw_scrollbar_trough) (cr, colors, ¶ms, &scrollbar, x, y, width, height);
- }
else if (DETAIL ("bar"))
{
WidgetParameters params;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]