Allow status icons to receive clicks at edge of screen

This removes the border and padding and aligns the box to the top.  Perhaps we
could push the padding down into the active area of the icon since it does look
a bit nicer with it.

http://bugzilla.gnome.org/show_bug.cgi?id=583139
This commit is contained in:
William Jon McCann 2009-06-03 22:24:59 -04:00
parent 360338fe07
commit 361461d1b9

View File

@ -12,7 +12,7 @@ const Button = imports.ui.button;
const Main = imports.ui.main; const Main = imports.ui.main;
const PANEL_HEIGHT = 32; const PANEL_HEIGHT = 32;
const TRAY_HEIGHT = 28; const TRAY_HEIGHT = PANEL_HEIGHT - 1;
const SHADOW_HEIGHT = 6; const SHADOW_HEIGHT = 6;
// The panel has a transparent white background with a gradient. // The panel has a transparent white background with a gradient.
@ -34,7 +34,7 @@ PANEL_BUTTON_COLOR.from_pixel(0x00000015);
const PRESSED_BUTTON_BACKGROUND_COLOR = new Clutter.Color(); const PRESSED_BUTTON_BACKGROUND_COLOR = new Clutter.Color();
PRESSED_BUTTON_BACKGROUND_COLOR.from_pixel(0x00000030); PRESSED_BUTTON_BACKGROUND_COLOR.from_pixel(0x00000030);
const TRAY_PADDING = 2; const TRAY_PADDING = 0;
const TRAY_SPACING = 2; const TRAY_SPACING = 2;
// Used for the tray icon container with gtk pre-2.16, which doesn't // Used for the tray icon container with gtk pre-2.16, which doesn't
@ -44,7 +44,7 @@ TRAY_BACKGROUND_COLOR.from_pixel(0xefefefff);
const TRAY_BORDER_COLOR = new Clutter.Color(); const TRAY_BORDER_COLOR = new Clutter.Color();
TRAY_BORDER_COLOR.from_pixel(0x00000033); TRAY_BORDER_COLOR.from_pixel(0x00000033);
const TRAY_CORNER_RADIUS = 5; const TRAY_CORNER_RADIUS = 5;
const TRAY_BORDER_WIDTH = 1; const TRAY_BORDER_WIDTH = 0;
function Panel() { function Panel() {
this._init(); this._init();
@ -118,7 +118,7 @@ Panel.prototype = {
// The tray icons live in trayBox within trayContainer. // The tray icons live in trayBox within trayContainer.
// The trayBox is hidden when there are no tray icons. // The trayBox is hidden when there are no tray icons.
let trayContainer = new Big.Box({ orientation: Big.BoxOrientation.VERTICAL, let trayContainer = new Big.Box({ orientation: Big.BoxOrientation.VERTICAL,
y_align: Big.BoxAlignment.CENTER }); y_align: Big.BoxAlignment.START });
box.append(trayContainer, Big.BoxPackFlags.END); box.append(trayContainer, Big.BoxPackFlags.END);
let trayBox = new Big.Box({ orientation: Big.BoxOrientation.HORIZONTAL, let trayBox = new Big.Box({ orientation: Big.BoxOrientation.HORIZONTAL,
height: TRAY_HEIGHT, height: TRAY_HEIGHT,