~ubuntu-branches/ubuntu/trusty/gnome-do/trusty-proposed

« back to all changes in this revision

Viewing changes to Do.Interface.Linux.Docky/src/Docky.Interface/Docky.Interface.Painters/DockBackgroundRenderer.cs

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2009-03-13 18:00:35 UTC
  • mfrom: (1.1.6 upstream) (0.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090313180035-08lo8130dasdg7n8
Tags: 0.8.1.3-0ubuntu1
* New upstream release (LP: #344578).
  + Gnome Do causes keyboard keys to be remapped (LP: #308143)
  + Docky window too small when summoned (LP: #317381)
  + Minimize/Maximize does not work on all windows (LP: #317908)
  + Docky blocks drag and drop over large areas of the screen
    (LP: #318471)
  + Docky fails to autohide properly when changing themes
    (LP: #318672)
  + Paste via ctrl+v does not work in 1st pane (LP: #318922)
  + Autostart is in wrong assembly (LP: #319114)
  + Docky has no results list (LP: #319797)
  + Docky trash applet does not reflect current state
    (LP: #320621)
  + Docky panels splits into two when over filled (LP: #324648)
  + Docky ui division is inconsistent and confusing
    (LP: #324718)
  + poor performance with two screens (LP: #323294)
  + Docky trash applet doesn't check if trash exists
    (LP: #323453)
  + docky panel splits into two when overfilled (LP: #324648)
  + Docky's UI division is inconsistent and confusing
    (LP: #324718)
  + Do crashes when using a pastebin launcher with docky
    (LP: #325178)
  + Make docky aware of icon theme switch (LP: #328721)
  + Docky doesn't update icon status for some apps that minimize
    to system tray. (LP: #329120)
  + Docky does not work properly with pull-down window
    (LP: #334663)
  + sensitivity of zooming the icons in the dock isn't
    configurable (LP: #336214)
  + Regression: In 0.8.1, "Request attention" is no longer
    indicated (LP: #337594)
  + Clock's Calendar mode auto-hides when leaving the bounds of
    the original dock (LP: #337783)
  + gnome-do does not notice change of icon theme (LP: #204368)
  + Thumbnails are never displayed when files have spaces in
    their names (LP: #311551)
  + Open improperly escapes URLs. (LP: #317416)
  + Docky: Right-click dialog appears on wrong monitor
    (LP: #319062)
  + Dragging items off Docky possible in summon mode
    (LP: #319452)
  + Docky shows icon according to the filename (LP: #320892)
  + Mouse click inactive when Do(cky) is summoned (LP: #324937)
  + Docky trash don't have a right-click menu (LP: #317947)
  + Polish docky's window name labels (LP: #318487)
  + Docky: Scroll on window icon should switch between windows
    of that app (LP: #319805)
  + Docky does not preserve window stack (z?) order when
    switching apps by clicking on app icon (LP: #326661)
  + Docky window switching should be easier. (LP: #327079)
  + Color of indicators on Docky cannot be changed
    (LP: #332936)
  + Do's ResultWindow is using wrong text color (LP: #288771)
  + Docky won't unhide after rev 1053 (LP: #337113)
  + Do's icon label in Docky should be "GNOME Do" instead of
    "Summon GNOME Do" (LP: #338496)
* Build against gtk, gnome mono packages from Experimental.
* debian/control:
  + Bump versioned dep on libgtk2.0-cil to ensure
    Gdk.Screen.IsComposited exists
  + Add libwnck2.20-cil build-dep
  + Add librsvg2-2.18-cil build-dep
  + gnome-sharp2 transition.
* debian/patches/03_show_in_all_DEs
  + Drop; fixed in new upstream
* debian/gnome-do.1
  + Update for new version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// DockBackgroundRenderer.cs
 
2
// 
 
3
// Copyright (C) 2008 GNOME Do
 
4
//
 
5
// This program is free software: you can redistribute it and/or modify
 
6
// it under the terms of the GNU General Public License as published by
 
7
// the Free Software Foundation, either version 3 of the License, or
 
8
// (at your option) any later version.
 
9
//
 
10
// This program is distributed in the hope that it will be useful,
 
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
// GNU General Public License for more details.
 
14
//
 
15
// You should have received a copy of the GNU General Public License
 
16
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
//
 
18
 
 
19
using System;
 
20
using System.Collections.Generic;
 
21
 
 
22
using Cairo;
 
23
using Gdk;
 
24
 
 
25
using Do.Interface.CairoUtils;
 
26
 
 
27
using Docky.Utilities;
 
28
 
 
29
namespace Docky.Interface.Painters
 
30
{
 
31
        
 
32
        
 
33
        public static class DockBackgroundRenderer
 
34
        {
 
35
                static Surface sr;
 
36
                static int height;
 
37
                
 
38
                const int ShineWidth = 120;
 
39
                const int width = 1500;
 
40
                
 
41
                public static void RenderDockBackground (Context context, Gdk.Rectangle dockArea)
 
42
                {
 
43
                        if (sr == null || dockArea.Height != height) {
 
44
                                
 
45
                                if (sr != null)
 
46
                                        sr.Destroy ();
 
47
                                
 
48
                                height = dockArea.Height;
 
49
                                sr = context.Target.CreateSimilar (context.Target.Content, width, dockArea.Height);
 
50
                                
 
51
                                using (Context cr = new Context (sr)) {
 
52
                                        cr.SetRoundedRectanglePath (.5, .5, width - 1, height + 40, 5); // fall off the bottom
 
53
                                        cr.Color = new Cairo.Color (0.1, 0.1, 0.1, .75);
 
54
                                        cr.FillPreserve ();
 
55
                        
 
56
                                        // gives the dock a "lifted" look and feel
 
57
                                        cr.Color = new Cairo.Color (0, 0, 0, .6);
 
58
                                        cr.LineWidth = 1;
 
59
                                        cr.Stroke ();
 
60
                        
 
61
                                        cr.SetRoundedRectanglePath (1.5, 1.5, width - 3, height + 40, 5);
 
62
                                        LinearGradient lg = new LinearGradient (0, 1.5, 0, 10);
 
63
                                        lg.AddColorStop (0, new Cairo.Color (1, 1, 1, .4));
 
64
                                        lg.AddColorStop (1, new Cairo.Color (1, 1, 1, 0));
 
65
                                        cr.Pattern = lg;
 
66
                                        cr.LineWidth = 1;
 
67
                                        cr.Stroke ();
 
68
                                
 
69
                                        lg.Destroy ();
 
70
                                }
 
71
                        }
 
72
                        
 
73
                        switch (DockPreferences.Orientation) {
 
74
                        case DockOrientation.Bottom:
 
75
                                RenderBackground (context, dockArea);
 
76
                                break;
 
77
                        case DockOrientation.Top:
 
78
                                context.Scale (1, -1);
 
79
                                context.Translate (0, 0 - (dockArea.Height + dockArea.Y));
 
80
                                
 
81
                                RenderBackground (context, dockArea);
 
82
                                
 
83
                                context.Translate (0, dockArea.Height + dockArea.Y);
 
84
                                context.Scale (1, -1);
 
85
                                break;
 
86
                        }
 
87
                }
 
88
 
 
89
                static void RenderBackground (Context context, Gdk.Rectangle dockArea)
 
90
                {
 
91
                        context.SetSource (sr, dockArea.X, dockArea.Y);
 
92
                        context.Rectangle (dockArea.X, dockArea.Y, dockArea.Width / 2, dockArea.Height);
 
93
                        context.Fill ();
 
94
                        
 
95
                        context.SetSource (sr, dockArea.X + dockArea.Width - width, dockArea.Y);
 
96
                        context.Rectangle (dockArea.X + dockArea.Width / 2, dockArea.Y, dockArea.Width - dockArea.Width / 2, dockArea.Height);
 
97
                        context.Fill ();
 
98
                }
 
99
        }
 
100
}