[gtk-quartz-engine] Add drawing of GtkCellRendererToggle
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-quartz-engine] Add drawing of GtkCellRendererToggle
- Date: Sat, 9 Oct 2010 18:07:48 +0000 (UTC)
commit b1caff014a347d0eb18b23cadf3f21001699aae4
Author: Rob Caelers <robc krandor org>
Date: Wed Jun 3 23:04:53 2009 +0200
Add drawing of GtkCellRendererToggle
ChangeLog | 14 ++++++++----
src/quartz-style.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8ec2e38..e10f434 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,17 @@
2009-06-03 Rob Caelers <robc krandor nl>
- * src/quartz-style.c (draw_flat_box): Fix background color of TreeView
- widget.
+ * src/quartz-style.c (draw_check):Add drawing of GtkCellRendererToggle.
2009-06-03 Rob Caelers <robc krandor nl>
- * src/quartz-style.c (style_setup_rc_style): Fix font size for Gtkmm TreeView
- widget (widget is called gtkm__GtkTreeView and was not matched by
- style rules).
+ * src/quartz-style.c (draw_flat_box): Fix background color of
+ TreeView widget.
+
+2009-06-03 Rob Caelers <robc krandor nl>
+
+ * src/quartz-style.c (style_setup_rc_style): Fix font size for
+ Gtkmm TreeView widget (widget is called gtkm__GtkTreeView and was
+ not matched by style rules).
2009-06-02 Rob Caelers <robc krandor nl>
diff --git a/src/quartz-style.c b/src/quartz-style.c
index bdc787d..60d750e 100644
--- a/src/quartz-style.c
+++ b/src/quartz-style.c
@@ -1056,6 +1056,61 @@ draw_check (GtkStyle *style,
return;
}
+ else if (IS_DETAIL (detail, "cellcheck"))
+ {
+ CGContextRef context;
+ HIRect rect;
+ HIThemeButtonDrawInfo draw_info;
+
+ // FIXME: check if this can be merged with detail==checkbutton
+
+ draw_info.version = 0;
+ draw_info.kind = kThemeCheckBox;
+ draw_info.adornment = kThemeAdornmentNone;
+
+ draw_info.value = kThemeButtonOff;
+ draw_info.state = kThemeStateActive;
+
+ if (shadow_type == GTK_SHADOW_IN)
+ {
+ draw_info.value = kThemeButtonOn;
+ }
+
+ switch (state_type)
+ {
+ case GTK_STATE_INSENSITIVE:
+ draw_info.state = kThemeStateInactive;
+ break;
+
+ case GTK_STATE_SELECTED:
+ draw_info.state = kThemeStatePressed;
+ draw_info.adornment |= kThemeAdornmentFocus;
+ break;
+
+ case GTK_STATE_ACTIVE:
+ draw_info.state = kThemeStatePressed;
+ break;
+
+ default:
+ break;
+ }
+
+ rect = CGRectMake (x, y+1, width, height);
+
+ context = get_context (window, area);
+ if (!context)
+ return;
+
+ HIThemeDrawButton (&rect,
+ &draw_info,
+ context,
+ kHIThemeOrientationNormal,
+ NULL);
+
+ release_context (window, context);
+
+ return;
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]