[Xfce4-commits] [panel-plugins/xfce4-weather-plugin] 15/25: Improve forecast appearance by using opacity instead of hardcoded backgrounds

noreply at xfce.org noreply at xfce.org
Mon Sep 17 00:14:12 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-weather-plugin.

commit 4c7f87d37df15f7fea6296d30a59397c1e32f669
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Wed Sep 12 21:05:49 2018 -0400

    Improve forecast appearance by using opacity instead of hardcoded backgrounds
---
 panel-plugin/weather-summary.c | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c
index 41ec808..000b1d0 100644
--- a/panel-plugin/weather-summary.c
+++ b/panel-plugin/weather-summary.c
@@ -820,15 +820,6 @@ wrap_forecast_cell(const GtkWidget *widget,
 }
 
 
-static void
-configure_forecast_label (GtkWidget *label)
-{
-    GtkStyleContext *ctx;
-    ctx = gtk_widget_get_style_context (GTK_WIDGET (label));
-    gtk_style_context_add_class(ctx, "forecast-label");
-}
-
-
 static GtkWidget *
 add_forecast_header(const gchar *text,
                     const gdouble angle,
@@ -897,8 +888,6 @@ add_forecast_cell(plugin_data *data,
     g_free(rawvalue);
     label = gtk_label_new(NULL);
     gtk_label_set_markup(GTK_LABEL(label), value);
-    if (!(day % 2))
-        configure_forecast_label (GTK_WIDGET (label));
     gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(label), TRUE, TRUE, 0);
     g_free(value);
 
@@ -909,8 +898,6 @@ add_forecast_cell(plugin_data *data,
                             get_unit(data->units, TEMPERATURE));
     g_free(rawvalue);
     label = gtk_label_new(value);
-    if (!(day % 2))
-        configure_forecast_label (GTK_WIDGET (label));
     gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(label), TRUE, TRUE, 0);
     g_free(value);
 
@@ -924,8 +911,6 @@ add_forecast_cell(plugin_data *data,
     g_free(wind_speed);
     g_free(wind_direction);
     label = gtk_label_new(value);
-    if (!(day % 2))
-        configure_forecast_label (GTK_WIDGET (label));
     gtk_box_pack_start(GTK_BOX(box), label, TRUE, TRUE, 0);
     g_free(value);
 
@@ -956,9 +941,8 @@ make_forecast(plugin_data *data)
     GtkCssProvider *provider = gtk_css_provider_new ();
     gchar *css_string;
 
-    css_string = g_strdup (".forecast-cell.lightbg { background-color: #EAEAEA; }"
-                           ".forecast-cell.darkbg { background-color: #666666; }"
-                           ".forecast-cell .forecast-label { color: #000000; }");
+    css_string = g_strdup (".forecast-cell.lightbg { background-color: rgba(0, 0, 0, 0.2); }"
+                           ".forecast-cell.darkbg { background-color: rgba(0, 0, 0, 0.4); }");
 
     gtk_css_provider_load_from_data (provider, css_string, -1, NULL);
     gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list