Skip to content

Commit

Permalink
linux
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Oct 15, 2024
1 parent 2aea702 commit 98be852
Showing 1 changed file with 38 additions and 42 deletions.
80 changes: 38 additions & 42 deletions src/slic3r/GUI/MainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,53 +299,49 @@ void MainFrame::update_icon() {
try {
icon_size = atoi(wxGetApp().app_config->get("tab_icon_size").c_str());
}
catch (std::exception e) {}
switch (m_layout)
{
case ESettingsLayout::Unknown:
{
break;
} case ESettingsLayout::Old:
case ESettingsLayout::Hidden:
{
if (m_tabpanel->GetPageCount() == 4 && icon_size >= 8) {
m_tabpanel->SetPageImage(0, 0);
m_tabpanel->SetPageImage(1, 3);
m_tabpanel->SetPageImage(2, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 6 : 4);
m_tabpanel->SetPageImage(3, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 7 : 5);
catch (std::exception& e) {}
switch (m_layout) {
case ESettingsLayout::Unknown: {
break;
}
break;
}
case ESettingsLayout::Tabs:
{
case ESettingsLayout::Old:
case ESettingsLayout::Hidden: {
if (m_tabpanel->GetPageCount() == 4 && icon_size >= 8) {
m_tabpanel->SetPageImage(0, 0);
m_tabpanel->SetPageImage(1, 3);
m_tabpanel->SetPageImage(2, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 6 : 4);
m_tabpanel->SetPageImage(3, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 7 : 5);
}
break;
}
case ESettingsLayout::Tabs: {
#ifdef __APPLE__
// no icons for macos
break;
// no icons for macos
break;
#else
if (icon_size >= 8)
{
m_tabpanel->SetPageImage(0, 0);
m_tabpanel->SetPageImage(1, 1);
m_tabpanel->SetPageImage(2, 2);
m_tabpanel->SetPageImage(3, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 6 : 3);
m_tabpanel->SetPageImage(4, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 7 : 4);
m_tabpanel->SetPageImage(5, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 8 : 5);
}
break;
if (icon_size >= 8)
{
m_tabpanel->SetPageImage(0, 0);
m_tabpanel->SetPageImage(1, 1);
m_tabpanel->SetPageImage(2, 2);
m_tabpanel->SetPageImage(3, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 6 : 3);
m_tabpanel->SetPageImage(4, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 7 : 4);
m_tabpanel->SetPageImage(5, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 8 : 5);
}
break;
#endif
case ESettingsLayout::Dlg:
{
if (m_tabpanel->GetPageCount() == 4 && icon_size >= 8) {
m_tabpanel->SetPageImage(0, 3);
m_tabpanel->SetPageImage(1, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 6 : 4);
m_tabpanel->SetPageImage(2, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 7 : 5);
}
break;
}
case ESettingsLayout::GCodeViewer:
{
break;
}
case ESettingsLayout::Dlg: {
if (m_tabpanel->GetPageCount() == 4 && icon_size >= 8) {
m_tabpanel->SetPageImage(0, 3);
m_tabpanel->SetPageImage(1, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 6 : 4);
m_tabpanel->SetPageImage(2, m_plater->printer_technology() == PrinterTechnology::ptSLA ? 7 : 5);
}
break;
}
case ESettingsLayout::GCodeViewer: {
break;
}
}
#endif
}
Expand Down

0 comments on commit 98be852

Please sign in to comment.