Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix alignment of items in tooltip when using GTK2

  • Loading branch information...
commit 2c30ae319ba3ae14d19899b0e53b9f32c6357e6d 1 parent 4656db1
@epienbroek authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 src/mn-text-table.gob
View
14 src/mn-text-table.gob
@@ -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;
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.