mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 10:51:22 +00:00
Update translations. Code dedup and cleanup
This commit is contained in:
@@ -33,8 +33,14 @@ public:
|
||||
void SetPageText(size_t n, const wxString& strText);
|
||||
void SetCompact(size_t n, bool compact); // ORCA
|
||||
wxString GetPageText(size_t n) const;
|
||||
// ORCA: the full page label, unaffected by SetCompact() blanking the button text.
|
||||
wxString GetPageLabel(size_t n) const;
|
||||
// Resource name the page was inserted with (empty for plugin pages, which pass a wxBitmap).
|
||||
const std::string& GetPageIcon(size_t n) const { return m_pageIcons[n]; }
|
||||
const std::string& GetPageIcon(size_t n) const
|
||||
{
|
||||
static const std::string empty;
|
||||
return n < m_pageIcons.size() ? m_pageIcons[n] : empty;
|
||||
}
|
||||
wxFlexGridSizer* GetBtnsSizer(){return m_buttons_sizer;}; // ORCA
|
||||
// ORCA: a companion widget shown right after the tab buttons (before any side_tools), e.g.
|
||||
// an overflow indicator. Pass nullptr to remove it; ownership stays with the caller.
|
||||
@@ -244,6 +250,13 @@ public:
|
||||
return GetBtnsListCtrl()->GetPageText(n);
|
||||
}
|
||||
|
||||
// ORCA: the real page label. GetPageText() returns the button label, which SetCompact() blanks.
|
||||
wxString GetPageLabel(size_t n) const
|
||||
{
|
||||
wxCHECK_MSG(n < GetPageCount(), wxString(), wxS("Invalid page"));
|
||||
return GetBtnsListCtrl()->GetPageLabel(n);
|
||||
}
|
||||
|
||||
// Resource icon name the page was inserted with; empty for pages added with a wxBitmap.
|
||||
std::string GetPageIcon(size_t n) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user