~niels-avonds/gala/gala-fix-1008188

« back to all changes in this revision

Viewing changes to src/Widgets/WorkspaceView.vala

  • Committer: Tom Beckmann
  • Date: 2012-06-04 18:27:34 UTC
  • Revision ID: tombeckmann@online.de-20120604182734-xb90chsrs4xojbee
Improved workspace indicator placement

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
                                _workspace = value;
44
44
                                current_workspace.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 300,
45
45
                                        x : workspaces.x - 5 + 
46
 
                                        _workspace *
47
 
                                        (workspaces.get_children ().nth_data (0).width + 12));
 
46
                                        _workspace * (workspaces.get_children ().nth_data (0).width + 10));
48
47
                        }
49
48
                }
50
49
                
80
79
                        
81
80
                        height = 128;
82
81
                        opacity = 0;
83
 
                        scale_gravity = Clutter.Gravity.SOUTH_EAST;
84
82
                        reactive = true;
85
83
                        
86
84
                        workspaces = new Clutter.Actor ();
108
106
                                warning (e.message);
109
107
                        }
110
108
                        
111
 
                        tile.x = 5;
112
 
                        tile.y = 5;
113
109
                        tile.reactive = true;
114
110
                        tile.button_release_event.connect (() => {
115
111
                                var windows = new GLib.List<Window> ();
188
184
                        
189
185
                        int width, height;
190
186
                        unowned Rectangle area;
191
 
 
 
187
                        
192
188
                        plugin.screen.get_monitor_geometry (plugin.screen.get_primary_monitor (), out area);
193
189
                        width = area.width;
194
 
                        height = area.height;                   
195
 
 
 
190
                        height = area.height;
 
191
                        
196
192
                        workspace_thumb = new Clutter.CairoTexture (120, 120);
197
193
                        workspace_thumb.height = 80;
198
194
                        workspace_thumb.width  = (workspace_thumb.height / height) * width;
219
215
                        } catch (Error e) { warning (e.message); }
220
216
                        add_child (workspace_thumb);
221
217
                        add_child (bg);
222
 
                        /*add_child (tile);*/
 
218
                        /*add_child (tile); removed for now until Luna+1 */
223
219
                        add_child (current_workspace);
224
220
                        add_child (workspaces);
225
221
                        
329
325
                                
330
326
                                var group = new Clutter.Actor ();
331
327
                                var icons = new Clutter.Actor ();
332
 
                                icons.set_layout_manager (new Clutter.BoxLayout ());                            
 
328
                                icons.set_layout_manager (new Clutter.BoxLayout ());
333
329
                                var backg = new Clutter.Clone (workspace_thumb);
334
330
                                
335
331
                                space.list_windows ().foreach ((w) => {
363
359
                                group.reactive = true;
364
360
                                group.button_release_event.connect (() => {
365
361
                                        space.activate (plugin.screen.get_display ().get_current_time ());
366
 
                                        current_workspace.animate (Clutter.AnimationMode.EASE_OUT_QUAD, 300,
367
 
                                                x : workspaces.x - 5 + 
368
 
                                                plugin.screen.get_active_workspace ().index () *
369
 
                                                (workspaces.get_children ().nth_data (0).width + 10));
 
362
                                        workspace = plugin.screen.get_active_workspace ().index ();
370
363
                                        hide ();
371
364
                                        return true;
372
365
                                });
376
369
                        workspaces.x = this.width / 2 - workspaces.width / 2;
377
370
                        workspaces.y = 25;
378
371
                        
379
 
                        current_workspace.x = workspaces.x - 5 + 
380
 
                                plugin.screen.get_active_workspace ().index () *
381
 
                                (workspaces.get_children ().nth_data (0).width + 10);
 
372
                        workspace = plugin.screen.get_active_workspace ().index ();
382
373
                        current_workspace.y = workspaces.y - 5;
383
374
                        
384
375
                        visible = true;