Launcher: fix layout on vertical panels
This commit is contained in:
parent
6a1b2f0610
commit
ceb6a44238
1 changed files with 14 additions and 0 deletions
|
@ -64,6 +64,8 @@ void launcher_reload_hidden_icons(Launcher *launcher);
|
|||
void launcher_icon_on_change_layout(void *obj);
|
||||
int launcher_compute_desired_size(void *obj);
|
||||
|
||||
void relayout_launcher();
|
||||
|
||||
void default_launcher()
|
||||
{
|
||||
launcher_enabled = 0;
|
||||
|
@ -95,6 +97,7 @@ void init_launcher_panel(void *p)
|
|||
launcher->area._draw_foreground = NULL;
|
||||
launcher->area.size_mode = LAYOUT_FIXED;
|
||||
launcher->area._resize = resize_launcher;
|
||||
launcher->area._on_change_layout = relayout_launcher;
|
||||
launcher->area._compute_desired_size = launcher_compute_desired_size;
|
||||
launcher->area.resize_needed = 1;
|
||||
schedule_redraw(&launcher->area);
|
||||
|
@ -325,6 +328,17 @@ gboolean resize_launcher(void *obj)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void relayout_launcher(void *obj)
|
||||
{
|
||||
Launcher *launcher = (Launcher *)obj;
|
||||
for (GSList *l = launcher->list_icons; l; l = l->next) {
|
||||
LauncherIcon *launcherIcon = (LauncherIcon *)l->data;
|
||||
if (!launcherIcon->area.on_screen)
|
||||
continue;
|
||||
launcher_icon_on_change_layout(launcherIcon);
|
||||
}
|
||||
}
|
||||
|
||||
// Here we override the default layout of the icons; normally Area layouts its children
|
||||
// in a stack; we need to layout them in a kind of table
|
||||
void launcher_icon_on_change_layout(void *obj)
|
||||
|
|
Loading…
Reference in a new issue