mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-16 12:21:11 +00:00
Fix publish dialog tab clipping and extruder switch distortion (#16543)
* Fix TabCtrl clipping titles and indicator dots Button measures a label plus icon without the icon gap that render draws, so icon tabs were ellipsized and the indicator dot was cut off. Widen the horizontal padding so the measured width covers the gap. * Re-layout publish dialog when extruder switch labels change Setting the indicator bullet on a switch option changed its width without laying out the page, leaving the switch distorted until the next layout.
This commit is contained in:
@@ -2225,8 +2225,10 @@ void PublishSettingsDialog::refresh_tab_indicators()
|
||||
if (section.variant_switch != nullptr) {
|
||||
const wxString& title = m_categories[section.categories[i]].title;
|
||||
const wxString text = on ? title + wxString(" ") + wxString(wxUniChar(0x2022)) : title;
|
||||
if (section.variant_switch->GetOptionText(static_cast<unsigned int>(i)) != text)
|
||||
if (section.variant_switch->GetOptionText(static_cast<unsigned int>(i)) != text) {
|
||||
section.variant_switch->SetOptionText(static_cast<unsigned int>(i), text);
|
||||
section.page->Layout();
|
||||
}
|
||||
}
|
||||
any = any || on;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ END_EVENT_TABLE()
|
||||
*/
|
||||
|
||||
#define TAB_BUTTON_SPACE 2
|
||||
#define TAB_BUTTON_PADDING_X 2
|
||||
#define TAB_BUTTON_PADDING_X 3
|
||||
#define TAB_BUTTON_PADDING_Y 2
|
||||
#define TAB_BUTTON_PADDING TAB_BUTTON_PADDING_X, TAB_BUTTON_PADDING_Y
|
||||
|
||||
|
||||
Reference in New Issue
Block a user