[gitg/gnome-3-20] Fix style of language label in dark theme
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/gnome-3-20] Fix style of language label in dark theme
- Date: Wed, 22 Jun 2016 13:43:51 +0000 (UTC)
commit eda83862a8a8b604747cf5967ce5963e10367b9e
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Sun Jun 5 11:47:10 2016 +0200
Fix style of language label in dark theme
https://bugzilla.gnome.org/show_bug.cgi?id=766532
gitg/gitg-window.vala | 19 +++++++++++++++++++
libgitg/resources/ui/libgitg-style.css | 8 ++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index e7d085e..b4b6150 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -363,6 +363,25 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
SettingsBindFlags.GET | SettingsBindFlags.SET);
}
+ protected override void style_updated()
+ {
+ base.style_updated();
+
+ var settings = Gtk.Settings.get_default();
+ var theme = Environment.get_variable("GTK_THEME");
+
+ var dark = settings.gtk_application_prefer_dark_theme || (theme != null &&
theme.has_suffix(":dark"));
+
+ if (dark)
+ {
+ get_style_context().add_class("dark");
+ }
+ else
+ {
+ get_style_context().remove_class("dark");
+ }
+ }
+
protected override bool delete_event(Gdk.EventAny event)
{
var ret = false;
diff --git a/libgitg/resources/ui/libgitg-style.css b/libgitg/resources/ui/libgitg-style.css
index d5abf1f..877a758 100644
--- a/libgitg/resources/ui/libgitg-style.css
+++ b/libgitg/resources/ui/libgitg-style.css
@@ -77,8 +77,8 @@ gitg-diffstat.no-frame.removed-only {
border-radius: 0px 3px 3px 0px;
}
-gitg-diffstat.removed.dark,
-gitg-diffstat.removed-only.dark {
+.dark gitg-diffstat.removed,
+.dark gitg-diffstat.removed-only {
background-color: rgb(164, 0, 0);
}
@@ -108,3 +108,7 @@ GitgDiffViewOptions {
border-radius: 3px;
padding: 3px;
}
+
+.dark .language-frame {
+ background-color: #535353;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]