545 |
+ int y; |
+ int y; |
546 |
+ |
+ |
547 |
+ gtk_widget_get_allocation(widget, &allocation); |
+ gtk_widget_get_allocation(widget, &allocation); |
548 |
+ y = allocation.y; |
+ y = 0; |
549 |
|
|
550 |
- if (! GTK_WIDGET_DRAWABLE(widget)) |
- if (! GTK_WIDGET_DRAWABLE(widget)) |
551 |
+ if (! gtk_widget_is_drawable(widget)) |
+ if (! gtk_widget_is_drawable(widget)) |
557 |
Row *row = g_ptr_array_index(selfp->rows, i); |
Row *row = g_ptr_array_index(selfp->rows, i); |
558 |
int j; |
int j; |
559 |
- int x = widget->allocation.x; |
- int x = widget->allocation.x; |
560 |
+ int x = allocation.x; |
+ int x = 0; |
561 |
int column = 0; |
int column = 0; |
562 |
|
|
563 |
MN_ARRAY_FOREACH(j, row->cells) |
MN_ARRAY_FOREACH(j, row->cells) |
587 |
#line 109 "mn-tooltips.c" |
#line 109 "mn-tooltips.c" |
588 |
#line 308 "src/mn-tooltips.gob" |
#line 308 "src/mn-tooltips.gob" |
589 |
static void mn_tooltips_draw_tips (MNTooltips * self); |
static void mn_tooltips_draw_tips (MNTooltips * self); |
590 |
|
@@ -422,7 +422,13 @@ |
591 |
|
|
592 |
|
if (! selfp->window) |
593 |
|
{ |
594 |
|
+ GtkStyleContext *ctx; |
595 |
|
+ |
596 |
|
selfp->window = gtk_window_new(GTK_WINDOW_POPUP); |
597 |
|
+ |
598 |
|
+ ctx = gtk_widget_get_style_context(GTK_WIDGET(selfp->window)); |
599 |
|
+ gtk_style_context_add_class(ctx, "tooltip"); |
600 |
|
+ |
601 |
|
self_update_screen(self, TRUE); |
602 |
|
gtk_widget_set_app_paintable(selfp->window, TRUE); |
603 |
|
gtk_window_set_resizable(GTK_WINDOW(selfp->window), FALSE); |
604 |
@@ -430,7 +430,7 @@ |
@@ -430,7 +430,7 @@ |
605 |
gtk_container_set_border_width(GTK_CONTAINER(selfp->window), selfp->border_width); |
gtk_container_set_border_width(GTK_CONTAINER(selfp->window), selfp->border_width); |
606 |
|
|
628 |
{ |
{ |
629 |
#line 600 "mn-tooltips.c" |
#line 600 "mn-tooltips.c" |
630 |
#define __GOB_FUNCTION__ "MN:Tooltips::paint_window" |
#define __GOB_FUNCTION__ "MN:Tooltips::paint_window" |
631 |
@@ -608,13 +608,12 @@ |
@@ -608,18 +608,13 @@ |
632 |
|
|
633 |
GtkRequisition req; |
GtkRequisition req; |
634 |
|
|
635 |
- gtk_widget_size_request(selfp->window, &req); |
- gtk_widget_size_request(selfp->window, &req); |
636 |
- gtk_paint_flat_box(selfp->window->style, |
- gtk_paint_flat_box(selfp->window->style, |
637 |
- selfp->window->window, |
- selfp->window->window, |
638 |
+ gtk_widget_size_request(GTK_WIDGET(selfp), &req); |
- GTK_STATE_NORMAL, |
639 |
+ gtk_paint_flat_box(gtk_widget_get_style(GTK_WIDGET(selfp)), |
- GTK_SHADOW_OUT, |
640 |
+ cr, |
- NULL, |
|
GTK_STATE_NORMAL, |
|
|
GTK_SHADOW_OUT, |
|
|
NULL, |
|
641 |
- selfp->window, |
- selfp->window, |
642 |
"tooltip", |
- "tooltip", |
643 |
0, |
- 0, |
644 |
0, |
- 0, |
645 |
|
- req.width, |
646 |
|
- req.height); |
647 |
|
+ gtk_widget_size_request(GTK_WIDGET(selfp->window), &req); |
648 |
|
+ gtk_render_background(gtk_widget_get_style_context(GTK_WIDGET(selfp->window)), |
649 |
|
+ cr, |
650 |
|
+ 0, |
651 |
|
+ 0, |
652 |
|
+ req.width, |
653 |
|
+ req.height); |
654 |
|
|
655 |
|
return FALSE; |
656 |
|
}} |
657 |
@@ -651,10 +650,11 @@ |
@@ -651,10 +650,11 @@ |
658 |
gint monitor_num, px, py; |
gint monitor_num, px, py; |
659 |
GdkRectangle monitor; |
GdkRectangle monitor; |