Launcher icon background
This commit is contained in:
parent
294fdee57f
commit
9e2fbec797
12 changed files with 1563 additions and 1435 deletions
|
@ -761,6 +761,11 @@ void add_entry (char *key, char *value)
|
|||
id = (id < backgrounds->len && id >= 0) ? id : 0;
|
||||
panel_config.launcher.area.bg = &g_array_index(backgrounds, Background, id);
|
||||
}
|
||||
else if (strcmp (key, "launcher_icon_background_id") == 0) {
|
||||
int id = atoi (value);
|
||||
id = (id < backgrounds->len && id >= 0) ? id : 0;
|
||||
launcher_icon_bg = &g_array_index(backgrounds, Background, id);
|
||||
}
|
||||
else if (strcmp(key, "launcher_icon_size") == 0) {
|
||||
launcher_max_icon_size = atoi(value);
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ char *icon_theme_name_xsettings;
|
|||
int launcher_icon_theme_override;
|
||||
XSettingsClient *xsettings_client;
|
||||
int startup_notifications;
|
||||
Background *launcher_icon_bg;
|
||||
|
||||
Imlib_Image scale_icon(Imlib_Image original, int icon_size);
|
||||
void free_icon(Imlib_Image icon);
|
||||
|
@ -70,6 +71,7 @@ void default_launcher()
|
|||
launcher_icon_theme_override = 0;
|
||||
xsettings_client = NULL;
|
||||
startup_notifications = 0;
|
||||
launcher_icon_bg = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -97,6 +99,9 @@ void init_launcher_panel(void *p)
|
|||
if (!launcher->area.bg)
|
||||
launcher->area.bg = &g_array_index(backgrounds, Background, 0);
|
||||
|
||||
if (!launcher_icon_bg)
|
||||
launcher_icon_bg = &g_array_index(backgrounds, Background, 0);
|
||||
|
||||
// check consistency
|
||||
if (launcher->list_apps == NULL)
|
||||
return;
|
||||
|
@ -427,7 +432,7 @@ void launcher_load_icons(Launcher *launcher)
|
|||
launcherIcon->area.resize = 0;
|
||||
launcherIcon->area.redraw = 1;
|
||||
launcherIcon->area.mouse_effects = 1;
|
||||
launcherIcon->area.bg = &g_array_index(backgrounds, Background, 0);
|
||||
launcherIcon->area.bg = launcher_icon_bg;
|
||||
launcherIcon->area.on_screen = 1;
|
||||
launcherIcon->area._on_change_layout = launcher_icon_on_change_layout;
|
||||
if (launcher_tooltip_enabled) {
|
||||
|
|
|
@ -44,6 +44,7 @@ extern char *icon_theme_name_config;
|
|||
extern int launcher_icon_theme_override;
|
||||
extern XSettingsClient *xsettings_client;
|
||||
extern int startup_notifications;
|
||||
extern Background *launcher_icon_bg;
|
||||
|
||||
// default global data
|
||||
void default_launcher();
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -117,7 +117,7 @@ GtkWidget *launcher_apps_dirs;
|
|||
GtkWidget *launcher_icon_size, *launcher_icon_theme, *launcher_padding_x, *launcher_padding_y, *launcher_spacing;
|
||||
GtkWidget *launcher_icon_opacity, *launcher_icon_saturation, *launcher_icon_brightness;
|
||||
GtkWidget *margin_x, *margin_y;
|
||||
GtkWidget *launcher_background;
|
||||
GtkWidget *launcher_background, *launcher_icon_background;
|
||||
GtkWidget *startup_notifications;
|
||||
IconThemeWrapper *icon_theme;
|
||||
GtkWidget *launcher_tooltip;
|
||||
|
@ -2309,6 +2309,20 @@ void create_launcher(GtkWidget *parent)
|
|||
gtk_tooltips_set_tip(tooltips, launcher_background, _("Selects the background used to display the launcher. "
|
||||
"Backgrounds can be edited in the Backgrounds tab."), NULL);
|
||||
|
||||
row++, col = 2;
|
||||
label = gtk_label_new(_("Icon background"));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
|
||||
gtk_widget_show(label);
|
||||
gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||
col++;
|
||||
|
||||
launcher_icon_background = create_background_combo(_("Launcher icon"));
|
||||
gtk_widget_show(launcher_icon_background);
|
||||
gtk_table_attach(GTK_TABLE(table), launcher_icon_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
|
||||
col++;
|
||||
gtk_tooltips_set_tip(tooltips, launcher_icon_background, _("Selects the background used to display the launcher icon. "
|
||||
"Backgrounds can be edited in the Backgrounds tab."), NULL);
|
||||
|
||||
row++, col = 2;
|
||||
label = gtk_label_new(_("Horizontal padding"));
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
|
||||
|
|
|
@ -128,7 +128,7 @@ extern GtkWidget *launcher_apps_dirs;
|
|||
extern GtkWidget *launcher_icon_size, *launcher_icon_theme, *launcher_padding_x, *launcher_padding_y, *launcher_spacing;
|
||||
extern GtkWidget *launcher_icon_opacity, *launcher_icon_saturation, *launcher_icon_brightness;
|
||||
extern GtkWidget *margin_x, *margin_y;
|
||||
extern GtkWidget *launcher_background;
|
||||
extern GtkWidget *launcher_background, *launcher_icon_background;
|
||||
extern GtkWidget *startup_notifications;
|
||||
extern IconThemeWrapper *icon_theme;
|
||||
extern GtkWidget *launcher_tooltip;
|
||||
|
|
|
@ -479,6 +479,7 @@ void config_write_launcher(FILE *fp)
|
|||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_padding_y)),
|
||||
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_spacing)));
|
||||
fprintf(fp, "launcher_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(launcher_background)));
|
||||
fprintf(fp, "launcher_icon_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(launcher_icon_background)));
|
||||
fprintf(fp, "launcher_icon_size = %d\n", (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_icon_size)));
|
||||
fprintf(fp,
|
||||
"launcher_icon_asb = %d %d %d\n",
|
||||
|
@ -1358,6 +1359,10 @@ void add_entry(char *key, char *value)
|
|||
int id = background_index_safe(atoi(value));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(launcher_background), id);
|
||||
}
|
||||
else if (strcmp(key, "launcher_icon_background_id") == 0) {
|
||||
int id = background_index_safe(atoi(value));
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(launcher_icon_background), id);
|
||||
}
|
||||
else if (strcmp(key, "launcher_icon_size") == 0) {
|
||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(launcher_icon_size), atoi(value));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue