[murrine] Fixes for launchpad bug 702531
- From: Andrea Cimitan <acimitan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [murrine] Fixes for launchpad bug 702531
- Date: Mon, 7 Feb 2011 18:31:53 +0000 (UTC)
commit 9077c76d54b30d89e4b2eaaabd542fd1d9015732
Author: Andrea Cimitan <andrea cimitan gmail com>
Date: Mon Feb 7 19:31:13 2011 +0100
Fixes for launchpad bug 702531
src/murrine_style.c | 14 +++++++++-----
src/support.c | 16 ++++++++++++++++
src/support.h | 1 +
3 files changed, 26 insertions(+), 5 deletions(-)
---
diff --git a/src/murrine_style.c b/src/murrine_style.c
index 30af80e..33e0df2 100644
--- a/src/murrine_style.c
+++ b/src/murrine_style.c
@@ -1926,11 +1926,6 @@ murrine_style_draw_arrow (GtkStyle *style,
arrow.direction = (MurrineDirection)arrow_type;
arrow.style = murrine_style->arrowstyle;
- if (MRN_IS_COMBO_BOX (widget) && !MRN_IS_COMBO_BOX_ENTRY (widget))
- {
- arrow.type = MRN_ARROW_COMBO;
- }
-
murrine_set_widget_parameters (widget, style, state_type, ¶ms);
if (arrow.style == 1 || arrow.style == 2)
@@ -2031,6 +2026,15 @@ murrine_style_draw_arrow (GtkStyle *style,
}
}
+ if (murrine_is_combo_box (widget) && !murrine_is_combo_box_entry (widget))
+ {
+ arrow.type = MRN_ARROW_COMBO;
+
+ x = x + width / 2 - 1;
+ y = y + height / 2 - 2;
+ height = 5; width = 5;
+ }
+
STYLE_FUNCTION(draw_arrow) (cr, colors, ¶ms, &arrow, x, y, width, height);
cairo_destroy (cr);
diff --git a/src/support.c b/src/support.c
index dc3a71a..8673bec 100644
--- a/src/support.c
+++ b/src/support.c
@@ -202,6 +202,22 @@ murrine_is_combo_box (GtkWidget *widget)
return (murrine_find_combo_box_widget(widget) != NULL);
}
+gboolean
+murrine_is_combo_box_entry (GtkWidget *widget)
+{
+ gboolean result = FALSE;
+
+ if ((widget) && (widget->parent))
+ {
+ if (GTK_IS_COMBO_BOX_ENTRY (widget->parent))
+ result = TRUE;
+ else
+ result = murrine_is_combo_box_entry (widget->parent);
+ }
+
+ return result;
+}
+
MurrineStepper
murrine_scrollbar_get_stepper (GtkWidget *widget,
GdkRectangle *stepper)
diff --git a/src/support.h b/src/support.h
index 719edcf..e141067 100644
--- a/src/support.h
+++ b/src/support.h
@@ -123,6 +123,7 @@ G_GNUC_INTERNAL GtkWidget *murrine_special_get_ancestor (GtkWidget *widget, GTyp
G_GNUC_INTERNAL GdkColor* murrine_get_parent_bgcolor (GtkWidget *widget);
G_GNUC_INTERNAL GtkWidget* murrine_get_parent_window (GtkWidget *widget);
G_GNUC_INTERNAL gboolean murrine_is_combo_box (GtkWidget *widget);
+G_GNUC_INTERNAL gboolean murrine_is_combo_box_entry (GtkWidget *widget);
G_GNUC_INTERNAL GtkWidget* murrine_find_combo_box_widget(GtkWidget *widget);
G_GNUC_INTERNAL void murrine_gtk_treeview_get_header_index (GtkTreeView *tv,
GtkWidget *header,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]