Skip to content

Commit b669b2a

Browse files
committed
Apply dark mode
1 parent e5431fa commit b669b2a

File tree

27 files changed

+6327
-5
lines changed

27 files changed

+6327
-5
lines changed

.github/FUNDING.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# These are supported funding model platforms
2+
3+
github: [ozone10] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: # Replace with a single Polar username
13+
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14+
custom: ['https://paypal.me/ozone10/'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/build_win.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build Windows binaries
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
strategy:
12+
matrix:
13+
arch: [ x64 ]
14+
include:
15+
- arch: x64
16+
platform: x64
17+
18+
steps:
19+
- name: Checkout repo
20+
uses: actions/checkout@v4
21+
22+
- name: Build ${{ matrix.arch }}
23+
shell: cmd
24+
run: |
25+
build.cmd ${{ matrix.platform }}
26+
27+
- name: Archive artifact ${{ matrix.platform }}
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: Dark7z ${{ matrix.platform }}
31+
path: ${{ matrix.platform }}
32+

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Dot Files/Folder
2+
.*
3+
4+
# Prerequisites
5+
*.d
6+
7+
# Compiled Object files
8+
*.slo
9+
*.lo
10+
*.o
11+
*.obj
12+
13+
# Precompiled Headers
14+
*.gch
15+
*.pch
16+
17+
# Compiled Dynamic libraries
18+
*.so
19+
*.dylib
20+
*.dll
21+
22+
# Fortran module files
23+
*.mod
24+
*.smod
25+
26+
# Compiled Static libraries
27+
*.lai
28+
*.la
29+
*.a
30+
*.lib
31+
32+
# Executables
33+
*.exe
34+
*.out
35+
*.app
36+
37+
# Folders
38+
*.vscode
39+
**/x86
40+
**/x64
41+
**/arm64

C/Precomp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
_UNICODE 1
2222
*/
2323

24+
#define Z7_WIN32_WINNT_MIN 0x0600
25+
2426
#include "Compiler.h"
2527

2628
#ifdef _MSC_VER

CPP/7zip/7zip.mak

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ OBJS = \
2828
$(CRYPTO_OBJS) \
2929
$(C_OBJS) \
3030
$(ASM_OBJS) \
31+
$(DARK_MODE_OBJS) \
3132
$O\resource.res \
3233

3334
!include "../../../Build.mak"
@@ -167,6 +168,11 @@ $(GUI_OBJS): ../../UI/GUI/$(*B).cpp
167168
$(COMPL)
168169
!ENDIF
169170

171+
!IFDEF DARK_MODE_OBJS
172+
$(DARK_MODE_OBJS): ../../../../DarkMode/$(*B).cpp
173+
$(COMPL)
174+
!ENDIF
175+
170176
!IFDEF C_OBJS
171177
$(C_OBJS): ../../../../C/$(*B).c
172178
$(COMPL_O2)
@@ -235,6 +241,9 @@ $(C_OBJS): ../../../../C/$(*B).c
235241
{../../../../C}.c{$O}.obj::
236242
$(CCOMPLB)
237243

244+
{../../../../DarkMode}.cpp{$O}.obj::
245+
$(COMPLB)
246+
238247
!ENDIF
239248

240249
!include "Asm.mak"

CPP/7zip/Bundles/Fm/makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ WIN_CTRL_OBJS = \
3535
$O\PropertyPage.obj \
3636
$O\Window2.obj \
3737

38+
DARK_MODE_OBJS = \
39+
$O\DarkMode.obj \
40+
$O\DarkModeSubclass.obj \
41+
3842
7ZIP_COMMON_OBJS = $(7ZIP_COMMON_OBJS) \
3943
$O\FilePathAutoRename.obj \
4044
$O\FileStreams.obj \

CPP/7zip/Bundles/SFXSetup/makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ WIN_OBJS = \
4444
WIN_CTRL_OBJS = \
4545
$O\Dialog.obj \
4646

47+
DARK_MODE_OBJS = \
48+
$O\DarkMode.obj \
49+
$O\DarkModeSubclass.obj \
50+
4751
7ZIP_COMMON_OBJS = \
4852
$O\CreateCoder.obj \
4953
$O\CWrappers.obj \

CPP/7zip/Bundles/SFXWin/makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ WIN_CTRL_OBJS = \
5656
$O\Dialog.obj \
5757
$O\ListView.obj \
5858

59+
DARK_MODE_OBJS = \
60+
$O\DarkMode.obj \
61+
$O\DarkModeSubclass.obj \
62+
5963
7ZIP_COMMON_OBJS = \
6064
$O\CreateCoder.obj \
6165
$O\CWrappers.obj \

CPP/7zip/UI/Explorer/makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ WIN_CTRL_OBJS = \
5656
$O\Dialog.obj \
5757
$O\ListView.obj \
5858

59+
DARK_MODE_OBJS = \
60+
$O\DarkMode.obj \
61+
$O\DarkModeSubclass.obj \
62+
5963
UI_COMMON_OBJS = \
6064
$O\ArchiveName.obj \
6165
$O\CompressCall.obj \

CPP/7zip/UI/FileManager/App.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
#include "PropertyNameRes.h"
3131

32+
#include "../../../../DarkMode/DarkModeSubclass.h"
33+
3234
using namespace NWindows;
3335
using namespace NFile;
3436
using namespace NDir;
@@ -285,6 +287,8 @@ HRESULT CApp::Create(HWND hwnd, const UString &mainPath, const UString &arcForma
285287
{
286288
_window.Attach(hwnd);
287289

290+
DarkMode::initDarkMode();
291+
288292
#ifdef UNDER_CE
289293
_commandBar.Create(g_hInstance, hwnd, 1);
290294
#endif
@@ -350,7 +354,20 @@ HRESULT CApp::Create(HWND hwnd, const UString &mainPath, const UString &arcForma
350354
}
351355
}
352356
}
353-
357+
358+
DarkMode::setDarkTitleBar(hwnd);
359+
DarkMode::autoSubclassWindowMenuBar(hwnd);
360+
DarkMode::autoSubclassCtlColor(hwnd);
361+
DarkMode::autoSubclassNotifyCustomDraw(hwnd, true);
362+
363+
for (i = 0; i < kNumPanelsMax; i++)
364+
{
365+
DarkMode::autoSubclassNotifyCustomDraw(Panels[i], false);
366+
DarkMode::autoSubclassCtlColor(Panels[i]);
367+
DarkMode::autoSubclassCtlColor(Panels[i]._headerReBar);
368+
DarkMode::autoSubclassCtlColor(Panels[i]._headerComboBox);
369+
}
370+
354371
SetFocusedPanel(LastFocusedPanel);
355372
Panels[LastFocusedPanel].SetFocusToList();
356373
return S_OK;

0 commit comments

Comments
 (0)