mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-17 07:01:54 -06:00
MSW specific: Implementation of the own notebook control
* MSW specific: First implementation of the Notebook control to support Dark/Light color modes * MSW specific: Set mode sizer to the Notebook control. * MSW specific: Added icons to the Notepad control + There is no need to restart application after the changing of the color mode * Fixed non-MSW build * Updated color for SavePresetDialog + Added wrapper to wxMessageBox for mom-MSW platforms
This commit is contained in:
parent
7fce368cca
commit
4652733201
25 changed files with 703 additions and 135 deletions
|
@ -3,13 +3,13 @@
|
|||
#include "I18N.hpp"
|
||||
#include "libslic3r/Utils.hpp"
|
||||
#include "GUI.hpp"
|
||||
#include "Notebook.hpp"
|
||||
#include <wx/scrolwin.h>
|
||||
#include <wx/display.h>
|
||||
#include "GUI_App.hpp"
|
||||
#include "wxExtensions.hpp"
|
||||
#include "MainFrame.hpp"
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/listbook.h>
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
@ -18,8 +18,6 @@ KBShortcutsDialog::KBShortcutsDialog()
|
|||
: DPIDialog(static_cast<wxWindow*>(wxGetApp().mainframe), wxID_ANY, wxString(wxGetApp().is_editor() ? SLIC3R_APP_NAME : GCODEVIEWER_APP_NAME) + " - " + _L("Keyboard Shortcuts"),
|
||||
wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||
{
|
||||
// SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
||||
|
||||
// fonts
|
||||
const wxFont& font = wxGetApp().normal_font();
|
||||
const wxFont& bold_font = wxGetApp().bold_font();
|
||||
|
@ -31,13 +29,10 @@ KBShortcutsDialog::KBShortcutsDialog()
|
|||
|
||||
#ifdef _MSW_DARK_MODE
|
||||
wxBookCtrlBase* book;
|
||||
if (wxGetApp().dark_mode()) {
|
||||
book = new wxListbook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP);
|
||||
wxGetApp().UpdateDarkUI(book);
|
||||
wxGetApp().UpdateDarkUI(dynamic_cast<wxListbook*>(book)->GetListView());
|
||||
}
|
||||
else
|
||||
book = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP);
|
||||
// if (wxGetApp().dark_mode())
|
||||
book = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP);
|
||||
/* else
|
||||
book = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP);*/
|
||||
#else
|
||||
wxNotebook* book = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue