fixed pixmap clipping in gtkclist
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
|
||||
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
|
||||
finally.
|
||||
|
||||
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
|
||||
[1-1-0-Merge]
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
|
||||
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
|
||||
finally.
|
||||
|
||||
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
|
||||
[1-1-0-Merge]
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
|
||||
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
|
||||
finally.
|
||||
|
||||
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
|
||||
[1-1-0-Merge]
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
|
||||
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
|
||||
finally.
|
||||
|
||||
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
|
||||
[1-1-0-Merge]
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
|
||||
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
|
||||
finally.
|
||||
|
||||
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
|
||||
[1-1-0-Merge]
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
|
||||
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
|
||||
finally.
|
||||
|
||||
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
|
||||
[1-1-0-Merge]
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
|
||||
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
|
||||
finally.
|
||||
|
||||
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
|
||||
[1-1-0-Merge]
|
||||
|
||||
|
||||
@@ -2679,6 +2679,26 @@ draw_row (GtkCList * clist,
|
||||
ydest = (clip_rectangle.y + (clip_rectangle.height / 2)) - height / 2 +
|
||||
clist_row->cell[i].vertical;
|
||||
|
||||
if (xdest < clip_rectangle.x)
|
||||
{
|
||||
xsrc = clip_rectangle.x - xdest;
|
||||
pixmap_width -= xsrc;
|
||||
xdest = clip_rectangle.x;
|
||||
}
|
||||
|
||||
if (xdest + pixmap_width > clip_rectangle.x + clip_rectangle.width)
|
||||
pixmap_width = (clip_rectangle.x + clip_rectangle.width) - xdest;
|
||||
|
||||
if (ydest < clip_rectangle.y)
|
||||
{
|
||||
ysrc = clip_rectangle.y - ydest;
|
||||
height -= ysrc;
|
||||
ydest = clip_rectangle.y;
|
||||
}
|
||||
|
||||
if (ydest + height > clip_rectangle.y + clip_rectangle.height)
|
||||
height = (clip_rectangle.y + clip_rectangle.height) - ydest;
|
||||
|
||||
if (GTK_CELL_PIXMAP (clist_row->cell[i])->mask)
|
||||
{
|
||||
gdk_gc_set_clip_mask (fg_gc, GTK_CELL_PIXMAP (clist_row->cell[i])->mask);
|
||||
@@ -2707,6 +2727,26 @@ draw_row (GtkCList * clist,
|
||||
ydest = (clip_rectangle.y + (clip_rectangle.height / 2)) - height / 2 +
|
||||
clist_row->cell[i].vertical;
|
||||
|
||||
if (xdest < clip_rectangle.x)
|
||||
{
|
||||
xsrc = clip_rectangle.x - xdest;
|
||||
pixmap_width -= xsrc;
|
||||
xdest = clip_rectangle.x;
|
||||
}
|
||||
|
||||
if (xdest + pixmap_width > clip_rectangle.x + clip_rectangle.width)
|
||||
pixmap_width = (clip_rectangle.x + clip_rectangle.width) - xdest;
|
||||
|
||||
if (ydest < clip_rectangle.y)
|
||||
{
|
||||
ysrc = clip_rectangle.y - ydest;
|
||||
height -= ysrc;
|
||||
ydest = clip_rectangle.y;
|
||||
}
|
||||
|
||||
if (ydest + height > clip_rectangle.y + clip_rectangle.height)
|
||||
height = (clip_rectangle.y + clip_rectangle.height) - ydest;
|
||||
|
||||
if (GTK_CELL_PIXTEXT (clist_row->cell[i])->mask)
|
||||
{
|
||||
gdk_gc_set_clip_mask (fg_gc, GTK_CELL_PIXTEXT (clist_row->cell[i])->mask);
|
||||
|
||||
Reference in New Issue
Block a user