mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-04 19:40:39 +08:00
back to c++11 semantics for initialization.
This commit is contained in:
parent
b799516d00
commit
ac80e2da7f
@ -10,17 +10,17 @@ static void link_clicked(wxHtmlLinkEvent& e)
|
|||||||
|
|
||||||
AboutDialog::AboutDialog(wxWindow* parent) : wxDialog(parent, -1, _("About Slic3r"), wxDefaultPosition, wxSize(600, 460), wxCAPTION)
|
AboutDialog::AboutDialog(wxWindow* parent) : wxDialog(parent, -1, _("About Slic3r"), wxDefaultPosition, wxSize(600, 460), wxCAPTION)
|
||||||
{
|
{
|
||||||
auto hsizer = new wxBoxSizer(wxHORIZONTAL) ;
|
auto* hsizer {new wxBoxSizer(wxHORIZONTAL)} ;
|
||||||
|
|
||||||
auto vsizer = new wxBoxSizer(wxVERTICAL) ;
|
auto* vsizer {new wxBoxSizer(wxVERTICAL)} ;
|
||||||
|
|
||||||
// logo
|
// logo
|
||||||
auto logo = new AboutDialogLogo(this);
|
auto* logo {new AboutDialogLogo(this)};
|
||||||
hsizer->Add(logo, 0, wxEXPAND | wxLEFT | wxRIGHT, 30);
|
hsizer->Add(logo, 0, wxEXPAND | wxLEFT | wxRIGHT, 30);
|
||||||
|
|
||||||
// title
|
// title
|
||||||
auto title = new wxStaticText(this, -1, "Slic3r", wxDefaultPosition, wxDefaultSize);
|
auto* title { new wxStaticText(this, -1, "Slic3r", wxDefaultPosition, wxDefaultSize)};
|
||||||
auto title_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
auto title_font { wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)};
|
||||||
|
|
||||||
title_font.SetWeight(wxFONTWEIGHT_BOLD);
|
title_font.SetWeight(wxFONTWEIGHT_BOLD);
|
||||||
title_font.SetFamily(wxFONTFAMILY_ROMAN);
|
title_font.SetFamily(wxFONTFAMILY_ROMAN);
|
||||||
@ -31,8 +31,8 @@ AboutDialog::AboutDialog(wxWindow* parent) : wxDialog(parent, -1, _("About Slic3
|
|||||||
|
|
||||||
// version
|
// version
|
||||||
|
|
||||||
auto version = new wxStaticText(this, -1, wxString("Version ") + wxString(SLIC3R_VERSION), wxDefaultPosition, wxDefaultSize);
|
auto* version {new wxStaticText(this, -1, wxString("Version ") + wxString(SLIC3R_VERSION), wxDefaultPosition, wxDefaultSize)};
|
||||||
auto version_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
auto version_font { wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT) };
|
||||||
version_font.SetPointSize((the_os == OS::Windows ? 9 : 11));
|
version_font.SetPointSize((the_os == OS::Windows ? 9 : 11));
|
||||||
version->SetFont(version_font);
|
version->SetFont(version_font);
|
||||||
vsizer->Add(version, 0, wxALIGN_LEFT | wxBOTTOM, 10);
|
vsizer->Add(version, 0, wxALIGN_LEFT | wxBOTTOM, 10);
|
||||||
@ -54,7 +54,7 @@ AboutDialog::AboutDialog(wxWindow* parent) : wxDialog(parent, -1, _("About Slic3
|
|||||||
<< "Built on " << build_date << " at git version " << git_version << "."
|
<< "Built on " << build_date << " at git version " << git_version << "."
|
||||||
<< "</body>"
|
<< "</body>"
|
||||||
<< "</html>";
|
<< "</html>";
|
||||||
auto html = new wxHtmlWindow(this, -1, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_NEVER);
|
auto* html {new wxHtmlWindow(this, -1, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_NEVER)};
|
||||||
html->SetBorders(2);
|
html->SetBorders(2);
|
||||||
html->SetPage(text);
|
html->SetPage(text);
|
||||||
|
|
||||||
@ -83,13 +83,13 @@ AboutDialogLogo::AboutDialogLogo(wxWindow* parent) :
|
|||||||
|
|
||||||
void AboutDialogLogo::repaint(wxPaintEvent& event)
|
void AboutDialogLogo::repaint(wxPaintEvent& event)
|
||||||
{
|
{
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc {this};
|
||||||
|
|
||||||
dc.SetBackgroundMode(wxPENSTYLE_TRANSPARENT);
|
dc.SetBackgroundMode(wxPENSTYLE_TRANSPARENT);
|
||||||
|
|
||||||
const wxSize size = this->GetSize() ;
|
const wxSize size {this->GetSize()} ;
|
||||||
const auto logo_w = this->logo.GetWidth();
|
const auto logo_w {this->logo.GetWidth()};
|
||||||
const auto logo_h = this->logo.GetHeight();
|
const auto logo_h {this->logo.GetHeight()};
|
||||||
|
|
||||||
dc.DrawBitmap(this->logo, (size.GetWidth() - logo_w) / 2, (size.GetHeight() - logo_h) / 2, 1);
|
dc.DrawBitmap(this->logo, (size.GetWidth() - logo_w) / 2, (size.GetHeight() - logo_h) / 2, 1);
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user