From 581e555b9229c122be887cbbf1dda81d2993932c Mon Sep 17 00:00:00 2001 From: Leonhard <106322251+leolost2605@users.noreply.github.com> Date: Sat, 5 Aug 2023 12:18:01 +0200 Subject: [PATCH 1/2] Support dark mode (#183) * Support dark mode --------- Co-authored-by: Gustavo Marques --- meson.build | 4 +++- src/Application.vala | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index e648ecb2..0f2f8430 100644 --- a/meson.build +++ b/meson.build @@ -13,13 +13,15 @@ gio_unix_dep = dependency('gio-unix-2.0') glib_dep = dependency('glib-2.0') gobject_dep = dependency('gobject-2.0') gtk_dep = dependency('gtk4') +granite_dep = dependency('granite-7') dependencies = [ gio_dep, gio_unix_dep, glib_dep, gobject_dep, - gtk_dep + gtk_dep, + granite_dep ] meson.add_install_script('meson/post_install.py') diff --git a/src/Application.vala b/src/Application.vala index 2f03d523..84fc0285 100644 --- a/src/Application.vala +++ b/src/Application.vala @@ -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 (); From b5c18f63e176d8dbfe84831e7d89fbfa2c486317 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Oct 2023 14:22:20 +0900 Subject: [PATCH 2/2] Bump actions/checkout from 3 to 4 (#185) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 361454ab..e413f8be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 .