diff --git a/common/advanced_config.cpp b/common/advanced_config.cpp index d64f712159..619db0c9d4 100644 --- a/common/advanced_config.cpp +++ b/common/advanced_config.cpp @@ -159,8 +159,6 @@ static const wxChar HotkeysDumper[] = wxT( "HotkeysDumper" ); static const wxChar DrawBoundingBoxes[] = wxT( "DrawBoundingBoxes" ); -static const wxChar AllowDarkMode[] = wxT( "AllowDarkMode" ); - static const wxChar ShowPcbnewExportNetlist[] = wxT( "ShowPcbnewExportNetlist" ); } // namespace KEYS @@ -264,7 +262,6 @@ ADVANCED_CFG::ADVANCED_CFG() m_SmallDrillMarkSize = 0.35; m_HotkeysDumper = false; m_DrawBoundingBoxes = false; - m_AllowDarkMode = false; m_ShowPcbnewExportNetlist = false; loadFromConfigFile(); @@ -359,15 +356,6 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg ) configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::DrawBoundingBoxes, &m_DrawBoundingBoxes, false ) ); -#if defined( __WXGTK__ ) || defined( __WXMSW__ ) - bool defaultDarkMode = true; -#else - bool defaultDarkMode = false; -#endif - - configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::AllowDarkMode, - &m_AllowDarkMode, defaultDarkMode ) ); - configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::ShowPcbnewExportNetlist, &m_ShowPcbnewExportNetlist, false ) ); diff --git a/common/bitmap_store.cpp b/common/bitmap_store.cpp index 44c1133d06..52b02f221c 100644 --- a/common/bitmap_store.cpp +++ b/common/bitmap_store.cpp @@ -170,7 +170,7 @@ bool BITMAP_STORE::ThemeChanged() wxString oldTheme = m_theme; - if( ADVANCED_CFG::GetCfg().m_AllowDarkMode && settings ) + if( settings ) { switch( settings->m_Appearance.icon_theme ) { diff --git a/common/dialogs/panel_common_settings.cpp b/common/dialogs/panel_common_settings.cpp index 3da68d0358..132dcafdda 100644 --- a/common/dialogs/panel_common_settings.cpp +++ b/common/dialogs/panel_common_settings.cpp @@ -72,14 +72,6 @@ PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( DIALOG_SHIM* aDialog, wxWindow* aP m_antialiasingFallbackLabel->Show( false ); #endif - if( !ADVANCED_CFG::GetCfg().m_AllowDarkMode ) - { - m_rbIconThemeLight->Hide(); - m_rbIconThemeDark->Hide(); - m_rbIconThemeAuto->Hide(); - m_stIconTheme->Hide(); - } - m_textEditorBtn->SetBitmap( KiBitmap( BITMAPS::small_folder ) ); m_pdfViewerBtn->SetBitmap( KiBitmap( BITMAPS::small_folder ) ); diff --git a/common/tool/action_toolbar.cpp b/common/tool/action_toolbar.cpp index e54aea194d..004bb0cb92 100644 --- a/common/tool/action_toolbar.cpp +++ b/common/tool/action_toolbar.cpp @@ -181,11 +181,8 @@ ACTION_TOOLBAR::ACTION_TOOLBAR( EDA_BASE_FRAME* parent, wxWindowID id, const wxP #if !wxCHECK_VERSION( 3, 1, 0 ) // Custom art provider makes dark mode work on wx < 3.1 - if( ADVANCED_CFG::GetCfg().m_AllowDarkMode ) - { - WX_AUI_TOOLBAR_ART* newArt = new WX_AUI_TOOLBAR_ART(); - SetArtProvider( newArt ); - } + WX_AUI_TOOLBAR_ART* newArt = new WX_AUI_TOOLBAR_ART(); + SetArtProvider( newArt ); #endif Connect( wxEVT_COMMAND_TOOL_CLICKED, wxAuiToolBarEventHandler( ACTION_TOOLBAR::onToolEvent ), diff --git a/common/widgets/infobar.cpp b/common/widgets/infobar.cpp index b110ca7033..1a110ca66f 100644 --- a/common/widgets/infobar.cpp +++ b/common/widgets/infobar.cpp @@ -19,6 +19,7 @@ */ #include +#include #include #include "wx/artprov.h" #include @@ -54,7 +55,10 @@ WX_INFOBAR::WX_INFOBAR( wxWindow* aParent, wxAuiManager* aMgr, wxWindowID aWinid #ifdef __WXMAC__ // wxWidgets hard-codes wxSYS_COLOUR_INFOBK to { 0xFF, 0xFF, 0xD3 } on Mac. - SetBackgroundColour( wxColour( 255, 249, 189 ) ); + if( KIPLATFORM::UI::IsDarkTheme() ) + SetBackgroundColour( wxColour( 28, 27, 20 ) ); + else + SetBackgroundColour( wxColour( 255, 249, 189 ) ); #endif SetShowHideEffects( wxSHOW_EFFECT_ROLL_TO_BOTTOM, wxSHOW_EFFECT_ROLL_TO_TOP ); diff --git a/include/advanced_config.h b/include/advanced_config.h index bd806cc1e6..75bee67654 100644 --- a/include/advanced_config.h +++ b/include/advanced_config.h @@ -165,11 +165,6 @@ public: */ bool m_DrawBoundingBoxes; - /** - * Enable detection of dark mode and automatic switch to dark-mode icon theme - */ - bool m_AllowDarkMode; - /** * Enable exporting board editor netlist to a file for troubleshooting purposes. */ diff --git a/resources/macos/plist/bitmap2component.Info.plist.in b/resources/macos/plist/bitmap2component.Info.plist.in index d1e54045a2..e858155e7b 100644 --- a/resources/macos/plist/bitmap2component.Info.plist.in +++ b/resources/macos/plist/bitmap2component.Info.plist.in @@ -17,7 +17,6 @@ CFBundleVersion @KICAD_VERSION_FULL@ CSResourcesFileMapped LSRequiresCarbon - NSRequiresAquaSystemAppearance NSHumanReadableCopyright Copyright The KiCad Developers NSHighResolutionCapable True diff --git a/resources/macos/plist/eeschema.Info.plist.in b/resources/macos/plist/eeschema.Info.plist.in index bf13a0721d..03d43ce049 100644 --- a/resources/macos/plist/eeschema.Info.plist.in +++ b/resources/macos/plist/eeschema.Info.plist.in @@ -30,7 +30,6 @@ CFBundleVersion @KICAD_VERSION_FULL@ CSResourcesFileMapped LSRequiresCarbon - NSRequiresAquaSystemAppearance NSHumanReadableCopyright Copyright The KiCad Developers NSHighResolutionCapable True diff --git a/resources/macos/plist/gerbview.Info.plist.in b/resources/macos/plist/gerbview.Info.plist.in index 685b472da1..05ba15dc35 100644 --- a/resources/macos/plist/gerbview.Info.plist.in +++ b/resources/macos/plist/gerbview.Info.plist.in @@ -49,7 +49,6 @@ CFBundleVersion @KICAD_VERSION_FULL@ CSResourcesFileMapped LSRequiresCarbon - NSRequiresAquaSystemAppearance NSHumanReadableCopyright Copyright The KiCad Developers NSHighResolutionCapable True diff --git a/resources/macos/plist/kicad.Info.plist.in b/resources/macos/plist/kicad.Info.plist.in index 3001eeb7e2..af9995e499 100644 --- a/resources/macos/plist/kicad.Info.plist.in +++ b/resources/macos/plist/kicad.Info.plist.in @@ -29,7 +29,6 @@ CFBundleVersion @KICAD_VERSION_FULL@ CSResourcesFileMapped LSRequiresCarbon - NSRequiresAquaSystemAppearance NSHumanReadableCopyright Copyright The KiCad Developers NSHighResolutionCapable True diff --git a/resources/macos/plist/pcb_calculator.Info.plist.in b/resources/macos/plist/pcb_calculator.Info.plist.in index eaf340c9fa..22c7a59233 100644 --- a/resources/macos/plist/pcb_calculator.Info.plist.in +++ b/resources/macos/plist/pcb_calculator.Info.plist.in @@ -16,7 +16,6 @@ CFBundleVersion @KICAD_VERSION_FULL@ CSResourcesFileMapped LSRequiresCarbon - NSRequiresAquaSystemAppearance NSHumanReadableCopyright Copyright The KiCad Developers NSHighResolutionCapable True diff --git a/resources/macos/plist/pcbnew.Info.plist.in b/resources/macos/plist/pcbnew.Info.plist.in index 038af9db14..bd39813aa7 100644 --- a/resources/macos/plist/pcbnew.Info.plist.in +++ b/resources/macos/plist/pcbnew.Info.plist.in @@ -31,7 +31,6 @@ CFBundleVersion @KICAD_VERSION_FULL@ CSResourcesFileMapped LSRequiresCarbon - NSRequiresAquaSystemAppearance NSHumanReadableCopyright Copyright The KiCad Developers NSHighResolutionCapable True diff --git a/resources/macos/plist/pleditor.Info.plist.in b/resources/macos/plist/pleditor.Info.plist.in index 39261fc806..d8369a8dbe 100644 --- a/resources/macos/plist/pleditor.Info.plist.in +++ b/resources/macos/plist/pleditor.Info.plist.in @@ -29,7 +29,6 @@ CFBundleVersion @KICAD_VERSION_FULL@ CSResourcesFileMapped LSRequiresCarbon - NSRequiresAquaSystemAppearance NSHumanReadableCopyright Copyright The KiCad Developers NSHighResolutionCapable True