Skip to content

Commit

Permalink
Merge branch 'main' into context-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored Nov 7, 2023
2 parents 5fe6179 + b5c18f6 commit 88ef8f1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
image: ghcr.io/elementary/docker:${{ matrix.version }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
apt update
Expand All @@ -37,6 +37,6 @@ jobs:
image: valalang/lint

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Lint
run: io.elementary.vala-lint -d .
13 changes: 13 additions & 0 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ public class Dock.Application : Gtk.Application {
Object (application_id: "io.elementary.dock");
}

protected override void startup () {
base.startup ();

unowned var granite_settings = Granite.Settings.get_default ();
unowned var gtk_settings = Gtk.Settings.get_default ();

granite_settings.notify["prefers-color-scheme"].connect (() =>
gtk_settings.gtk_application_prefer_dark_theme = granite_settings.prefers_color_scheme == DARK
);

gtk_settings.gtk_application_prefer_dark_theme = granite_settings.prefers_color_scheme == DARK;
}

protected override void activate () {
if (active_window == null) {
var main_window = new MainWindow ();
Expand Down

0 comments on commit 88ef8f1

Please sign in to comment.