Skip to content

Commit 151d2e9

Browse files
author
Ravbug
committed
windows dark mode
1 parent e92f284 commit 151d2e9

9,624 files changed

Lines changed: 1733125 additions & 1588976 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/website.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout code
10-
uses: actions/checkout@v3
10+
uses: actions/checkout@v4
1111
with:
1212
submodules: true
1313
- name: Fix permissions
@@ -16,7 +16,7 @@ jobs:
1616
echo "::warning title=Invalid file permissions automatically fixed::$line"
1717
done
1818
- name: Upload
19-
uses: actions/upload-pages-artifact@v2
19+
uses: actions/upload-pages-artifact@v3
2020

2121
# Deploy job
2222
deploy:
@@ -38,4 +38,4 @@ jobs:
3838
steps:
3939
- name: Deploy to GitHub Pages
4040
id: deployment
41-
uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action
41+
uses: actions/deploy-pages@v4 # or the latest "vX.X.X" version tag for this action

source/interface_derived.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ MainFrame::MainFrame(wxWindow* parent) : MainFrameBase( parent )
5656
dpi_scale(this);
5757

5858
//set color
59-
SetBackgroundColour(*wxWHITE);
59+
if (!wxSystemSettings::GetAppearance().IsDark()) {
60+
this->SetBackgroundColour(*wxWHITE);
61+
}
6062

6163
//update names (no unicode support for now)
6264
openFolderBtn->SetLabel("Open");

source/main.cpp

