wxStaticText *
-add_label_to_sizer (wxGridBagSizer* s, wxWindow* p, wxString t, bool left, wxGBPosition pos, wxGBSpan span)
+add_label_to_sizer(wxGridBagSizer* s, wxWindow* p, wxString t, bool left, wxGBPosition pos, wxGBSpan span, bool indent)
{
- int flags = wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT;
+ int flags = wxALIGN_CENTER_VERTICAL | wxLEFT;
#ifdef __WXOSX__
setup_osx_flags (s, left, flags);
#endif
auto m = create_label (p, t, left);
- s->Add (m, pos, span, flags);
+ s->Add(m, pos, span, flags, indent ? DCPOMATIC_SIZER_X_GAP : 0);
return m;
}
}
-wxSplashScreen *
+wx_ptr<wxSplashScreen>
maybe_show_splash ()
{
- wxSplashScreen* splash = nullptr;
+ wx_ptr<wxSplashScreen> splash;
+
try {
wxBitmap bitmap;
if (bitmap.LoadFile(bitmap_path("splash.png"), wxBITMAP_TYPE_PNG)) {
}
#ifdef DCPOMATIC_WINDOWS
/* Having wxSTAY_ON_TOP means error dialogues hide behind the splash screen on Windows, no matter what I try */
- splash = new wxSplashScreen (bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, 0, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE | wxFRAME_NO_TASKBAR);
+ splash.reset(bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, nullptr, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE | wxFRAME_NO_TASKBAR);
#else
- splash = new wxSplashScreen (bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, 0, -1);
+ splash.reset(bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, nullptr, -1);
#endif
wxYield ();
}