forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
01440e457e
commit
6c935950b2
19
ChangeLog
19
ChangeLog
@ -1,3 +1,22 @@
|
||||
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.
|
||||
|
||||
Tue Feb 3 00:14:36 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gdk/x11/gdkgeometry-x11.c (queue_item_free, gdk_window_queue):
|
||||
|
@ -1,3 +1,22 @@
|
||||
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.
|
||||
|
||||
Tue Feb 3 00:14:36 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gdk/x11/gdkgeometry-x11.c (queue_item_free, gdk_window_queue):
|
||||
|
@ -1,3 +1,22 @@
|
||||
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.
|
||||
|
||||
Tue Feb 3 00:14:36 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gdk/x11/gdkgeometry-x11.c (queue_item_free, gdk_window_queue):
|
||||
|
@ -1,3 +1,22 @@
|
||||
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.
|
||||
|
||||
Tue Feb 3 00:14:36 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gdk/x11/gdkgeometry-x11.c (queue_item_free, gdk_window_queue):
|
||||
|
@ -1,3 +1,22 @@
|
||||
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.
|
||||
|
||||
Tue Feb 3 00:14:36 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gdk/x11/gdkgeometry-x11.c (queue_item_free, gdk_window_queue):
|
||||
|
@ -1371,6 +1371,7 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
|
||||
|
||||
gtk_cell_renderer_text_get_size (cell, widget, cell_area, &x_offset, &y_offset, NULL, NULL);
|
||||
|
||||
|
||||
if ((flags & GTK_CELL_RENDERER_SELECTED) == GTK_CELL_RENDERER_SELECTED)
|
||||
{
|
||||
if (GTK_WIDGET_HAS_FOCUS (widget))
|
||||
@ -1398,7 +1399,9 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
|
||||
gc = gdk_gc_new (window);
|
||||
|
||||
gdk_gc_set_rgb_fg_color (gc, &color);
|
||||
|
||||
|
||||
if (expose_area)
|
||||
gdk_gc_set_clip_rectangle (gc, expose_area);
|
||||
gdk_draw_rectangle (window,
|
||||
gc,
|
||||
TRUE,
|
||||
@ -1406,7 +1409,8 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
|
||||
background_area->y,
|
||||
background_area->width,
|
||||
background_area->height);
|
||||
|
||||
if (expose_area)
|
||||
gdk_gc_set_clip_rectangle (gc, NULL);
|
||||
g_object_unref (gc);
|
||||
}
|
||||
|
||||
@ -1414,7 +1418,7 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
|
||||
window,
|
||||
state,
|
||||
TRUE,
|
||||
cell_area,
|
||||
expose_area,
|
||||
widget,
|
||||
"cellrenderertext",
|
||||
cell_area->x + x_offset + cell->xpad,
|
||||
|
@ -359,7 +359,7 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
|
||||
gtk_paint_option (widget->style,
|
||||
window,
|
||||
state, shadow,
|
||||
cell_area, widget, "cellradio",
|
||||
expose_area, widget, "cellradio",
|
||||
cell_area->x + x_offset + cell->xpad,
|
||||
cell_area->y + y_offset + cell->ypad,
|
||||
width - 1, height - 1);
|
||||
@ -369,7 +369,7 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
|
||||
gtk_paint_check (widget->style,
|
||||
window,
|
||||
state, shadow,
|
||||
cell_area, widget, "cellcheck",
|
||||
expose_area, widget, "cellcheck",
|
||||
cell_area->x + x_offset + cell->xpad,
|
||||
cell_area->y + y_offset + cell->ypad,
|
||||
width - 1, height - 1);
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -2621,6 +2621,7 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
|
||||
GList *list;
|
||||
GdkRectangle real_cell_area;
|
||||
GdkRectangle real_background_area;
|
||||
GdkRectangle real_expose_area = *cell_area;
|
||||
gint expand_cell_count = 0;
|
||||
gint full_requested_width = 0;
|
||||
gint extra_space;
|
||||
@ -2737,7 +2738,7 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
|
||||
tree_column->tree_view,
|
||||
&rtl_background_area,
|
||||
&rtl_cell_area,
|
||||
expose_area,
|
||||
&real_expose_area,
|
||||
flags);
|
||||
}
|
||||
|
||||
@ -2892,7 +2893,7 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column,
|
||||
tree_column->tree_view,
|
||||
&rtl_background_area,
|
||||
&rtl_cell_area,
|
||||
expose_area,
|
||||
&real_expose_area,
|
||||
flags);
|
||||
}
|
||||
/* FOCUS */
|
||||
@ -3350,7 +3351,7 @@ _gtk_tree_view_column_cell_draw_focus (GtkTreeViewColumn *tree_column,
|
||||
gtk_paint_focus (tree_column->tree_view->style,
|
||||
window,
|
||||
cell_state,
|
||||
NULL,
|
||||
cell_area,
|
||||
tree_column->tree_view,
|
||||
"treeview",
|
||||
focus_rectangle.x,
|
||||
|
Loading…
Reference in New Issue
Block a user