mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-11-05 16:43:26 +00:00
Fix dark style of diff-stat widget
This commit is contained in:
parent
dd607d8007
commit
df2c6cdcf8
2 changed files with 24 additions and 0 deletions
|
@ -83,6 +83,20 @@ public class Gitg.DiffStat : Gtk.DrawingArea
|
|||
|
||||
d_layout = null;
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
make_layout();
|
||||
}
|
||||
|
||||
|
|
|
@ -59,6 +59,11 @@ GitgDiffStat.no-frame.added-only {
|
|||
border-radius: 3px 0px 0px 3px;
|
||||
}
|
||||
|
||||
GitgDiffStat.added.dark,
|
||||
GitgDiffStat.added-only.dark {
|
||||
background-color: rgb(78, 154, 6);
|
||||
}
|
||||
|
||||
GitgDiffStat.added:dir(rtl),
|
||||
GitgDiffStat.no-frame.added:dir(rtl) {
|
||||
border-radius: 0px 3px 3px 0px;
|
||||
|
@ -72,6 +77,11 @@ GitgDiffStat.no-frame.removed-only {
|
|||
border-radius: 0px 3px 3px 0px;
|
||||
}
|
||||
|
||||
GitgDiffStat.removed.dark,
|
||||
GitgDiffStat.removed-only.dark {
|
||||
background-color: rgb(164, 0, 0);
|
||||
}
|
||||
|
||||
GitgDiffStat.removed:dir(rtl),
|
||||
GitgDiffStat.no-frame.removed:dir(rtl) {
|
||||
border-radius: 3px 0px 0px 3px;
|
||||
|
|
Loading…
Reference in a new issue