diff options
| author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2014-02-18 15:51:49 +0100 |
|---|---|---|
| committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2014-02-18 18:28:09 +0100 |
| commit | 4352192c319e37cbeeeca0d60c6ef74731e48b05 (patch) | |
| tree | 7ef3fb3cff48e0269aa56e6aee163adc9c63ee67 | |
| parent | 6373ed59ca13e1c5a4aa438e03e6721dfb72d600 (diff) | |
| download | graynard-4352192c319e37cbeeeca0d60c6ef74731e48b05.tar.gz graynard-4352192c319e37cbeeeca0d60c6ef74731e48b05.zip | |
shell: stop using magic numbers and utilize new constants
| -rw-r--r-- | shell/gtk-shell.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/shell/gtk-shell.c b/shell/gtk-shell.c index 6cfd73b..e38abe9 100644 --- a/shell/gtk-shell.c +++ b/shell/gtk-shell.c @@ -92,17 +92,21 @@ desktop_shell_configure(void *data, /* TODO: make this height a little nicer */ window_height = height * PANEL_HEIGHT_RATIO; - gtk_window_resize (GTK_WINDOW (desktop->panel->window), 56, window_height); + gtk_window_resize (GTK_WINDOW (desktop->panel->window), + WESTON_GTK_PANEL_WIDTH, window_height); shell_helper_move_surface(desktop->helper, desktop->panel->surface, 0, (height - window_height) / 2); - gtk_window_resize (GTK_WINDOW (desktop->clock->window), 56*2.6, 56*2); + gtk_window_resize (GTK_WINDOW (desktop->clock->window), + WESTON_GTK_CLOCK_WIDTH, + WESTON_GTK_CLOCK_HEIGHT); shell_helper_move_surface(desktop->helper, desktop->clock->surface, - 56, (height - window_height) / 2); + WESTON_GTK_PANEL_WIDTH, + (height - window_height) / 2); desktop_shell_desktop_ready(desktop->shell); @@ -223,10 +227,10 @@ leave_panel_idle_cb (gpointer data) shell_helper_slide_surface(desktop->helper, desktop->panel->surface, - -31, 0); + WESTON_GTK_VERTICAL_CLOCK_WIDTH - WESTON_GTK_PANEL_WIDTH, 0); shell_helper_slide_surface(desktop->helper, desktop->clock->surface, - 25 - 56 - width, 0); + WESTON_GTK_VERTICAL_CLOCK_WIDTH - WESTON_GTK_PANEL_WIDTH - width, 0); weston_gtk_panel_set_expand(WESTON_GTK_PANEL(desktop->panel->window), FALSE); |
