Commit faff370b authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Look sharp in HighContrast too

The HighContrast theme is all about, well, high contrast.
Therefore, we should remove our fancy shadows and most other
theming.
parent 50bee0bd
......@@ -128,6 +128,7 @@ EXTRA_DIST = \
gnome-software.gresource.xml \
gnome-software.xml \
gtk-style.css \
gtk-style-hc.css \
shadow.png \
shadow-active.png \
$(desktop_in_files) \
......
......@@ -9,6 +9,7 @@
<file preprocess="xml-stripblanks">app-tile.ui</file>
<file preprocess="xml-stripblanks">app-widget.ui</file>
<file>gtk-style.css</file>
<file>gtk-style-hc.css</file>
<file preprocess="to-pixdata">shadow.png</file>
<file preprocess="to-pixdata">shadow-active.png</file>
</gresource>
......
......@@ -122,6 +122,7 @@ gs_application_startup (GApplication *application)
GtkWindow *window;
GFile *file;
GError *error = NULL;
gchar *theme;
G_APPLICATION_CLASS (gs_application_parent_class)->startup (application);
......@@ -146,9 +147,15 @@ gs_application_startup (GApplication *application)
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
GTK_STYLE_PROVIDER (app->provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
file = g_file_new_for_uri ("resource:///org/gnome/software/gtk-style.css");
g_object_get (gtk_settings_get_default (), "gtk-theme-name", &theme, NULL);
if (g_strcmp0 (theme, "HighContrast") == 0) {
file = g_file_new_for_uri ("resource:///org/gnome/software/gtk-style-hc.css");
} else {
file = g_file_new_for_uri ("resource:///org/gnome/software/gtk-style.css");
}
gtk_css_provider_load_from_file (app->provider, file, NULL);
g_object_unref (file);
g_free (theme);
/* setup pk */
app->task = pk_task_new ();
......
.installed-overlay-box {
font-size: 80%;
background-color: @theme_button_active_bg;
border-radius: 4px;
color: @theme_base_color;
}
.installed-overlay-label { }
@keyframes throbbing {
0% { background-image: linear-gradient(to bottom, transparent, transparent); }
}
.needs-attention {
background-image: linear-gradient(to bottom, @theme_button_active_bg, @theme_button_active_bg);
animation: throbbing linear 1s infinite alternate;
}
.application-details-title {
font-weight: bold;
font-size: 14px;
}
Supports Markdown
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