去除更新弹窗。去除打印机框。修改启动页弹窗

This commit is contained in:
cjw 2024-12-31 16:34:14 +08:00
parent ab151df7da
commit 66148de58e
3 changed files with 26 additions and 20 deletions

View File

@ -331,23 +331,25 @@ public:
wxRect title_rect(wxPoint(0, top_margin), wxPoint(split_width - text_padding, top_margin + title_height)); wxRect title_rect(wxPoint(0, top_margin), wxPoint(split_width - text_padding, top_margin + title_height));
memDc.SetTextForeground(StateColor::darkModeColorFor(wxColour(38, 46, 48))); memDc.SetTextForeground(StateColor::darkModeColorFor(wxColour(38, 46, 48)));
memDc.SetFont(m_constant_text.title_font); memDc.SetFont(m_constant_text.title_font);
memDc.DrawLabel(m_constant_text.title, title_rect, wxALIGN_RIGHT | wxALIGN_BOTTOM); //memDc.DrawLabel(m_constant_text.title, title_rect, wxALIGN_RIGHT | wxALIGN_BOTTOM);
memDc.DrawLabel(_L("Ui title"), title_rect, wxALIGN_CENTER_VERTICAL);
//BBS align bottom of title and version text //BBS align bottom of title and version text
wxRect version_rect(wxPoint(split_width + text_padding, top_margin), wxPoint(width, top_margin + title_height - text_padding)); //wxRect version_rect(wxPoint(split_width + text_padding, top_margin), wxPoint(width, top_margin + title_height - text_padding));
wxRect version_rect(wxPoint(split_width + text_padding, top_margin+10), wxPoint(width+10, top_margin + title_height - text_padding));
memDc.SetFont(m_constant_text.version_font); memDc.SetFont(m_constant_text.version_font);
memDc.SetTextForeground(StateColor::darkModeColorFor(wxColor(134, 134, 134))); memDc.SetTextForeground(StateColor::darkModeColorFor(wxColor(134, 134, 134)));
memDc.DrawLabel(m_constant_text.version, version_rect, wxALIGN_LEFT | wxALIGN_BOTTOM); //memDc.DrawLabel(m_constant_text.version, version_rect, wxALIGN_LEFT | wxALIGN_BOTTOM);
//memDc.DrawLabel(m_constant_text.version, version_rect, wxALIGN_TOP | wxALIGN_LEFT);
#if BBL_INTERNAL_TESTING
wxString versionText = BBL_INTERNAL_TESTING == 1 ? _L("Internal Version") : _L("Beta Version");
wxSize text_rect = memDc.GetTextExtent(versionText);
int start_x = (title_rect.GetLeft() + version_rect.GetRight()) / 2 - text_rect.GetWidth();
int start_y = version_rect.GetBottom() + 10;
wxRect internal_sign_rect(wxPoint(start_x, start_y), wxSize(text_rect));
memDc.SetFont(m_constant_text.title_font);
memDc.DrawLabel(versionText, internal_sign_rect, wxALIGN_TOP | wxALIGN_LEFT);
#endif
//#if BBL_INTERNAL_TESTING
// wxString versionText = BBL_INTERNAL_TESTING == 1 ? _L("Internal Version") : _L("Beta Version");
// wxSize text_rect = memDc.GetTextExtent(versionText);
// int start_x = (title_rect.GetLeft() + version_rect.GetRight()) / 2 - text_rect.GetWidth();
// int start_y = version_rect.GetBottom() + 10;
// wxRect internal_sign_rect(wxPoint(start_x, start_y), wxSize(text_rect));
// memDc.SetFont(m_constant_text.title_font);
// memDc.DrawLabel(versionText, internal_sign_rect, wxALIGN_TOP | wxALIGN_LEFT);
//#endif
// load bitmap for logo // load bitmap for logo
BitmapCache bmp_cache; BitmapCache bmp_cache;
int logo_margin = FromDIP(72 * m_scale); int logo_margin = FromDIP(72 * m_scale);

View File

