Updated titlebar and splash screen + hidden statusbar for gcode viewer
This commit is contained in:
parent
ea9a8b7e93
commit
b991b613de
4 changed files with 44 additions and 8 deletions
|
@ -6,4 +6,7 @@
|
||||||
#define SLIC3R_VERSION "@SLIC3R_VERSION@"
|
#define SLIC3R_VERSION "@SLIC3R_VERSION@"
|
||||||
#define SLIC3R_BUILD_ID "@SLIC3R_BUILD_ID@"
|
#define SLIC3R_BUILD_ID "@SLIC3R_BUILD_ID@"
|
||||||
|
|
||||||
|
#define GCODEVIEWER_APP_NAME "@GCODEVIEWER_APP_NAME@"
|
||||||
|
#define GCODEVIEWER_BUILD_ID "@GCODEVIEWER_BUILD_ID@"
|
||||||
|
|
||||||
#endif /* __SLIC3R_VERSION_H */
|
#endif /* __SLIC3R_VERSION_H */
|
||||||
|
|
|
@ -161,7 +161,15 @@ static void DecorateSplashScreen(wxBitmap& bmp)
|
||||||
memDc.DrawRectangle(banner_rect);
|
memDc.DrawRectangle(banner_rect);
|
||||||
|
|
||||||
// title
|
// title
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
#if ENABLE_GCODE_VIEWER
|
||||||
|
wxString title_string = wxGetApp().is_editor() ? SLIC3R_APP_NAME : GCODEVIEWER_APP_NAME;
|
||||||
|
#else
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
wxString title_string = SLIC3R_APP_NAME;
|
wxString title_string = SLIC3R_APP_NAME;
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
wxFont title_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
wxFont title_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||||
title_font.SetPointSize(24);
|
title_font.SetPointSize(24);
|
||||||
|
|
||||||
|
|
|
@ -116,12 +116,17 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_S
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
// initialize status bar
|
// initialize status bar
|
||||||
m_statusbar = std::make_shared<ProgressStatusBar>(this);
|
m_statusbar = std::make_shared<ProgressStatusBar>(this);
|
||||||
m_statusbar->set_font(GUI::wxGetApp().normal_font());
|
m_statusbar->set_font(GUI::wxGetApp().normal_font());
|
||||||
m_statusbar->embed(this);
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
m_statusbar->set_status_text(_(L("Version")) + " " +
|
#if ENABLE_GCODE_VIEWER
|
||||||
SLIC3R_VERSION +
|
if (wxGetApp().is_editor())
|
||||||
_(L(" - Remember to check for updates at https://github.com/prusa3d/PrusaSlicer/releases")));
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
m_statusbar->embed(this);
|
||||||
|
m_statusbar->set_status_text(_L("Version") + " " +
|
||||||
|
SLIC3R_VERSION +
|
||||||
|
_L(" - Remember to check for updates at https://github.com/prusa3d/PrusaSlicer/releases"));
|
||||||
|
|
||||||
// initialize tabpanel and menubar
|
// initialize tabpanel and menubar
|
||||||
init_tabpanel();
|
init_tabpanel();
|
||||||
|
@ -526,8 +531,7 @@ void MainFrame::shutdown()
|
||||||
void MainFrame::update_title()
|
void MainFrame::update_title()
|
||||||
{
|
{
|
||||||
wxString title = wxEmptyString;
|
wxString title = wxEmptyString;
|
||||||
if (m_plater != nullptr)
|
if (m_plater != nullptr) {
|
||||||
{
|
|
||||||
// m_plater->get_project_filename() produces file name including path, but excluding extension.
|
// m_plater->get_project_filename() produces file name including path, but excluding extension.
|
||||||
// Don't try to remove the extension, it would remove part of the file name after the last dot!
|
// Don't try to remove the extension, it would remove part of the file name after the last dot!
|
||||||
wxString project = from_path(into_path(m_plater->get_project_filename()).filename());
|
wxString project = from_path(into_path(m_plater->get_project_filename()).filename());
|
||||||
|
@ -535,7 +539,15 @@ void MainFrame::update_title()
|
||||||
title += (project + " - ");
|
title += (project + " - ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
#if ENABLE_GCODE_VIEWER
|
||||||
|
std::string build_id = wxGetApp().is_editor() ? SLIC3R_BUILD_ID : GCODEVIEWER_BUILD_ID;
|
||||||
|
#else
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
std::string build_id = SLIC3R_BUILD_ID;
|
std::string build_id = SLIC3R_BUILD_ID;
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
size_t idx_plus = build_id.find('+');
|
size_t idx_plus = build_id.find('+');
|
||||||
if (idx_plus != build_id.npos) {
|
if (idx_plus != build_id.npos) {
|
||||||
// Parse what is behind the '+'. If there is a number, then it is a build number after the label, and full build ID is shown.
|
// Parse what is behind the '+'. If there is a number, then it is a build number after the label, and full build ID is shown.
|
||||||
|
@ -550,7 +562,17 @@ void MainFrame::update_title()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
title += (wxString(build_id) + " " + _(L("based on Slic3r")));
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
#if ENABLE_GCODE_VIEWER
|
||||||
|
title += wxString(build_id);
|
||||||
|
if (wxGetApp().is_editor())
|
||||||
|
title += (" " + _L("based on Slic3r"));
|
||||||
|
#else
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
title += (wxString(build_id) + " " + _L("based on Slic3r"));
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
#endif // ENABLE_GCODE_VIEWER
|
||||||
|
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||||
|
|
||||||
SetTitle(title);
|
SetTitle(title);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,3 +7,6 @@ set(SLIC3R_VERSION "2.3.0-alpha0")
|
||||||
set(SLIC3R_BUILD_ID "PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN")
|
set(SLIC3R_BUILD_ID "PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN")
|
||||||
set(SLIC3R_RC_VERSION "2,3,0,0")
|
set(SLIC3R_RC_VERSION "2,3,0,0")
|
||||||
set(SLIC3R_RC_VERSION_DOTS "2.3.0.0")
|
set(SLIC3R_RC_VERSION_DOTS "2.3.0.0")
|
||||||
|
|
||||||
|
set(GCODEVIEWER_APP_NAME "Prusa GCode Viewer")
|
||||||
|
set(GCODEVIEWER_BUILD_ID "Prusa GCode Viewer-${SLIC3R_VERSION}+UNKNOWN")
|
||||||
|
|
Loading…
Add table
Reference in a new issue