~ricotz/plank/wayland

« back to all changes in this revision

Viewing changes to lib/PositionManager.vala

  • Committer: Rico Tzschichholz
  • Date: 2015-11-16 20:45:10 UTC
  • Revision ID: ricotz@ubuntu.com-20151116204510-y18jvw2b1lg4ivkw
theme: Add "CascadeHide" option

If true it will cause background and icons to unhide/hide with different
speeds so they will leave/hit the screen-edge at the same time.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1432
1432
                }
1433
1433
                
1434
1434
                /**
 
1435
                 * Get's the padding between background and icons of the dock.
 
1436
                 *
 
1437
                 * @param x the horizontal padding
 
1438
                 * @param y the vertical padding
 
1439
                 */
 
1440
                public void get_background_padding (out int x, out int y)
 
1441
                {
 
1442
                        switch (Position) {
 
1443
                        default:
 
1444
                        case Gtk.PositionType.BOTTOM:
 
1445
                                x = 0;
 
1446
                                y = VisibleDockHeight - DockBackgroundHeight + extra_hide_offset;
 
1447
                                break;
 
1448
                        case Gtk.PositionType.TOP:
 
1449
                                x = 0;
 
1450
                                y = -(VisibleDockHeight - DockBackgroundHeight + extra_hide_offset);
 
1451
                                break;
 
1452
                        case Gtk.PositionType.LEFT:
 
1453
                                x = -(VisibleDockWidth - DockBackgroundWidth + extra_hide_offset);
 
1454
                                y = 0;
 
1455
                                break;
 
1456
                        case Gtk.PositionType.RIGHT:
 
1457
                                x = VisibleDockWidth - DockBackgroundWidth + extra_hide_offset;
 
1458
                                y = 0;
 
1459
                                break;
 
1460
                        }
 
1461
                }
 
1462
                
 
1463
                /**
1435
1464
                 * Get's the region for background of the dock.
1436
1465
                 *
1437
1466
                 * @return the region for the dock background