@ -831,13 +831,13 @@ private:
// non-static so its not loaded too early. If static, the translations wont load correctly. // non-static so its not loaded too early. If static, the translations wont load correctly.
const std::vector<NotificationData> basic_notifications = { const std::vector<NotificationData> basic_notifications = {
NotificationData{NotificationType::Mouse3dDisconnected, NotificationLevel::RegularNotificationLevel, 10, _u8L("3D Mouse disconnected.")}, NotificationData{NotificationType::Mouse3dDisconnected, NotificationLevel::RegularNotificationLevel, 10, _u8L("3D Mouse disconnected.")},
NotificationData{NotificationType::PresetUpdateAvailable, NotificationLevel::ImportantNotificationLevel, BBL_NOTICE_MAX_INTERVAL, _u8L("Configuration can update now."), _u8L("Detail."), /* NotificationData{NotificationType::PresetUpdateAvailable, NotificationLevel::ImportantNotificationLevel, BBL_NOTICE_MAX_INTERVAL, _u8L("Configuration can update now."), _u8L("Detail."),
[](wxEvtHandler* evnthndlr) { [](wxEvtHandler* evnthndlr) {
if (evnthndlr != nullptr) if (evnthndlr != nullptr)
wxPostEvent(evnthndlr, PresetUpdateAvailableClickedEvent(EVT_PRESET_UPDATE_AVAILABLE_CLICKED)); wxPostEvent(evnthndlr, PresetUpdateAvailableClickedEvent(EVT_PRESET_UPDATE_AVAILABLE_CLICKED));
return true; return true;
} }
}, },*/
NotificationData{NotificationType::EmptyColorChangeCode, NotificationLevel::PrintInfoNotificationLevel, 10, NotificationData{NotificationType::EmptyColorChangeCode, NotificationLevel::PrintInfoNotificationLevel, 10,
std::string(_devL("value can not be empty when you add a G-code for color change.\nPlease check the \"Color Change G-code\" in \"Printer Settings > Custom G-code\"").mb_str())}, std::string(_devL("value can not be empty when you add a G-code for color change.\nPlease check the \"Color Change G-code\" in \"Printer Settings > Custom G-code\"").mb_str())},
NotificationData{NotificationType::EmptyAutoColorChange, NotificationLevel::PrintInfoNotificationLevel, 10, NotificationData{NotificationType::EmptyAutoColorChange, NotificationLevel::PrintInfoNotificationLevel, 10,

View File

@ -654,7 +654,7 @@ Sidebar::Sidebar(Plater *parent)
h_sizer_title->Add(p->m_printer_setting, 0, wxALIGN_CENTER); h_sizer_title->Add(p->m_printer_setting, 0, wxALIGN_CENTER);
h_sizer_title->Add(15 * em / 10, 0, 0, 0, 0); h_sizer_title->Add(15 * em / 10, 0, 0, 0, 0);
h_sizer_title->SetMinSize(-1, 3 * em); h_sizer_title->SetMinSize(-1, 3 * em);
//h_sizer_title->Hide();
p->m_panel_printer_title->SetSizer(h_sizer_title); p->m_panel_printer_title->SetSizer(h_sizer_title);
p->m_panel_printer_title->Layout(); p->m_panel_printer_title->Layout();
@ -665,7 +665,8 @@ Sidebar::Sidebar(Plater *parent)
//scrolled_sizer->Add(spliter_1, 0, wxEXPAND); //scrolled_sizer->Add(spliter_1, 0, wxEXPAND);
// add printer title // add printer title
scrolled_sizer->Add(p->m_panel_printer_title, 0, wxEXPAND | wxALL, 0); // xiamian-
//scrolled_sizer->Add(p->m_panel_printer_title, 0, wxEXPAND | wxALL, 0);
p->m_panel_printer_title->Bind(wxEVT_LEFT_UP, [this] (auto & e) { p->m_panel_printer_title->Bind(wxEVT_LEFT_UP, [this] (auto & e) {
if (p->m_panel_printer_content->GetMaxHeight() == 0) if (p->m_panel_printer_content->GetMaxHeight() == 0)
p->m_panel_printer_content->SetMaxSize({-1, -1}); p->m_panel_printer_content->SetMaxSize({-1, -1});
@ -677,7 +678,8 @@ Sidebar::Sidebar(Plater *parent)
// add spliter 2 // add spliter 2
auto spliter_2 = new ::StaticLine(p->scrolled); auto spliter_2 = new ::StaticLine(p->scrolled);
spliter_2->SetLineColour("#CECECE"); spliter_2->SetLineColour("#CECECE");
scrolled_sizer->Add(spliter_2, 0, wxEXPAND); //xiamian-
//scrolled_sizer->Add(spliter_2, 0, wxEXPAND);
/*************************** 2. add printer content ************************/ /*************************** 2. add printer content ************************/
@ -777,7 +779,8 @@ Sidebar::Sidebar(Plater *parent)
p->m_panel_printer_content->SetSizer(vsizer_printer); p->m_panel_printer_content->SetSizer(vsizer_printer);
p->m_panel_printer_content->Layout(); p->m_panel_printer_content->Layout();
scrolled_sizer->Add(p->m_panel_printer_content, 0, wxEXPAND, 0); //xiamian-
//scrolled_sizer->Add(p->m_panel_printer_content, 0, wxEXPAND, 0);
} }
{ {
@ -2835,6 +2838,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
panel_sizer->Add(preview, 1, wxEXPAND | wxALL, 0); panel_sizer->Add(preview, 1, wxEXPAND | wxALL, 0);
panel_sizer->Add(assemble_view, 1, wxEXPAND | wxALL, 0); panel_sizer->Add(assemble_view, 1, wxEXPAND | wxALL, 0);
vsizer->Add(panel_sizer, 1, wxEXPAND | wxALL, 0); vsizer->Add(panel_sizer, 1, wxEXPAND | wxALL, 0);
//xiamian
//hsizer->Add(vsizer, 1, wxEXPAND | wxALL, 0); //hsizer->Add(vsizer, 1, wxEXPAND | wxALL, 0);
hsizer->Insert(0, vsizer, 1, wxEXPAND | wxALL, 0); hsizer->Insert(0, vsizer, 1, wxEXPAND | wxALL, 0);