diff --git a/shell/start/src/startmenu.c b/shell/start/src/startmenu.c index 569a7cd..2108ef2 100644 --- a/shell/start/src/startmenu.c +++ b/shell/start/src/startmenu.c @@ -229,17 +229,23 @@ static void create_logoffpane_structure( { GtkWidget* logoffpane_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + // + // These are a couple ordinary buttons, except we have an extra box before the + // label so that themes can add an icon + // + // The reason for not using the gtk-icon-theme here is because the themes need + // to be able to override the image, AND they need to provide a 'hot' graphic for + // when the buttons are hovered + // + // Log off button // - GtkWidget* logoff_button = gtk_button_new(); - GtkWidget* logoff_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - GtkWidget* logoff_icon = gtk_image_new_from_icon_name( - "system-log-out", - GTK_ICON_SIZE_LARGE_TOOLBAR - ); - GtkWidget* logoff_label = gtk_label_new(_("Log Off")); + GtkWidget* logoff_button = gtk_button_new(); + GtkWidget* logoff_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + GtkWidget* logoff_icon_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + GtkWidget* logoff_label = gtk_label_new(_("Log Off")); - gtk_box_pack_start(GTK_BOX(logoff_box), logoff_icon, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(logoff_box), logoff_icon_box, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(logoff_box), logoff_label, FALSE, FALSE, 0); gtk_container_add(GTK_CONTAINER(logoff_button), logoff_box); @@ -255,17 +261,16 @@ static void create_logoffpane_structure( _("Provides options for closing your programs and logging off, or for leaving your programs running and switching to another user.") ); + wintc_widget_add_style_class(logoff_icon_box, "logoff-icon"); + // Shut down button // - GtkWidget* shutdown_button = gtk_button_new(); - GtkWidget* shutdown_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); - GtkWidget* shutdown_icon = gtk_image_new_from_icon_name( - "system-shutdown", - GTK_ICON_SIZE_LARGE_TOOLBAR - ); - GtkWidget* shutdown_label = gtk_label_new(_("Turn Off Computer")); + GtkWidget* shutdown_button = gtk_button_new(); + GtkWidget* shutdown_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + GtkWidget* shutdown_icon_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); + GtkWidget* shutdown_label = gtk_label_new(_("Turn Off Computer")); - gtk_box_pack_start(GTK_BOX(shutdown_box), shutdown_icon, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(shutdown_box), shutdown_icon_box, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(shutdown_box), shutdown_label, FALSE, FALSE, 0); gtk_container_add(GTK_CONTAINER(shutdown_button), shutdown_box); @@ -281,6 +286,8 @@ static void create_logoffpane_structure( _("Provides options for turning off or restarting your computer, or for activating Stand By or Hibernate modes.") ); + wintc_widget_add_style_class(shutdown_icon_box, "shutdown-icon"); + // Pack box // gtk_box_pack_end(GTK_BOX(logoffpane_box), shutdown_button, FALSE, FALSE, 0); diff --git a/themes/gtk-3.0-base/init/start-menu.scss b/themes/gtk-3.0-base/init/start-menu.scss index ad9e165..07408e6 100644 --- a/themes/gtk-3.0-base/init/start-menu.scss +++ b/themes/gtk-3.0-base/init/start-menu.scss @@ -34,7 +34,12 @@ $start_menu_logoff_pane_styles: (); $start_menu_button_styles: (); $start_menu_button_hover_styles: (); $start_menu_button_press_styles: (); -$start_menu_button_icon_styles: (); + +$start_menu_button_icon_styles: (); +$start_menu_button_logoff_icon_styles: (); +$start_menu_button_logoff_icon_hover_styles: (); +$start_menu_button_shutdown_icon_styles: (); +$start_menu_button_shutdown_icon_hover_styles: (); // // START MENU PLACES COLUMN diff --git a/themes/gtk-3.0-base/override/xp-start-plugin.scss b/themes/gtk-3.0-base/override/xp-start-plugin.scss index e00d87c..e768b7b 100644 --- a/themes/gtk-3.0-base/override/xp-start-plugin.scss +++ b/themes/gtk-3.0-base/override/xp-start-plugin.scss @@ -462,10 +462,39 @@ window.csd.xp-start-menu // Specificity hack -_- @include __wintc_apply_props($start_menu_button_press_styles); } - image + // Button icons + // + .logoff-icon, + .shutdown-icon { + min-height: $start_menu_power_button_icon_size; + min-width: $start_menu_power_button_icon_size; + @include __wintc_apply_props($start_menu_button_icon_styles); } + + .logoff-icon + { + @include __wintc_apply_props($start_menu_button_logoff_icon_styles); + } + + .shutdown-icon + { + @include __wintc_apply_props($start_menu_button_shutdown_icon_styles); + } + + &:hover + { + .logoff-icon + { + @include __wintc_apply_props($start_menu_button_logoff_icon_hover_styles); + } + + .shutdown-icon + { + @include __wintc_apply_props($start_menu_button_shutdown_icon_hover_styles); + } + } } } } diff --git a/themes/gtk-3.0-base/styling/start-menu.scss b/themes/gtk-3.0-base/styling/start-menu.scss index 8a435ef..ee70ba5 100644 --- a/themes/gtk-3.0-base/styling/start-menu.scss +++ b/themes/gtk-3.0-base/styling/start-menu.scss @@ -22,6 +22,8 @@ $start_menu_popup_menu_vmargin: 0px !default; $start_menu_separator_thickness: $separator_thickness !default; +$start_menu_power_button_icon_size: 24px !default; + // // START BUTTON // @@ -506,3 +508,44 @@ $start_menu_button_icon_styles: undefined, undefined ); + +$start_menu_button_logoff_icon_styles: + wintc_define_props_bg( + $start_menu_button_logoff_icon_styles, + true, + undefined, + undefined, + undefined, + undefined, + url('../Resources/logoff_button.png') + ); +$start_menu_button_logoff_icon_hover_styles: + wintc_define_props_bg( + $start_menu_button_logoff_icon_hover_styles, + true, + undefined, + undefined, + undefined, + undefined, + url('../Resources/logoff_button_hover.png') + ); +$start_menu_button_shutdown_icon_styles: + wintc_define_props_bg( + $start_menu_button_shutdown_icon_styles, + true, + undefined, + undefined, + undefined, + undefined, + url('../Resources/shutdown_button.png') + ); +$start_menu_button_shutdown_icon_hover_styles: + wintc_define_props_bg( + $start_menu_button_shutdown_icon_hover_styles, + true, + undefined, + undefined, + undefined, + undefined, + url('../Resources/shutdown_button_hover.png') + ); diff --git a/themes/luna/blue/Resources/logoff_button.png b/themes/luna/blue/Resources/logoff_button.png new file mode 100644 index 0000000..babee83 Binary files /dev/null and b/themes/luna/blue/Resources/logoff_button.png differ diff --git a/themes/luna/blue/Resources/logoff_button_hover.png b/themes/luna/blue/Resources/logoff_button_hover.png new file mode 100644 index 0000000..dd5b6b8 Binary files /dev/null and b/themes/luna/blue/Resources/logoff_button_hover.png differ diff --git a/themes/luna/blue/Resources/shutdown_button.png b/themes/luna/blue/Resources/shutdown_button.png new file mode 100644 index 0000000..942d5c5 Binary files /dev/null and b/themes/luna/blue/Resources/shutdown_button.png differ diff --git a/themes/luna/blue/Resources/shutdown_button_hover.png b/themes/luna/blue/Resources/shutdown_button_hover.png new file mode 100644 index 0000000..a483d13 Binary files /dev/null and b/themes/luna/blue/Resources/shutdown_button_hover.png differ diff --git a/themes/native/Resources/logoff_button.png b/themes/native/Resources/logoff_button.png new file mode 100644 index 0000000..5f7bf70 Binary files /dev/null and b/themes/native/Resources/logoff_button.png differ diff --git a/themes/native/Resources/logoff_button_hover.png b/themes/native/Resources/logoff_button_hover.png new file mode 100644 index 0000000..1aa52b1 Binary files /dev/null and b/themes/native/Resources/logoff_button_hover.png differ diff --git a/themes/native/Resources/pwrbuttons.png b/themes/native/Resources/pwrbuttons.png new file mode 100644 index 0000000..b1329d0 Binary files /dev/null and b/themes/native/Resources/pwrbuttons.png differ diff --git a/themes/native/Resources/shutdown_button.png b/themes/native/Resources/shutdown_button.png new file mode 100644 index 0000000..19c806f Binary files /dev/null and b/themes/native/Resources/shutdown_button.png differ diff --git a/themes/native/Resources/shutdown_button_hover.png b/themes/native/Resources/shutdown_button_hover.png new file mode 100644 index 0000000..f11da9e Binary files /dev/null and b/themes/native/Resources/shutdown_button_hover.png differ diff --git a/themes/professional/Resources/logoff_button.png b/themes/professional/Resources/logoff_button.png new file mode 100644 index 0000000..4f56e81 Binary files /dev/null and b/themes/professional/Resources/logoff_button.png differ diff --git a/themes/professional/Resources/logoff_button_hover.png b/themes/professional/Resources/logoff_button_hover.png new file mode 100644 index 0000000..6ce2767 Binary files /dev/null and b/themes/professional/Resources/logoff_button_hover.png differ diff --git a/themes/professional/Resources/shutdown_button.png b/themes/professional/Resources/shutdown_button.png new file mode 100644 index 0000000..d7f3d93 Binary files /dev/null and b/themes/professional/Resources/shutdown_button.png differ diff --git a/themes/professional/Resources/shutdown_button_hover.png b/themes/professional/Resources/shutdown_button_hover.png new file mode 100644 index 0000000..513f37d Binary files /dev/null and b/themes/professional/Resources/shutdown_button_hover.png differ