diff --git a/common/bitmap_info.cpp b/common/bitmap_info.cpp index 49424a898c..6ce70852e4 100644 --- a/common/bitmap_info.cpp +++ b/common/bitmap_info.cpp @@ -1093,6 +1093,7 @@ void BuildBitmapInfo( std::unordered_map>& aBi aBitmapInfoCache[BITMAPS::rectwaveguide].emplace_back( BITMAPS::rectwaveguide, wxT( "rectwaveguide.png" ), -1, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::regul].emplace_back( BITMAPS::regul, wxT( "regul.png" ), -1, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::regul_3pins].emplace_back( BITMAPS::regul_3pins, wxT( "regul_3pins.png" ), -1, wxT( "light" ) ); + aBitmapInfoCache[BITMAPS::splash].emplace_back( BITMAPS::splash, wxT( "splash.png" ), -1, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::stripline].emplace_back( BITMAPS::stripline, wxT( "stripline.png" ), -1, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::stroke_dash].emplace_back( BITMAPS::stroke_dash, wxT( "stroke_dash.png" ), -1, wxT( "light" ) ); aBitmapInfoCache[BITMAPS::stroke_dashdot].emplace_back( BITMAPS::stroke_dashdot, wxT( "stroke_dashdot.png" ), -1, wxT( "light" ) ); @@ -1132,6 +1133,7 @@ void BuildBitmapInfo( std::unordered_map>& aBi aBitmapInfoCache[BITMAPS::rectwaveguide].emplace_back( BITMAPS::rectwaveguide, wxT( "rectwaveguide_dark.png" ), -1, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::regul].emplace_back( BITMAPS::regul, wxT( "regul_dark.png" ), -1, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::regul_3pins].emplace_back( BITMAPS::regul_3pins, wxT( "regul_3pins_dark.png" ), -1, wxT( "dark" ) ); + aBitmapInfoCache[BITMAPS::splash].emplace_back( BITMAPS::splash, wxT( "splash_dark.png" ), -1, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::stripline].emplace_back( BITMAPS::stripline, wxT( "stripline_dark.png" ), -1, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::stroke_dash].emplace_back( BITMAPS::stroke_dash, wxT( "stroke_dash_dark.png" ), -1, wxT( "dark" ) ); aBitmapInfoCache[BITMAPS::stroke_dashdot].emplace_back( BITMAPS::stroke_dashdot, wxT( "stroke_dashdot_dark.png" ), -1, wxT( "dark" ) ); diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp index d9a949f068..5264b75495 100644 --- a/common/pgm_base.cpp +++ b/common/pgm_base.cpp @@ -43,6 +43,7 @@ #include #include +#include #include // Needed for the pre wx 3.2 cli workaround #include #include @@ -66,6 +67,8 @@ #include #include +#include + #ifdef KICAD_USE_SENTRY #include #include @@ -130,6 +133,7 @@ PGM_BASE::PGM_BASE() m_Quitting = false; m_argcUtf8 = 0; m_argvUtf8 = nullptr; + m_splash = nullptr; setLanguageId( wxLANGUAGE_DEFAULT ); @@ -139,6 +143,7 @@ PGM_BASE::PGM_BASE() PGM_BASE::~PGM_BASE() { + HideSplash(); Destroy(); for( int n = 0; n < m_argcUtf8; n++ ) @@ -399,6 +404,28 @@ void PGM_BASE::BuildArgvUtf8() } +void PGM_BASE::ShowSplash() +{ + if( m_splash ) + return; + + m_splash = new wxSplashScreen( KiBitmap( BITMAPS::splash ), wxSPLASH_CENTRE_ON_SCREEN, 0, + NULL, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE | wxSTAY_ON_TOP ); + wxYield(); +} + + +void PGM_BASE::HideSplash() +{ + if( !m_splash ) + return; + + m_splash->Close(); + m_splash->Destroy(); + m_splash = nullptr; +} + + bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit, bool aIsUnitTest ) { #if defined( __WXMAC__ ) @@ -479,6 +506,9 @@ bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit, bool aIsUnitTest ) SetLanguagePath(); SetDefaultLanguage( tmp ); + if( !aHeadless ) + ShowSplash(); + m_settings_manager = std::make_unique( aHeadless ); // Our unit test mocks break if we continue diff --git a/common/single_top.cpp b/common/single_top.cpp index 465b73a9b0..f5a40eac98 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -408,5 +408,7 @@ bool PGM_SINGLE_TOP::OnPgmInit() frame->OpenProjectFiles( fileArgs ); } + HideSplash(); + return true; } diff --git a/include/bitmaps/bitmaps_list.h b/include/bitmaps/bitmaps_list.h index 0161c55de2..f40b1863aa 100644 --- a/include/bitmaps/bitmaps_list.h +++ b/include/bitmaps/bitmaps_list.h @@ -544,6 +544,7 @@ enum class BITMAPS : unsigned int small_up, small_warning, special_tools, + splash, spreadsheet, stripline, stroke_dash, diff --git a/include/pgm_base.h b/include/pgm_base.h index 04bbc83e50..b280f84f2f 100644 --- a/include/pgm_base.h +++ b/include/pgm_base.h @@ -46,6 +46,7 @@ class wxSingleInstanceChecker; class wxApp; class wxMenu; class wxWindow; +class wxSplashScreen; class COMMON_SETTINGS; class SETTINGS_MANAGER; @@ -352,6 +353,10 @@ public: */ bool IsGUI(); + + void ShowSplash(); + void HideSplash(); + /** * wxWidgets on MSW tends to crash if you spool up more than one print job at a time. */ @@ -407,6 +412,8 @@ protected: /// and will return argv as either force converted to ascii in char* or wchar_t only int m_argcUtf8; + + wxSplashScreen* m_splash; }; diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 48b41e33f7..d170e7429e 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -353,6 +353,8 @@ bool PGM_KICAD::OnPgmInit() frame->Show( true ); frame->Raise(); + HideSplash(); + return true; } diff --git a/resources/bitmaps_png/CMakeLists.txt b/resources/bitmaps_png/CMakeLists.txt index b0bc20579a..c10191ba1f 100644 --- a/resources/bitmaps_png/CMakeLists.txt +++ b/resources/bitmaps_png/CMakeLists.txt @@ -636,6 +636,7 @@ set( BMAPS_OTHER creepage_clearance cpw cpw_back + light microstrip microstrip_zodd_zeven pads_npth @@ -648,6 +649,7 @@ set( BMAPS_OTHER rectwaveguide regul regul_3pins + splash stripline stroke_dash stroke_dashdot diff --git a/resources/bitmaps_png/banners/splash_1240.afdesign b/resources/bitmaps_png/banners/splash_1240.afdesign new file mode 100644 index 0000000000..efe21a7dcf Binary files /dev/null and b/resources/bitmaps_png/banners/splash_1240.afdesign differ diff --git a/resources/bitmaps_png/png/splash.png b/resources/bitmaps_png/png/splash.png new file mode 100644 index 0000000000..23d46d6e20 Binary files /dev/null and b/resources/bitmaps_png/png/splash.png differ diff --git a/resources/bitmaps_png/png/splash_dark.png b/resources/bitmaps_png/png/splash_dark.png new file mode 100644 index 0000000000..23d46d6e20 Binary files /dev/null and b/resources/bitmaps_png/png/splash_dark.png differ diff --git a/resources/bitmaps_png/sources/dark/splash.svg b/resources/bitmaps_png/sources/dark/splash.svg new file mode 100644 index 0000000000..c3ca046060 --- /dev/null +++ b/resources/bitmaps_png/sources/dark/splash.svg @@ -0,0 +1,10404 @@ + + + + diff --git a/resources/bitmaps_png/sources/light/splash.svg b/resources/bitmaps_png/sources/light/splash.svg new file mode 100644 index 0000000000..c3ca046060 --- /dev/null +++ b/resources/bitmaps_png/sources/light/splash.svg @@ -0,0 +1,10404 @@ + + + +