[hyena] [Hyena.Gui] Fix TextBlock tooltips



commit 0012b67bf7081fc2ee5ae61f6b1a202103a8ede4
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Wed Dec 15 14:52:21 2010 -0600

    [Hyena.Gui] Fix TextBlock tooltips
    
    Were previosly set in Arrange, but now we don't arrange every time we
    change the model, so we need to set it on render.

 Hyena.Gui/Hyena.Gui.Canvas/TextBlock.cs |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Gui.Canvas/TextBlock.cs b/Hyena.Gui/Hyena.Gui.Canvas/TextBlock.cs
index 53b77ff..1b8a87c 100644
--- a/Hyena.Gui/Hyena.Gui.Canvas/TextBlock.cs
+++ b/Hyena.Gui/Hyena.Gui.Canvas/TextBlock.cs
@@ -146,12 +146,6 @@ namespace Hyena.Gui.Canvas
 
             layout.GetPixelSize (out text_width, out text_height);
 
-            if (layout.IsEllipsized || text_width > RenderSize.Width || text_height > RenderSize.Height) {
-                TooltipMarkup = last_formatted_text;
-            } else {
-                TooltipMarkup = null;
-            }
-
             Rect new_alloc = new Rect (
                 Math.Round ((RenderSize.Width - text_width) * HorizontalAlignment),
                 Math.Round ((RenderSize.Height - text_height) * VerticalAlignment),
@@ -207,6 +201,8 @@ namespace Hyena.Gui.Canvas
             Pango.CairoHelper.ShowLayout (cr, layout);
             cr.Fill ();
 
+            TooltipMarkup = layout.IsEllipsized ? last_formatted_text : null;
+
             if (fade) {
                 LinearGradient mask = new LinearGradient (RenderSize.Width - 20, 0, RenderSize.Width, 0);
                 mask.AddColorStop (0, new Color (0, 0, 0, 1));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]