[gnome-software/wip/rancell/featured-snap: 3/3] Use banner URL in background
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/rancell/featured-snap: 3/3] Use banner URL in background
- Date: Wed, 2 Aug 2017 18:42:22 +0000 (UTC)
commit d8f38109f0c0f8991acf4d83f615e012c26f9abc
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Aug 2 19:20:52 2017 +0100
Use banner URL in background
plugins/snap/gs-plugin-snap.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index aea96a5..62daebb 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -314,6 +314,7 @@ gs_plugin_add_featured (GsPlugin *plugin,
GPtrArray *screenshots;
guint i;
const gchar *banner_url = NULL;
+ g_autofree gchar *background_css = NULL;
g_autofree gchar *css = NULL;
snaps = find_snaps (plugin, SNAPD_FIND_FLAGS_NONE, "featured", NULL, cancellable, error);
@@ -343,6 +344,10 @@ gs_plugin_add_featured (GsPlugin *plugin,
}
}
+ background_css = g_strdup_printf ("url('%s') left center / auto no-repeat,"
+ " url('%s') center / cover no-repeat;",
+ snapd_snap_get_icon (snap),
+ banner_url);
css = g_strdup_printf ("border-color: #000000;\n"
"text-shadow: 0 1px 1px rgba(0,0,0,0.5);\n"
"color: #ffffff;\n"
@@ -350,12 +355,10 @@ gs_plugin_add_featured (GsPlugin *plugin,
"outline-color: alpha(#ffffff, 0.75);\n"
"outline-style: dashed;\n"
"outline-offset: 2px;\n"
- "background:"
- " #000000"
- " url('%s')"
- " left center / auto no-repeat;",
- snapd_snap_get_icon (snap));
+ "background: %s;",
+ background_css);
gs_app_set_metadata (app, "GnomeSoftware::FeatureTile-css", css);
+
gs_app_list_add (list, app);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]