Lines changed: 86 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,86 @@
1-
//
2-
// main.cpp
3-
// wxWidgetsTemplate
4-
//
5-
// Copyright © 2019 Ravbug. All rights reserved.
6-
//
7-
// This file contains the definition for a wxWidgets application. It configures it and launches it.
8-
// There is no int main function.
9-
10-
// wxWidgets "Hello world" Program
11-
// For compilers that support precompilation, includes "wx/wx.h".
12-
#include <wx/wxprec.h>
13-
#ifndef WX_PRECOMP
14-
#include <wx/wx.h>
15-
#endif
16-
17-
#include "interface_derived.h"
18-
19-
class FatFileFinder: public wxApp
20-
{
21-
public:
22-
virtual bool OnInit();
23-
virtual int FilterEvent(wxEvent&);
24-
MainFrame* frame;
25-
};
26-
27-
wxIMPLEMENT_APP(FatFileFinder);
28-
bool FatFileFinder::OnInit()
29-
{
30-
frame = new MainFrame( );
31-
frame->Show( true );
32-
return true;
33-
}
34-
35-
//for catching global events
36-
int FatFileFinder::FilterEvent(wxEvent& event) {
37-
//logging
38-
if (event.GetId() == LOGEVT && event.IsCommandEvent()) {
39-
wxCommandEvent* ce = (wxCommandEvent*)(event.Clone());
40-
frame->OnLog(*ce);
41-
delete ce;
42-
return true;
43-
}
44-
//on selection change
45-
else if (event.GetId() == SELEVT && event.IsCommandEvent()){
46-
wxCommandEvent* ce = (wxCommandEvent*)(event.Clone());
47-
//extract the pointer from the client data
48-
uintptr_t* ptr = (uintptr_t*)(ce->GetClientData());
49-
DirectoryData* data = (DirectoryData*)*ptr;
50-
frame->PopulateSidebar(data);
51-
frame->selected = data;
52-
delete ce;
53-
delete ptr;
54-
return true;
55-
}
56-
else if (event.GetId() == ACTEVT && event.IsCommandEvent()){
57-
wxCommandEvent* ce = (wxCommandEvent*)(event.Clone());
58-
//extract the pointer from the client data
59-
uintptr_t* ptr = (uintptr_t*)(ce->GetClientData());
60-
DirectoryData* data = (DirectoryData*)*ptr;
61-
if (data->isFolder){
62-
frame->ChangeSelection(data);
63-
}
64-
delete ptr;
65-
delete ce;
66-
return true;
67-
}
68-
else if (event.GetId() == RESEVT && event.IsCommandEvent()){
69-
wxCommandEvent* ce = (wxCommandEvent*)(event.Clone());
70-
//extract the pointer from the client data
71-
uintptr_t* ptr = (uintptr_t*)(ce->GetClientData());
72-
73-
//update progress bar and header
74-
frame->ProgressUpdate((int)*ptr);
75-
76-
delete ptr;
77-
delete ce;
78-
return true;
79-
}
80-
return -1;
81-
}
1+
//
2+
// main.cpp
3+
// wxWidgetsTemplate
4+
//
5+
// Copyright © 2019 Ravbug. All rights reserved.
6+
//
7+
// This file contains the definition for a wxWidgets application. It configures it and launches it.
8+
// There is no int main function.
9+
10+
// wxWidgets "Hello world" Program
11+
// For compilers that support precompilation, includes "wx/wx.h".
12+
#include <wx/wxprec.h>
13+
#ifndef WX_PRECOMP
14+
#include <wx/wx.h>
15+
#endif
16+
17+
#include "interface_derived.h"
18+
19+
class FatFileFinder: public wxApp
20+
{
21+
public:
22+
virtual bool OnInit();
23+
virtual int FilterEvent(wxEvent&);
24+
MainFrame* frame;
25+
};
26+
27+
wxIMPLEMENT_APP(FatFileFinder);
28+
bool FatFileFinder::OnInit()
29+
{
30+
#if _WIN32
31+
MSWEnableDarkMode();
32+
SetAppearance(Appearance::System);
33+
#endif
34+
35+
frame = new MainFrame( );
36+
frame->Show( true );
37+
return true;
38+
}
39+
40+
//for catching global events
41+
int FatFileFinder::FilterEvent(wxEvent& event) {
42+
//logging
43+
if (event.GetId() == LOGEVT && event.IsCommandEvent()) {
44+
wxCommandEvent* ce = (wxCommandEvent*)(event.Clone());
45+
frame->OnLog(*ce);
46+
delete ce;
47+
return true;
48+
}
49+
//on selection change
50+
else if (event.GetId() == SELEVT && event.IsCommandEvent()){
51+
wxCommandEvent* ce = (wxCommandEvent*)(event.Clone());
52+
//extract the pointer from the client data
53+
uintptr_t* ptr = (uintptr_t*)(ce->GetClientData());
54+
DirectoryData* data = (DirectoryData*)*ptr;
55+
frame->PopulateSidebar(data);
56+
frame->selected = data;
57+
delete ce;
58+
delete ptr;
59+
return true;
60+
}
61+
else if (event.GetId() == ACTEVT && event.IsCommandEvent()){
62+
wxCommandEvent* ce = (wxCommandEvent*)(event.Clone());
63+
//extract the pointer from the client data
64+
uintptr_t* ptr = (uintptr_t*)(ce->GetClientData());
65+
DirectoryData* data = (DirectoryData*)*ptr;
66+
if (data->isFolder){
67+
frame->ChangeSelection(data);
68+
}
69+
delete ptr;
70+
delete ce;
71+
return true;
72+
}
73+
else if (event.GetId() == RESEVT && event.IsCommandEvent()){
74+
wxCommandEvent* ce = (wxCommandEvent*)(event.Clone());
75+
//extract the pointer from the client data
76+
uintptr_t* ptr = (uintptr_t*)(ce->GetClientData());
77+
78+
//update progress bar and header
79+
frame->ProgressUpdate((int)*ptr);
80+
81+
delete ptr;
82+
delete ce;
83+
return true;
84+
}
85+
return -1;
86+
}

