Merge lp:~danrabbit/gala/workspace-switcher-tweaks into lp:gala

Proposed by Danielle Foré
Status: Merged
Merge reported by: Tom Beckmann
Merged at revision: not available
Proposed branch: lp:~danrabbit/gala/workspace-switcher-tweaks
Merge into: lp:gala
Diff against target: 121 lines (+17/-24)
1 file modified
src/Widgets/WorkspaceView.vala (+17/-24)
To merge this branch: bzr merge lp:~danrabbit/gala/workspace-switcher-tweaks
Reviewer Review Type Date Requested Status
Tom Beckmann Approve
Review via email: mp+108600@code.launchpad.net

Description of the change

Makes the workspace switcher shorter and tries to clean up the selection style.

Tile icon is temporarily commented out.

To post a comment you must log in.
Revision history for this message
Tom Beckmann (tombeckmann) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Widgets/WorkspaceView.vala'
2--- src/Widgets/WorkspaceView.vala 2012-06-04 14:03:33 +0000
3+++ src/Widgets/WorkspaceView.vala 2012-06-04 17:50:28 +0000
4@@ -44,7 +44,7 @@
5 current_workspace.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 300,
6 x : workspaces.x - 5 +
7 _workspace *
8- (workspaces.get_children ().nth_data (0).width + 10));
9+ (workspaces.get_children ().nth_data (0).width + 12));
10 }
11 }
12
13@@ -53,7 +53,7 @@
14 border-style: solid;
15 border-width: 1px 1px 1px 1px;
16 -unico-inner-stroke-width: 1px 0 1px 0;
17- border-radius: 5px;
18+ border-radius: 8px;
19
20 background-image: -gtk-gradient (linear,
21 left top,
22@@ -63,8 +63,8 @@
23
24 -unico-border-gradient: -gtk-gradient (linear,
25 left top, left bottom,
26- from (shade (@selected_bg_color, 1.05)),
27- to (shade (@selected_bg_color, 0.88)));
28+ from (alpha (#000, 0.5)),
29+ to (alpha (#000, 0.6)));
30
31 -unico-inner-stroke-gradient: -gtk-gradient (linear,
32 left top, left bottom,
33@@ -78,7 +78,7 @@
34 {
35 plugin = _plugin;
36
37- height = 200;
38+ height = 128;
39 opacity = 0;
40 scale_gravity = Clutter.Gravity.SOUTH_EAST;
41 reactive = true;
42@@ -194,7 +194,7 @@
43 height = area.height;
44
45 workspace_thumb = new Clutter.CairoTexture (120, 120);
46- workspace_thumb.height = 120;
47+ workspace_thumb.height = 80;
48 workspace_thumb.width = (workspace_thumb.height / height) * width;
49 workspace_thumb.auto_resize = true;
50 workspace_thumb.draw.connect (draw_workspace_thumb);
51@@ -219,7 +219,7 @@
52 } catch (Error e) { warning (e.message); }
53 add_child (workspace_thumb);
54 add_child (bg);
55- add_child (tile);
56+ /*add_child (tile);*/
57 add_child (current_workspace);
58 add_child (workspaces);
59
60@@ -228,29 +228,22 @@
61
62 bool draw_current_workspace (Cairo.Context cr)
63 {
64- current_workspace_style.get_style_context ().render_activity (cr, 0.5, 0.5,
65- current_workspace.width-1, current_workspace.height-1);
66+ current_workspace_style.get_style_context ().render_activity (cr, 0, 0,
67+ current_workspace.width, current_workspace.height);
68 return false;
69 }
70
71 bool draw_workspace_thumb (Cairo.Context cr)
72 {
73- Granite.Drawing.Utilities.cairo_rounded_rectangle (cr, 0.5, 0.5,
74- workspace_thumb.width-1, workspace_thumb.height-1, 5);
75- Gdk.cairo_set_source_pixbuf (cr, background_pix, 0.5, 0.5);
76+ Granite.Drawing.Utilities.cairo_rounded_rectangle (cr, 0, 0,
77+ workspace_thumb.width, workspace_thumb.height, 5);
78+ Gdk.cairo_set_source_pixbuf (cr, background_pix, 0, 0);
79 cr.fill_preserve ();
80
81 cr.set_line_width (1);
82- cr.set_source_rgba (0, 0, 0, 0.6);
83+ cr.set_source_rgba (0, 0, 0, 1);
84 cr.stroke_preserve ();
85
86- var grad = new Cairo.Pattern.linear (0, 0, 30, workspace_thumb.height-50);
87- grad.add_color_stop_rgba (0.99, 1, 1, 1, 0.2);
88- grad.add_color_stop_rgba (1, 1, 1, 1, 0);
89-
90- cr.set_source (grad);
91- cr.fill ();
92-
93 return false;
94 }
95
96@@ -266,11 +259,11 @@
97 cr.set_source_rgba (1, 1, 1, 0.5);
98 cr.stroke ();
99
100- var grad = new Cairo.Pattern.linear (0, 0, 0, 20);
101+ var grad = new Cairo.Pattern.linear (0, 0, 0, 15);
102 grad.add_color_stop_rgba (0, 0, 0, 0, 0.4);
103 grad.add_color_stop_rgba (1, 0, 0, 0, 0);
104
105- cr.rectangle (0, 1, width, 20);
106+ cr.rectangle (0, 1, width, 15);
107 cr.set_source (grad);
108 cr.fill ();
109
110@@ -358,10 +351,10 @@
111 icons.add_child (icon);
112 });
113
114+ group.add_child (backg);
115 group.add_child (icons);
116- group.add_child (backg);
117
118- icons.y = backg.height + 12;
119+ icons.y = backg.height - 16;
120 icons.x = group.width / 2 - icons.width / 2;
121 (icons.layout_manager as Clutter.BoxLayout).spacing = 6;
122

Subscribers

People subscribed via source and target branches