Skip to content

Commit 33b1f41

Browse files
author
Ravbug
committed
#41 Dark mode on Windows
1 parent 82b68ce commit 33b1f41

File tree

8,896 files changed

+1041190
-1833991
lines changed

Some content is hidden

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

8,896 files changed

+1041190
-1833991
lines changed

source/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<key>CFBundlePackageType</key>
2929
<string>APPL</string>
3030
<key>CFBundleShortVersionString</key>
31-
<string>1.57</string>
31+
<string>1.58</string>
3232
<key>CFBundleSignature</key>
3333
<string>UNHn</string>
3434
<key>CFBundleVersion</key>

source/activation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ void PersonalActivationDlg::OnActivateHit(wxCommandEvent&)
9494

9595
void PlusProActivationDlg::OnActivateHit(wxCommandEvent&)
9696
{
97-
const std::string& username = plusProActivUsernameCtrl->GetValue();
98-
const std::string& password = plusProActivPasswordCtrl->GetValue();
99-
const std::string& serial = plusProActivationSerialCtrl->GetValue();
97+
const std::string& username = plusProActivUsernameCtrl->GetValue().ToStdString();
98+
const std::string& password = plusProActivPasswordCtrl->GetValue().ToStdString();
99+
const std::string& serial = plusProActivationSerialCtrl->GetValue().ToStdString();
100100

101101
auto cmd = fmt::format("{} -batchmode -username {} -password {} -serial {} -quit",the_editor.executablePath().string(),username,password,serial);
102102

source/globals.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ void reveal_in_explorer(const std::filesystem::path& path) {
3131
std::string command = "xdg-open \"" + path.string() + "\"";
3232
launch_process(command);
3333
#elif defined _WIN32
34-
3534
PIDLIST_ABSOLUTE pidl;
3635
SFGAOF attributes;
3736
HRESULT hr = SHParseDisplayName(path.c_str(), nullptr, &pidl, 0, &attributes);

source/globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
static constexpr std::string_view projectsFile = "projects.txt";
1515
static constexpr std::string_view editorPathsFile = "editorPaths.txt";
1616
static constexpr std::string_view templatePrefix = "com.unity.template";
17-
static constexpr std::string_view AppVersion = "v1.57";
17+
static constexpr std::string_view AppVersion = "v1.58";
1818

1919
struct wxListCtrl;
2020
struct wxWindow;

source/interface_derived.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ MainFrameDerived::MainFrameDerived() : MainFrame(NULL){
8383
#elif defined _WIN32
8484
int status = mkdir(datapath.string().c_str());
8585
//on windows also make the main window background white
86-
this->SetBackgroundColour(*wxWHITE);
86+
if (!wxSystemSettings::GetAppearance().IsDark()) {
87+
this->SetBackgroundColour(*wxWHITE);
88+
}
8789
//high DPI scaling fixes
8890
dpi_scale(this);
8991
//set reveal label
@@ -95,7 +97,7 @@ MainFrameDerived::MainFrameDerived() : MainFrame(NULL){
9597
#if defined __linux__
9698
launchHubBtn->Hide();
9799
#endif
98-
100+
99101
//if no projects to load, the interface will be blank
100102

101103
//show current version in titlebar
@@ -211,7 +213,7 @@ void MainFrameDerived::Filter(wxKeyEvent &){
211213
wxListEvent e;
212214
OnDeselectProject(e);
213215
projects.clear();
214-
auto filter = projSearchCtrl->GetValue();
216+
auto filter = projSearchCtrl->GetValue().ToStdString();
215217
transform(filter.begin(), filter.end(), filter.begin(), ::tolower);
216218
LoadProjects(filter);
217219
}

source/main.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@
2020
class UnityHubNative: public wxApp
2121
{
2222
public:
23-
virtual bool OnInit();
23+
virtual bool OnInit();
2424
};
2525

2626
wxIMPLEMENT_APP(UnityHubNative);
2727
bool UnityHubNative::OnInit()
2828
{
29+
#if _WIN32
30+
MSWEnableDarkMode();
31+
#endif
2932
MainFrame *frame = new MainFrameDerived();
3033
//set the icon (windows and linux only)
3134
#ifdef _WIN32
3235
//name is the same as the one used in the resource file definition
3336
//the resource file definition must have the same ending as the name of the icon file itself
3437
//in this case, the icon file is wxwin.ico, so the definition is IDI_WXWIN
3538
frame->SetIcon(wxIcon("IDI_WXWIN"));
39+
SetAppearance(Appearance::System);
3640
#elif __linux
3741
frame->SetIcon(wxIcon(wxICON(wxlin)));
3842
#endif

wxWidgets/.circleci/config.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

wxWidgets/.cirrus.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

wxWidgets/.git-blame-ignore-revs

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,44 @@
55
# It's supported by Git 2.23 or later and to use it by default for all the
66
# future git-blame invocations, run the following command:
77
#
8-
# git config blame.ignoreRevsFile misc/git/ignore_revs
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
933

1034
# Fix comment typos in sources, 2021-10-02
1135
668a2186cd89fd4576bed224df3624811eebeca1
1236

37+
# Wrap variable initializations after '=' consistently, 2019-11-22
38+
2bc6e50eded2a14099655ce0b4c7df582b87c93a
39+
1340
# Remove all trailing spaces, 2019-01-30
1441
8fbca5cb70c8b647d5bd2cacb1e0a2a00358f351
1542

43+
# Remove more wxT() macros from samples, 2018-09-29
44+
b70ed2d8c84cadf10bd42fc052a255fac02391e4
45+
1646
# Remove (most) occurrences of wxT() macro from the samples, 2018-09-23
1747
f58ea625968953ca93585ea7f93dcc07ad032d8f
1848

@@ -22,7 +52,7 @@ f58ea625968953ca93585ea7f93dcc07ad032d8f
2252
# Remove all lines containing cvs/svn "$Id$" keyword.
2353
3f66f6a5b3583b02c34854556eb83e3a808524ce
2454

25-
# No changes, just removed hard tabs and trailing white space., 2009-08-21)
55+
# No changes, just removed hard tabs and trailing white space., 2009-08-21
2656
03647350fc7cd141953c72e0284e928847d30f44
2757

2858
# Globally replace _T() with wxT()., 2009-07-23
@@ -41,9 +71,15 @@ a3ef8eb50346e04c080ed1711578390080baff8b
4171
# classes), gridctrl.cpp (for wxGridCellRenderer-derived classes), 2009-01-11
4272
29efc6e4a478652d6f59fb3f5ca7990d78a8ead4
4373

74+
# removed trailing whitespace, 2007-11-27
75+
b9db5f3061af49519c56e9981d627a5b206507f3
76+
4477
# cleanup - reformatting, 2006-04-20
4578
a9339fe22c1815cfbbf2ed9c300c897256644d18
4679

80+
# Source cleaning, warning fixes., 2005-01-13
81+
2ad1ff540f036e130ed934066b80652c2c5fe158
82+
4783
# Code cleaning: wxID_ANY, wxDefaultSize, wxDefaultPosition, true, false,
4884
# wxEmptyString, tabs and white spaces, 2004-06-17
4985
ca65c0440a7163e4e37e48b1c4329709d722db47

wxWidgets/.mailmap

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)