=== modified file 'Do.Interface.Linux.Docky/src/Docky.Interface/Util.cs' --- Do.Interface.Linux.Docky/src/Docky.Interface/Util.cs 2009-01-05 06:42:10 +0000 +++ Do.Interface.Linux.Docky/src/Docky.Interface/Util.cs 2009-01-18 19:51:37 +0000 @@ -57,29 +57,39 @@ public static Surface GetBorderedTextSurface (string text, int max_width, Surface similar) { Surface sr; - sr = similar.CreateSimilar (similar.Content, max_width, 20); + sr = similar.CreateSimilar (similar.Content, max_width, 18); Context cr = new Context (sr); Pango.Layout layout = Pango.CairoHelper.CreateLayout (cr); - layout.FontDescription = Pango.FontDescription.FromString ("sans-serif bold"); + layout.FontDescription = Pango.FontDescription.FromString ("sans-serif 11"); layout.Width = Pango.Units.FromPixels (max_width); - layout.SetMarkup ("" + text + ""); + layout.SetMarkup (text); layout.Alignment = Pango.Alignment.Center; layout.Ellipsize = Pango.EllipsizeMode.End; Pango.Rectangle rect1, rect2; layout.GetExtents (out rect1, out rect2); - cr.SetRoundedRectanglePath (Pango.Units.ToPixels (rect2.X) - 10, 0, Pango.Units.ToPixels (rect2.Width) + 20, 20, 10); - cr.Color = new Cairo.Color (0.15, 0.15, 0.15, .6); + cr.SetRoundedRectanglePath (Pango.Units.ToPixels (rect2.X) - 10, 0, Pango.Units.ToPixels (rect2.Width) + 18, 18, 5); + cr.Color = new Cairo.Color (0.1, 0.1, 0.1, .75); cr.Fill (); + + Pango.Layout shadow = layout.Copy(); + cr.Translate(1,1); + Pango.CairoHelper.LayoutPath (cr, shadow); + cr.Color = new Cairo.Color (0, 0, 0, 0.75); + cr.Fill (); + cr.Translate(-1,-1); + Pango.CairoHelper.LayoutPath (cr, layout); cr.Color = new Cairo.Color (1, 1, 1); cr.Fill (); (cr as IDisposable).Dispose (); + shadow.FontDescription.Dispose (); + shadow.Dispose (); layout.FontDescription.Dispose (); layout.Dispose (); return sr;