mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 02:41:17 +00:00
Fix Windows paint on resize issue. Automatically resize to fit tabs and button content
This commit is contained in:
@@ -295,6 +295,15 @@ void TabCtrl::relayout()
|
||||
Layout();
|
||||
}
|
||||
|
||||
int TabCtrl::buttons_best_width() const
|
||||
{
|
||||
// Mirrors relayout(): a 10px leading spacer plus every button's min width and spacing.
|
||||
int width = 10;
|
||||
for (const Button *btn : btns)
|
||||
width += btn->GetMinSize().x + TAB_BUTTON_SPACE * 2;
|
||||
return width;
|
||||
}
|
||||
|
||||
void TabCtrl::buttonClicked(wxCommandEvent &event)
|
||||
{
|
||||
SetFocus();
|
||||
|
||||
Reference in New Issue
Block a user