MSW_DarkMode: Next Improvements

* Refreshed title bar for all Dialogs and MainFrame
* Refreshed header of the DataViewCtrl and ListView
* Refresh tooltips
* Redraw SpinCtrls
* Use system menu with is colored in respect to the color mode
* Preferences: Added parameter "Use system menu for application" and moved to the "Dark mode" tab with "Enable Dark mode parameter"
This commit is contained in:
YuSanka 2021-11-01 16:24:31 +01:00
parent 7520e2f193
commit aff9e1f7ea
10 changed files with 123 additions and 33 deletions

View file

@ -27,6 +27,10 @@
#include <wx/wupdlock.h>
#include <wx/debug.h>
#ifdef _MSW_DARK_MODE
#include <wx/msw/dark_mode.h>
#endif // _MSW_DARK_MODE
#include "libslic3r/Platform.hpp"
#include "libslic3r/Utils.hpp"
#include "libslic3r/Config.hpp"
@ -2796,7 +2800,11 @@ ConfigWizard::ConfigWizard(wxWindow *parent)
auto *vsizer = new wxBoxSizer(wxVERTICAL);
auto *topsizer = new wxBoxSizer(wxHORIZONTAL);
auto *hline = new wxStaticLine(this);
wxStaticLine* hline = nullptr;
#ifdef _MSW_DARK_MODE
if (!NppDarkMode::IsEnabled())
#endif //_MSW_DARK_MODE
hline = new wxStaticLine(this);
p->btnsizer = new wxBoxSizer(wxHORIZONTAL);
// Initially we _do not_ SetScrollRate in order to figure out the overall width of the Wizard without scrolling.
@ -2872,7 +2880,8 @@ ConfigWizard::ConfigWizard(wxWindow *parent)
p->index->go_to(size_t{0});
vsizer->Add(topsizer, 1, wxEXPAND | wxALL, DIALOG_MARGIN);
vsizer->Add(hline, 0, wxEXPAND);
if (hline)
vsizer->Add(hline, 0, wxEXPAND);
vsizer->Add(p->btnsizer, 0, wxEXPAND | wxALL, DIALOG_MARGIN);
SetSizer(vsizer);