match vertical margins

This commit is contained in:
yw4z
2025-11-18 16:43:35 +03:00
parent 4049019184
commit 8b53885929
3 changed files with 7 additions and 5 deletions

View File

@@ -364,6 +364,7 @@ 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.
@@ -561,9 +562,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(8));
vsizer_printer->AddSpacer(FromDIP(SidebarProps::ContentMarginV()));
vsizer_printer->Add(hsizer_printer, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(SidebarProps::ContentMargin()));
vsizer_printer->AddSpacer(FromDIP(8));
vsizer_printer->AddSpacer(FromDIP(SidebarProps::ContentMarginV()));
// Printer - extruder
// double
@@ -2165,9 +2166,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(FromDIP(16));
sizer_filaments2->AddSpacer(SidebarProps::ContentMarginV());
sizer_filaments2->Add(p->sizer_filaments, 0, wxEXPAND, 0);
sizer_filaments2->AddSpacer(FromDIP(16));
sizer_filaments2->AddSpacer(SidebarProps::ContentMarginV());
p->m_panel_filament_content->SetSizer(sizer_filaments2);
p->m_panel_filament_content->Layout();
auto min_size = sizer_filaments2->GetMinSize();

View File

@@ -120,6 +120,7 @@ class SidebarProps
public:
static int TitlebarMargin();
static int ContentMargin();
static int ContentMarginV();
static int IconSpacing();
static int ElementSpacing();
};

View File

@@ -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, m_em_unit);
m_main_sizer->Add(m_top_panel, 0, wxEXPAND | wxUP | wxDOWN, FromDIP(SidebarProps::ContentMarginV()));
else
m_top_panel->Hide();