Skip to content

Commit 8e3b052

Browse files
committed
improv: Use Windows 10 style themes on Windows
1 parent f03e1ac commit 8e3b052

File tree

5 files changed

+22
-0
lines changed

5 files changed

+22
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
with:
4343
toolchain: stable-i686-pc-windows-gnu
4444
- uses: actions/checkout@v2
45+
with:
46+
submodules: true
4547
- name: Build and package
4648
shell: msys2 {0}
4749
run: |

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "windows/themes/Windows-10-Dark"]
2+
path = windows/themes/Windows-10-Dark
3+
url = https://github.com/B00merang-Project/Windows-10-Dark
4+
[submodule "windows/themes/Windows-10"]
5+
path = windows/themes/Windows-10
6+
url = https://github.com/B00merang-Project/Windows-10

windows/build.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,18 @@ def find_depends(exe):
8383
print(f"Copy {src} -> {dest}")
8484
shutil.copytree(src, dest)
8585

86+
# Copy themes, and set default
87+
# Based on https://www.gtk.org/docs/installations/windows#building-and-distributing-your-application
88+
os.makedirs("out/share/themes/Windows10")
89+
os.makedirs("out/share/themes/Windows10-dark")
90+
os.makedirs("out/etc/gtk-3.0")
91+
print("Copy themes/Windows-10/gtk-3.20 -> out/share/themes/Windows10/gtk-3.0")
92+
shutil.copytree("themes/Windows-10/gtk-3.20", "out/share/themes/Windows10/gtk-3.0")
93+
print("Copy themes/Windows-10-dark/gtk-3.20 -> out/share/themes/Windows10-dark/gtk-3.0")
94+
shutil.copytree("themes/Windows-10-dark/gtk-3.20", "out/share/themes/Windows10-dark/gtk-3.0")
95+
with open("out/etc/gtk-3.0/settings.ini", "w") as f:
96+
f.write("[Settings]\ngtk-theme-name=Windows10\ngtk-font-name=Segoe UI 9\n")
97+
8698
# Extract crate version from cargo
8799
meta_str = subprocess.check_output(CARGO + ["metadata", "--format-version", "1", "--no-deps"])
88100
meta = json.loads(meta_str)

windows/themes/Windows-10

Submodule Windows-10 added at 06dd5b8

windows/themes/Windows-10-Dark

Submodule Windows-10-Dark added at 6f3e063

0 commit comments

Comments
 (0)