Permalink
Browse files

Make sure the tray icon is drawn initially with the correct dimensions

  • Loading branch information...
1 parent 9213685 commit 45d11d228099c7b22409168c581989cec0a1583c @epienbroek committed Feb 10, 2013
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/mn-mail-icon-widget.gob
@@ -107,6 +107,8 @@ class MN:Mail:Icon:Widget from Mn:Widget
{
Self *self = SELF(widget);
GdkPixbuf *pixbuf;
+ static int prev_width = 0;
+ static int prev_height = 0;
pixbuf = self_render_icon(self);
@@ -119,6 +121,14 @@ class MN:Mail:Icon:Widget from Mn:Widget
requisition->width = 0;
requisition->height = 0;
}
+
+ if (prev_width != requisition->width ||
+ prev_height != requisition->height) {
+
+ prev_width = requisition->width;
+ prev_height = requisition->height;
+ gtk_widget_queue_draw(GTK_WIDGET(self));
+ }
}
override (Mn:Widget) void

0 comments on commit 45d11d2

Please sign in to comment.