Commit 06b86cf5 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels

add gp-text-color css class

parent 4ff1e398
......@@ -813,6 +813,8 @@ create_main_clock_label (ClockData *cd)
G_CALLBACK (clock_update_text_gravity),
NULL);
panel_applet_add_text_class (PANEL_APPLET (cd->applet), label);
return label;
}
......
......@@ -2,6 +2,10 @@ panel-toplevel {
background-color: #393f3f;
}
.gp-text-color {
color: #ffffff;
}
.gnome-panel-menu-bar,
panel-applet > menubar {
background: transparent;
......
......@@ -2,6 +2,10 @@ panel-toplevel {
background-color: #e8e8e7;
}
.gp-text-color {
color: #000000;
}
.gnome-panel-menu-bar,
panel-applet > menubar {
background: transparent;
......
......@@ -2,6 +2,10 @@ panel-toplevel {
background-color: #ffffff;
}
.gp-text-color {
color: #000000;
}
.gnome-panel-menu-bar,
panel-applet > menubar {
background: transparent;
......
......@@ -112,6 +112,8 @@ panel_menu_bar_init (PanelMenuBar *menubar)
{
gchar *applications_menu;
GtkIconSize icon_size;
GtkWidget *label;
GtkStyleContext *context;
menubar->priv = PANEL_MENU_BAR_GET_PRIVATE (menubar);
......@@ -125,6 +127,10 @@ panel_menu_bar_init (PanelMenuBar *menubar)
gtk_menu_item_set_label (GTK_MENU_ITEM (menubar->priv->applications_item),
_("Applications"));
label = gtk_bin_get_child (GTK_BIN (menubar->priv->applications_item));
context = gtk_widget_get_style_context (label);
gtk_style_context_add_class (context, "gp-text-color");
icon_size = panel_menu_bar_object_icon_get_size ();
menubar->priv->image = gtk_image_new_from_icon_name (PANEL_ICON_MAIN_MENU, icon_size);
gtk_image_set_pixel_size (GTK_IMAGE (menubar->priv->image),
......
......@@ -1445,7 +1445,15 @@ panel_place_menu_item_new (gboolean use_image,
icon_name = PANEL_ICON_FOLDER;
if (in_menubar) {
GtkWidget *label;
GtkStyleContext *context;
gtk_menu_item_set_label (GTK_MENU_ITEM (menuitem), name);
label = gtk_bin_get_child (GTK_BIN (menuitem));
context = gtk_widget_get_style_context (label);
gtk_style_context_add_class (context, "gp-text-color");
if (use_image) {
GtkIconSize icon_size;
GtkWidget *image;
......@@ -1493,9 +1501,16 @@ panel_desktop_menu_item_new (gboolean use_image,
/* if we're in a menubar, we don't want to use setup_* as it changes
* the size requests and can make the panels bigger than we'd like */
if (in_menubar) {
GtkWidget *label;
GtkStyleContext *context;
gtk_menu_item_set_label (GTK_MENU_ITEM (menuitem), name);
menuitem->priv->icon_size = panel_menu_bar_object_icon_get_size ();
label = gtk_bin_get_child (GTK_BIN (menuitem));
context = gtk_widget_get_style_context (label);
gtk_style_context_add_class (context, "gp-text-color");
if (use_image) {
GtkWidget *image;
image = gtk_image_new_from_icon_name (icon_name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment