[gnome-software] Don't use deprecated CSS properties
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Don't use deprecated CSS properties
- Date: Wed, 13 Jul 2016 11:09:50 +0000 (UTC)
commit 6ec2f878ad252e91ab9f3ac8cef73d52071e65ed
Author: Richard Hughes <richard hughsie com>
Date: Wed Jul 13 11:07:59 2016 +0100
Don't use deprecated CSS properties
src/gs-application.c | 15 ---------------
src/gtk-style-hc.css | 2 +-
src/gtk-style.css | 14 +++++++-------
src/plugins/gs-plugin-hardcoded-featured.c | 24 ++++++++++++------------
4 files changed, 20 insertions(+), 35 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index 366cc4c..94e86f0 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -292,16 +292,6 @@ theme_changed (GtkSettings *settings, GParamSpec *pspec, GsApplication *app)
}
static void
-css_error (GtkCssProvider *provider,
- GtkCssSection *section,
- const GError *error,
- gpointer data)
-{
- if (!g_error_matches (error, GTK_CSS_PROVIDER_ERROR, GTK_CSS_PROVIDER_ERROR_DEPRECATED))
- g_error ("CSS parsing error: %s", error->message);
-}
-
-static void
gs_application_initialize_ui (GsApplication *app)
{
static gboolean initialized = FALSE;
@@ -317,11 +307,6 @@ gs_application_initialize_ui (GsApplication *app)
GTK_STYLE_PROVIDER (app->provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- /* This is to avoid CSS deprecation warnings until we can update
- * the CSS to not use deprecated selectors.
- */
- g_signal_connect (app->provider, "parsing-error", G_CALLBACK (css_error), NULL);
-
g_signal_connect (gtk_settings_get_default (), "notify::gtk-theme-name",
G_CALLBACK (theme_changed), app);
theme_changed (gtk_settings_get_default (), NULL, app);
diff --git a/src/gtk-style-hc.css b/src/gtk-style-hc.css
index 6618c17..11ed6d3 100644
--- a/src/gtk-style-hc.css
+++ b/src/gtk-style-hc.css
@@ -156,7 +156,7 @@ box.star, GtkBox.star {
}
button.star, .button.star {
- -GtkWidget-focus-padding: 0;
+ outline-offset: 0;
background-color: transparent;
background-image: none;
border-image: none;
diff --git a/src/gtk-style.css b/src/gtk-style.css
index 03c29a5..4859088 100644
--- a/src/gtk-style.css
+++ b/src/gtk-style.css
@@ -50,7 +50,7 @@
.details-license-free:backdrop,
.details-license-nonfree:backdrop,
.details-license-unknown:backdrop {
- -GtkWidget-focus-padding: 0;
+ outline-offset: 0;
background-image: none;
border-image: none;
border-radius: 4px;
@@ -91,17 +91,17 @@
}
/* should be :disabled but we need to support older versions of GTK */
-.kudo-pill:insensitive {
+.kudo-pill:disabled {
color: @theme_bg_color;
background-color: mix(@insensitive_fg_color, @theme_bg_color, 0.6);
}
-.kudo-pill:insensitive:backdrop {
+.kudo-pill:disabled:backdrop {
color: @theme_unfocused_bg_color;
background-color: mix(@insensitive_fg_color, @theme_unfocused_bg_color, 0.8);
}
-.onlyjustvisible:insensitive {
+.onlyjustvisible:disabled {
opacity: 0.25;
}
@@ -288,7 +288,7 @@ box.star, GtkBox.star {
}
button.star, .button.star {
- -GtkWidget-focus-padding: 0;
+ outline-offset: 0;
background-color: transparent;
background-image: none;
border-image: none;
@@ -308,10 +308,10 @@ button.star, .button.star {
}
/* for the app details shell */
-.star-enabled:insensitive {
+.star-enabled:disabled {
color: #555753;
}
-.star-disabled:insensitive {
+.star-disabled:disabled {
color: shade(@theme_bg_color, 0.8);
}
diff --git a/src/plugins/gs-plugin-hardcoded-featured.c b/src/plugins/gs-plugin-hardcoded-featured.c
index 88ea54c..0ad85e5 100644
--- a/src/plugins/gs-plugin-hardcoded-featured.c
+++ b/src/plugins/gs-plugin-hardcoded-featured.c
@@ -38,7 +38,7 @@ struct {
"border-color: #333333;\n"
"text-shadow: 0 1px 1px rgba(0,0,0,0.5);\n"
"color: #ffffff;\n"
- "-GtkWidget-focus-padding: 0;\n"
+ "outline-offset: 0;\n"
"outline-color: alpha(#ffffff, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
@@ -52,7 +52,7 @@ struct {
"border-color: #783d03;\n"
"text-shadow: 0 1px 1px rgba(0,0,0,0.5);\n"
"color: #ffffff;\n"
- "-GtkWidget-focus-padding: 0;\n"
+ "outline-offset: 0;\n"
"outline-color: alpha(#ffffff, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
@@ -65,7 +65,7 @@ struct {
"border-color: #2e3436;\n"
"text-shadow: 0 1px 1px rgba(0,0,0,0.5);\n"
"color: #ffffff;\n"
- "-GtkWidget-focus-padding: 0;\n"
+ "outline-offset: 0;\n"
"outline-color: alpha(#ffffff, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
@@ -77,7 +77,7 @@ struct {
"border-color: #babdb6;\n"
"text-shadow: 0 1px 1px rgba(255,255,255,0.7);\n"
"color: #888a85;\n"
- "-GtkWidget-focus-padding: 0;\n"
+ "outline-offset: 0;\n"
"outline-color: alpha(#888a85, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
@@ -89,7 +89,7 @@ struct {
"border-color: #2a6c10;\n"
"text-shadow: 0 1px 1px rgba(255,255,255,0.7);\n"
"color: #333;\n"
- "-GtkWidget-focus-padding: 0;\n"
+ "outline-offset: 0;\n"
"outline-color: alpha(#333, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
@@ -101,7 +101,7 @@ struct {
"border-color: #819a6b;\n"
"text-shadow: none;\n"
"color: #606060;\n"
- "-GtkWidget-focus-padding: 0;\n"
+ "outline-offset: 0;\n"
"outline-color: alpha(#ffffff, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
@@ -112,7 +112,7 @@ struct {
{ "mypaint.desktop",
"border-color: #4c52aa;\n"
"color: #362d89;\n"
- "-GtkWidget-focus-padding: 0;\n"
+ "outline-offset: 0;\n"
"outline-color: alpha(#362d89, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
@@ -124,7 +124,7 @@ struct {
"border-color: #4e9a06;\n"
"text-shadow: 0 2px #418e64;\n"
"color: #a8c74f;\n"
- "-GtkWidget-focus-padding: 0;\n"
+ "outline-offset: 0;\n"
"outline-color: alpha(#a8c74f, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
@@ -135,7 +135,7 @@ struct {
"border-color: #d8e0ef;\n"
"text-shadow: 0 1px 1px rgba(0,0,0,0.5);\n"
"color: #ffffff;\n"
- "-GtkWidget-focus-padding: 0;\n"
+ "outline-offset: 0;\n"
"outline-color: alpha(#ffffff, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
@@ -148,7 +148,7 @@ struct {
"border-color: #a40000;\n"
"text-shadow: 0 1px 1px rgba(0,0,0,0.5);\n"
"color: #ffffff;\n"
- "-GtkWidget-focus-padding: 0;\n"
+ "outline-offset: 0;\n"
"outline-color: alpha(#ffffff, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
@@ -161,7 +161,7 @@ struct {
"border-color: #000000;\n"
"text-shadow: 0 1px 1px rgba(0,0,0,0.5);\n"
"color: #ffffff;\n"
- "-GtkWidget-focus-padding: 0;\n"
+ "outline-offset: 0;\n"
"outline-color: alpha(#ffffff, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
@@ -174,7 +174,7 @@ struct {
"border-color: #ff0000;\n"
"text-shadow: 0 1px 1px rgba(255,255,255,0.5);\n"
"color: #000000;\n"
- "-GtkWidget-focus-padding: 0;\n"
+ "outline-offset: 0;\n"
"outline-color: alpha(#000000, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]