[murrine/gtk+3] Fixed GtkHandle
- From: Andrea Cimitan <acimitan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [murrine/gtk+3] Fixed GtkHandle
- Date: Wed, 13 Oct 2010 15:53:15 +0000 (UTC)
commit f999e9eafbcb7201f43e4aa53ce7618eb00721b8
Author: Andrea Cimitan <andrea cimitan gmail com>
Date: Wed Oct 13 17:52:45 2010 +0200
Fixed GtkHandle
src/murrine_draw_rgba.c | 50 ++++++++++++++++++++++++++--------------------
src/murrine_style.c | 2 +
2 files changed, 30 insertions(+), 22 deletions(-)
---
diff --git a/src/murrine_draw_rgba.c b/src/murrine_draw_rgba.c
index 4a6df60..539e965 100644
--- a/src/murrine_draw_rgba.c
+++ b/src/murrine_draw_rgba.c
@@ -693,21 +693,24 @@ murrine_rgba_draw_progressbar_fill (cairo_t *cr,
/* progressbar->orientation < 2 == boolean is_horizontal */
if (progressbar->orientation < 2)
{
- if (progressbar->orientation == MRN_ORIENTATION_LEFT_TO_RIGHT)
- rotate_mirror_translate (cr, 0, x, y, FALSE, FALSE);
- else
- rotate_mirror_translate (cr, 0, x+width, y, TRUE, FALSE);
+ cairo_translate (cr, x, y);
+/* if (progressbar->orientation == MRN_ORIENTATION_LEFT_TO_RIGHT)*/
+/* rotate_mirror_translate (cr, 0, x, y, FALSE, FALSE);*/
+/* else*/
+/* rotate_mirror_translate (cr, 0, x+width, y, TRUE, FALSE);*/
}
else
{
- int tmp = height; height = width; width = tmp;
+/* int tmp = height; height = width; width = tmp;*/
- x = x+1; y = y-1; width = width+2; height = height-2;
+ x = x+1; y = y-1; width = width-2; height = height+2;
- if (progressbar->orientation == MRN_ORIENTATION_TOP_TO_BOTTOM)
- rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);
- else
- rotate_mirror_translate (cr, M_PI/2, x, y+width, TRUE, FALSE);
+ murrine_exchange_axis (cr, &x, &y, &width, &height);
+
+/* if (progressbar->orientation == MRN_ORIENTATION_TOP_TO_BOTTOM)*/
+/* rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);*/
+/* else*/
+/* rotate_mirror_translate (cr, M_PI/2, x, y+width, TRUE, FALSE);*/
}
roundness = MIN (widget->roundness-widget->xthickness, height/2.0);
@@ -1340,10 +1343,11 @@ murrine_rgba_draw_scrollbar_trough (cairo_t *cr,
}
else
{
- int tmp = height;
- rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);
- height = width;
- width = tmp;
+/* int tmp = height;*/
+/* rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);*/
+/* height = width;*/
+/* width = tmp;*/
+ murrine_exchange_axis (cr, &x, &y, &width, &height);
}
/* Draw fill */
@@ -1510,10 +1514,11 @@ murrine_rgba_draw_scrollbar_slider (cairo_t *cr,
cairo_translate (cr, x, y);
else
{
- int tmp = height;
- rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);
- height = width;
- width = tmp;
+/* int tmp = height;*/
+/* rotate_mirror_translate (cr, M_PI/2, x, y, FALSE, FALSE);*/
+/* height = width;*/
+/* width = tmp;*/
+ murrine_exchange_axis (cr, &x, &y, &width, &height);
}
cairo_save (cr);
@@ -1736,10 +1741,11 @@ murrine_rgba_draw_handle (cairo_t *cr,
if (handle->horizontal)
{
- int tmp = height;
- rotate_mirror_translate (cr, M_PI/2, x+0.5+width/2-bar_height/2, y+height/2-bar_width/2, FALSE, FALSE);
- height = width;
- width = tmp;
+/* int tmp = height;*/
+/* rotate_mirror_translate (cr, M_PI/2, x+0.5+width/2-bar_height/2, y+height/2-bar_width/2, FALSE, FALSE);*/
+/* height = width;*/
+/* width = tmp;*/
+ murrine_exchange_axis (cr, &x, &y, &width, &height);
}
else
{
diff --git a/src/murrine_style.c b/src/murrine_style.c
index ae6649f..3befb89 100644
--- a/src/murrine_style.c
+++ b/src/murrine_style.c
@@ -663,6 +663,7 @@ murrine_style_draw_handle (DRAW_ARGS, GtkOrientation orientation)
murrine_set_widget_parameters (widget, style, state_type, ¶ms);
+
STYLE_FUNCTION(draw_handle) (cr, colors, ¶ms, &handle, x, y, width, height);
}
else if (DETAIL ("paned"))
@@ -2670,6 +2671,7 @@ murrine_style_class_init (MurrineStyleClass *klass)
style_class->draw_extension = murrine_style_draw_extension;
style_class->draw_flat_box = murrine_style_draw_flat_box;
style_class->draw_focus = murrine_style_draw_focus;
+ style_class->draw_handle = murrine_style_draw_handle;
style_class->draw_hline = murrine_style_draw_hline;
style_class->draw_option = murrine_style_draw_option;
style_class->render_icon = murrine_style_draw_render_icon;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]