wxWidgets/.git-blame-ignore-revs

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# This file can be used with git blame --ignore-revs-file option or used as
2+
# the value of blame.ignoreRevsFile in git config to ignore the changes done by
3+
# the following "not interesting" commits.
4+
#
5+
# It's supported by Git 2.23 or later and to use it by default for all the
6+
# future git-blame invocations, run the following command:
7+
#
8+
# git config blame.ignoreRevsFile .git-blame-ignore-revs
9+
#
10+
# When adding entries to this file, please keep them in reverse chronological
11+
# order (the newest ones are added at the top).
12+
#
13+
# You can use
14+
#
15+
# $ git show -s --format='# %s, %cs%n%H%n'
16+
#
17+
# incantation to directly create an entry in the format used here.
18+
19+
# Add missing spaces after compound statement keywords, 2024-12-23
20+
216232fd7c92d067c21ef28f12d7fc3020441ea8
21+
22+
# Get rid of obsoleted comments, 2023-02-05
23+
2df05fb915516e0563578e34aec45980be51b1f4
24+
25+
# Code cleanup: wxPGProperty helper classes, 2023-01-06
26+
e43190ea796ac3c1d15c18a88bcf7f3f745bd4bc
27+
28+
# Get rid of commented out code, 2022-10-26
29+
db31a0161503c6ea4cc461f4e10b67830b7d6b52
30+
31+
# Use nullptr instead of NULL in the code and documentation, 2022-10-18
32+
4f4c5fcfdfe7d1eadce22a68929c82b6cb324075
33+
34+
# Fix comment typos in sources, 2021-10-02
35+
668a2186cd89fd4576bed224df3624811eebeca1
36+
37+
# Wrap variable initializations after '=' consistently, 2019-11-22
38+
2bc6e50eded2a14099655ce0b4c7df582b87c93a
39+
40+
# Remove all trailing spaces, 2019-01-30
41+
8fbca5cb70c8b647d5bd2cacb1e0a2a00358f351
42+
43+
# Remove more wxT() macros from samples, 2018-09-29
44+
b70ed2d8c84cadf10bd42fc052a255fac02391e4
45+
46+
# Remove (most) occurrences of wxT() macro from the samples, 2018-09-23
47+
f58ea625968953ca93585ea7f93dcc07ad032d8f
48+
49+
# Remove trailing whitespace from several files, 2018-04-11
50+
496da2e550ce1f562f727230babc363da190530e
51+
52+
# Remove all lines containing cvs/svn "$Id$" keyword.
53+
3f66f6a5b3583b02c34854556eb83e3a808524ce
54+
55+
# No changes, just removed hard tabs and trailing white space., 2009-08-21
56+
03647350fc7cd141953c72e0284e928847d30f44
57+
58+
# Globally replace _T() with wxT()., 2009-07-23
59+
9a83f860948059b0273b5cc6d9e43fadad3ebfca
60+
61+
# set correct EOL style for files added in r58024, 2009-04-26
62+
a3ef8eb50346e04c080ed1711578390080baff8b
63+
64+
# This commit contained some non-trivial changes, but also changed EOLs of the
65+
# files it touchedm so ignore it too even if it's not completely trivial.
66+
#
67+
# pass ApplyEdit() arguments to EndEdit() too for better backwards compatibility (closes #10544), 2009-03-06
68+
78e788120814699ab0a0d2fab1131285f5e0fd7a
69+
70+
# split wxGrid implementation in grideditors.cpp (for wxGridCellEditor-derived
71+
# classes), gridctrl.cpp (for wxGridCellRenderer-derived classes), 2009-01-11
72+
29efc6e4a478652d6f59fb3f5ca7990d78a8ead4
73+
74+
# removed trailing whitespace, 2007-11-27
75+
b9db5f3061af49519c56e9981d627a5b206507f3
76+
77+
# cleanup - reformatting, 2006-04-20
78+
a9339fe22c1815cfbbf2ed9c300c897256644d18
79+
80+
# Source cleaning, warning fixes., 2005-01-13
81+
2ad1ff540f036e130ed934066b80652c2c5fe158
82+
83+
# Code cleaning: wxID_ANY, wxDefaultSize, wxDefaultPosition, true, false,
84+
# wxEmptyString, tabs and white spaces, 2004-06-17
85+
ca65c0440a7163e4e37e48b1c4329709d722db47

wxWidgets/.mailmap

Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
AccessModifierOffset: '-4'
3+
AlignEscapedNewlines: Left
4+
AllowAllConstructorInitializersOnNextLine: 'true'
5+
BinPackArguments: 'false'
6+
BinPackParameters: 'false'
7+
BreakConstructorInitializers: AfterColon
8+
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
9+
DerivePointerAlignment: 'false'
10+
FixNamespaceComments: 'true'
11+
IncludeBlocks: Regroup
12+
IndentCaseLabels: 'false'
13+
IndentPPDirectives: AfterHash
14+
IndentWidth: '4'
15+
Language: Cpp
16+
NamespaceIndentation: All
17+
PointerAlignment: Left
18+
SpaceBeforeCtorInitializerColon: 'false'
19+
SpaceInEmptyParentheses: 'false'
20+
SpacesInParentheses: 'true'
21+
Standard: Cpp11
22+
TabWidth: '4'
23+
UseTab: Never
24+
25+
...

0 commit comments

Comments
 (0)