From b90a66477fb8c92759fa5648f25aeacf1d6f9a0c Mon Sep 17 00:00:00 2001 From: yw4z Date: Thu, 20 Nov 2025 01:23:57 +0300 Subject: [PATCH] revert changes for margins --- src/slic3r/GUI/Plater.cpp | 9 ++++----- src/slic3r/GUI/Plater.hpp | 1 - src/slic3r/GUI/Tab.cpp | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 8f257089df..6045a076fd 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -350,7 +350,6 @@ enum class ActionButtonType : int { int SidebarProps::TitlebarMargin() { return 8; } // Use as side margins on titlebar. Has less margin on sides to create separation with its content int SidebarProps::ContentMargin() { return 12; } // Use as side margins contents of title -int SidebarProps::ContentMarginV() { return 9; } // Use as vertical margins contents of title int SidebarProps::IconSpacing() { return 10; } // Use on main elements int SidebarProps::ElementSpacing() { return 5; } // Use if elements has relation between them like edit button for combo box etc. @@ -548,9 +547,9 @@ void Sidebar::priv::layout_printer(bool isBBL, bool isDual) hsizer_printer->Add(panel_nozzle_dia , 0, wxLEFT, FromDIP(4)); hsizer_printer->Add(panel_printer_bed, 0, wxLEFT, FromDIP(4)); //hsizer_printer->Add(btn_sync_printer , 0, wxLEFT, FromDIP(4)); - vsizer_printer->AddSpacer(FromDIP(SidebarProps::ContentMarginV())); + vsizer_printer->AddSpacer(FromDIP(8)); vsizer_printer->Add(hsizer_printer, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(SidebarProps::ContentMargin())); - vsizer_printer->AddSpacer(FromDIP(SidebarProps::ContentMarginV())); + vsizer_printer->AddSpacer(FromDIP(8)); // Printer - extruder // double @@ -2118,9 +2117,9 @@ Sidebar::Sidebar(Plater *parent) //bSizer_filament_content->Add(p->sizer_filaments, 1, wxALIGN_CENTER | wxALL); wxSizer *sizer_filaments2 = new wxBoxSizer(wxVERTICAL); - sizer_filaments2->AddSpacer(SidebarProps::ContentMarginV()); + sizer_filaments2->AddSpacer(FromDIP(16)); sizer_filaments2->Add(p->sizer_filaments, 0, wxEXPAND, 0); - sizer_filaments2->AddSpacer(SidebarProps::ContentMarginV()); + sizer_filaments2->AddSpacer(FromDIP(16)); p->m_panel_filament_content->SetSizer(sizer_filaments2); p->m_panel_filament_content->Layout(); auto min_size = sizer_filaments2->GetMinSize(); diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index 14d1c38009..88787f6845 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -120,7 +120,6 @@ class SidebarProps public: static int TitlebarMargin(); static int ContentMargin(); - static int ContentMarginV(); static int IconSpacing(); static int ElementSpacing(); }; diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 5c12a960bc..eb6826c67b 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -403,7 +403,7 @@ void Tab::create_preset_tab() m_top_sizer->SetMinSize(-1, 3 * m_em_unit); m_top_panel->SetSizer(m_top_sizer); if (m_presets_choice) - m_main_sizer->Add(m_top_panel, 0, wxEXPAND | wxUP | wxDOWN, FromDIP(SidebarProps::ContentMarginV())); + m_main_sizer->Add(m_top_panel, 0, wxEXPAND | wxUP | wxDOWN, m_em_unit); else m_top_panel->Hide();