diff options
author | Matthias Clasen <maclas@gmx.de> | 2004-02-03 00:40:56 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-02-03 00:40:56 +0000 |
commit | 6c935950b2ca743f59bc99a0ae43a45b6ec2e303 (patch) | |
tree | 1e15ca112078b860f928c8191dee83ba1f2c1587 /gtk/gtkstyle.c | |
parent | 01440e457e1048196a412d786b4cce4f238002a2 (diff) | |
download | gtk+-6c935950b2ca743f59bc99a0ae43a45b6ec2e303.tar.gz |
Clip narrow columns in rtl-oriented tree views (#128089,
Tue Feb 3 01:38:06 2004 Matthias Clasen <maclas@gmx.de>
Clip narrow columns in rtl-oriented tree views (#128089,
chinen@jp.ibm.com):
* gtk/gtkstyle.c (gtk_default_draw_option):
* gtk/gtkstyle.c (gtk_default_draw_check): Clip to the
given area.
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
Use the right clip area when calling gtk_cell_renderer_render().
* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_cell_draw_focus):
Use the right clip area when calling gtk_paint_focus().
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render):
Use the right clip area when calling gtk_paint_toggle() or
gtk_paint_check().
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render):
Clip to the expose_area when drawing the background rectangle.
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r-- | gtk/gtkstyle.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 1e70a4e4da..0bdb73ed64 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -3681,16 +3681,25 @@ gtk_default_draw_check (GtkStyle *style, { if (detail && strcmp (detail, "cellcheck") == 0) { + if (area) + gdk_gc_set_clip_rectangle (widget->style->base_gc[state_type], area); gdk_draw_rectangle (window, widget->style->base_gc[state_type], TRUE, x, y, width, height); + if (area) + { + gdk_gc_set_clip_rectangle (widget->style->base_gc[state_type], NULL); + gdk_gc_set_clip_rectangle (widget->style->text_gc[state_type], area); + } gdk_draw_rectangle (window, widget->style->text_gc[state_type], FALSE, x, y, width, height); + if (area) + gdk_gc_set_clip_rectangle (widget->style->text_gc[state_type], NULL); x -= (1 + INDICATOR_PART_SIZE - width) / 2; y -= (((1 + INDICATOR_PART_SIZE - height) / 2) - 1); @@ -3773,6 +3782,8 @@ gtk_default_draw_option (GtkStyle *style, { if (detail && strcmp (detail, "cellradio") == 0) { + if (area) + gdk_gc_set_clip_rectangle (widget->style->fg_gc[state_type], area); gdk_draw_arc (window, widget->style->fg_gc[state_type], FALSE, @@ -3797,6 +3808,8 @@ gtk_default_draw_option (GtkStyle *style, draw_part (window, widget->style->fg_gc[state_type], area, x, y, CHECK_INCONSISTENT_TEXT); } + if (area) + gdk_gc_set_clip_rectangle (widget->style->fg_gc[state_type], NULL); } else { |