Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

Commit

Permalink
Fix alignment of items in tooltip when using GTK2
Browse files Browse the repository at this point in the history
  • Loading branch information
epienbroek committed Nov 25, 2012
1 parent 4656db1 commit 2c30ae3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/mn-text-table.gob
Expand Up @@ -144,12 +144,14 @@ class MN:Text:Table from Mn:Widget
draw_internal(GtkWidget *widget, GdkEventExpose *event, cairo_t *cr)
{
Self *self = SELF(widget);
GtkAllocation allocation;
int i;
int y;

gtk_widget_get_allocation(widget, &allocation);
#if GTK_CHECK_VERSION(3,0,0)
y = 0;
#else
y = widget->allocation.y;
#endif

if (! gtk_widget_is_drawable(widget))
return FALSE;
Expand All @@ -160,9 +162,15 @@ class MN:Text:Table from Mn:Widget
{
Row *row = g_ptr_array_index(selfp->rows, i);
int j;
int x = 0;
int x;
int column = 0;

#if GTK_CHECK_VERSION(3,0,0)
x = 0;
#else
x = widget->allocation.x;
#endif

MN_ARRAY_FOREACH(j, row->cells)
{
MNTextTableCell *cell = g_ptr_array_index(row->cells, j);
Expand Down

0 comments on commit 2c30ae3

Please sign in to comment.