forked from qt-creator/qt-creator
Core: Icon-only option for the mode selection bar
This adds an icon-only mode to the mode selection bar (and action bar). A newly introduced Action can cycle between icon+text, icon-only and hidden. Also, the "Window" Application menu gets a submenu with the three styles. Task-number: QTCREATORBUG-18845 Change-Id: I4e0c453f6d920dfbfd795b8b054f6ff392a8700a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -119,6 +119,8 @@ public:
|
||||
void setTabToolTip(int index, const QString &toolTip) { m_tabs[index]->toolTip = toolTip; }
|
||||
QString tabToolTip(int index) const { return m_tabs.at(index)->toolTip; }
|
||||
|
||||
void setIconsOnly(bool iconOnly);
|
||||
|
||||
int count() const { return m_tabs.count(); }
|
||||
QRect tabRect(int index) const;
|
||||
|
||||
@@ -130,6 +132,7 @@ private:
|
||||
QRect m_hoverRect;
|
||||
int m_hoverIndex = -1;
|
||||
int m_currentIndex = -1;
|
||||
bool m_iconsOnly = false;
|
||||
QList<FancyTab *> m_tabs;
|
||||
QSize tabSizeHint(bool minimum = false) const;
|
||||
};
|
||||
@@ -157,6 +160,8 @@ public:
|
||||
void setTabEnabled(int index, bool enable);
|
||||
bool isTabEnabled(int index) const;
|
||||
|
||||
void setIconsOnly(bool iconsOnly);
|
||||
|
||||
bool isSelectionWidgetVisible() const;
|
||||
|
||||
signals:
|
||||
|
||||
Reference in New Issue
Block a user