mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
FIX: alignment of tabpanel text
Change-Id: I3c653a2100ee0d1911fad727a059c82b5866456f
This commit is contained in:
parent
0162fceb98
commit
4831506422
6 changed files with 23 additions and 1 deletions
|
@ -486,6 +486,9 @@ void CalibrationPanel::init_tabpanel() {
|
|||
for (int i = 0; i < (int)CALI_MODE_COUNT; i++)
|
||||
m_tabpanel->SetPageImage(i, "");
|
||||
|
||||
auto padding_size = m_tabpanel->GetBtnsListCtrl()->GetPaddingSize(0);
|
||||
m_tabpanel->GetBtnsListCtrl()->SetPaddingSize({ FromDIP(15), padding_size.y });
|
||||
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ CaliPageButton::CaliPageButton(wxWindow* parent, CaliPageActionType type, wxStri
|
|||
this->SetLabel(_L("Manage Result"));
|
||||
break;
|
||||
case CaliPageActionType::CALI_ACTION_MANUAL_CALI:
|
||||
this->SetLabel(_L("Maual Calibration"));
|
||||
this->SetLabel(_L("Manual Calibration"));
|
||||
this->SetToolTip(_L("Result can be read by human eyes."));
|
||||
break;
|
||||
case CaliPageActionType::CALI_ACTION_AUTO_CALI:
|
||||
|
|
|
@ -71,6 +71,11 @@ void TabButton::SetPaddingSize(const wxSize &size)
|
|||
messureSize();
|
||||
}
|
||||
|
||||
const wxSize& TabButton::GetPaddingSize()
|
||||
{
|
||||
return paddingSize;
|
||||
}
|
||||
|
||||
void TabButton::SetTextColor(StateColor const &color)
|
||||
{
|
||||
text_color = color;
|
||||
|
|
|
@ -28,6 +28,8 @@ public:
|
|||
|
||||
void SetPaddingSize(const wxSize& size);
|
||||
|
||||
const wxSize& GetPaddingSize();
|
||||
|
||||
void SetTextColor(StateColor const &color);
|
||||
|
||||
void SetBorderColor(StateColor const &color);
|
||||
|
|
|
@ -176,6 +176,16 @@ wxString TabButtonsListCtrl::GetPageText(size_t n) const
|
|||
return btn->GetLabel();
|
||||
}
|
||||
|
||||
const wxSize& TabButtonsListCtrl::GetPaddingSize(size_t n) {
|
||||
return m_pageButtons[n]->GetPaddingSize();
|
||||
}
|
||||
|
||||
void TabButtonsListCtrl::SetPaddingSize(const wxSize& size) {
|
||||
for (auto& btn : m_pageButtons) {
|
||||
btn->SetPaddingSize(size);
|
||||
}
|
||||
}
|
||||
|
||||
//#endif // _WIN32
|
||||
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ public:
|
|||
bool SetPageImage(size_t n, const std::string& bmp_name);
|
||||
void SetPageText(size_t n, const wxString& strText);
|
||||
wxString GetPageText(size_t n) const;
|
||||
const wxSize& GetPaddingSize(size_t n);
|
||||
void SetPaddingSize(const wxSize& size);
|
||||
|
||||
private:
|
||||
wxWindow* m_parent;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue