~ubuntu-branches/ubuntu/precise/gnome-do/precise-backports

« back to all changes in this revision

Viewing changes to Do.Interface.Linux.Docky/src/Docky.Core/Docky.Core.Default/DrawingService.cs

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2009-06-27 10:40:45 UTC
  • mfrom: (1.1.8 upstream) (0.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090627104045-7st10y1cqr6dpz37
* New upstream release
  + No longer uses a plugin repository.  Fixes many plugin-
    related issues. (LP: #343096, LP: #330025, LP #345001)
  + No longer blocks on "About Do" (LP: #361679)
  + Reacts correctly when a Composite manager is enabled/
    disabled at runtime. (LP: #346347, LP: #390150)
  + Fixes for space reserved by Docky blocking drag and 
    drop operations. (LP: #354729, LP: #347052, LP: #382843)
  + Properly sets "Hidden" key on autostart files in response to 
    "Start on login" option.  (Closes: #526023) (LP: #369988)
* debian/patches/10_application_search_path:
  + Drop; included upstream
* debian/patches/10_sk_translation_update:
  + Import sk translation update from Debian BTS.
    (Closes: #531779)
* debian/patches/11_fix_autostart_when_directory_does_not_exist:
  + Patch from upstream.  Fixes the "Start on login" option when the 
    ~/.config/autostart directory does not exist. (LP: #393729)
* debian/control:
  + Update standards version to 3.8.2; no changes required.
  + Add libtool to Build-Depends; required for autoreconf.
  + Add Recommends: on new gnome-do-docklets package.
* debian/gnome-do.1
  + Fix spelling: GNOME-Do => GNOME Do.
  + Miscelaneous lintian fixes; NAME section, escaping minus signs with \-
* debian/copyright:
  + Update for new copyright holders.
  + Minor update to DEP-5 format

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
        {
28
28
                #region IDrawingService implementation 
29
29
                
30
 
                Pango.Layout GetThemedLayout ()
31
 
                {
32
 
                        Pango.Layout layout = new Pango.Layout (DockWindow.Window.CreatePangoContext ());
33
 
                        layout.FontDescription = DockWindow.Window.Style.FontDescription;
34
 
                        return layout;
 
30
                public int CurrentDockWidth {
 
31
                        get {
 
32
                                return 0;
 
33
                        }
 
34
                }
 
35
                
 
36
                public int CurrentDockHeight {
 
37
                        get {
 
38
                                return 0;
 
39
                        }
35
40
                }
36
41
                
37
42
                public Gdk.Rectangle TextPathAtPoint (TextRenderContext context)
38
43
                {
39
 
                        Cairo.Context cr = context.Context;
40
 
                        Gdk.Point point = context.LeftCenteredPoint;
41
 
                        
42
 
                        Pango.Layout layout = GetThemedLayout ();
43
 
                        layout.Width = Pango.Units.FromPixels (context.MaximumWidth);
44
 
                        layout.SetMarkup (context.Text);
45
 
                        layout.Ellipsize = context.EllipsizeMode;
46
 
                        layout.Alignment = context.Alignment;
47
 
                        layout.Wrap = context.WrapMode;
48
 
                        
49
 
                        if (context.FontSize != 0)
50
 
                                layout.FontDescription.Size = Pango.Units.FromPixels (context.FontSize);
51
 
                        
52
 
                        Pango.Rectangle rect1, rect2;
53
 
                        layout.GetExtents (out rect1, out rect2);
54
 
                        
55
 
                        int transY = point.Y - Pango.Units.ToPixels (rect2.Height) / 2;
56
 
                        cr.Translate (point.X, transY);
57
 
                        Pango.CairoHelper.LayoutPath (cr, layout);
58
 
                        cr.Translate (0 - point.X, 0 - transY);
59
 
                        
60
 
                        Gdk.Rectangle textArea = new Gdk.Rectangle (Pango.Units.ToPixels (rect2.X),
61
 
                                                                    Pango.Units.ToPixels (rect2.Y),
62
 
                                                                    Pango.Units.ToPixels (rect2.Width),
63
 
                                                                    Pango.Units.ToPixels (rect2.Height));
64
 
                        return textArea;
 
44
                        throw new Exception ("Default drawing service cannot render text");
65
45
                }
66
46
                
67
47
                #endregion