mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-10-06 07:59:12 +00:00
Fix style of language label in dark theme
https://bugzilla.gnome.org/show_bug.cgi?id=766532
This commit is contained in:
parent
8d3120375c
commit
1da1acfb1c
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue