smaller icons in Ribbon
This commit is contained in:
@@ -46,16 +46,10 @@ public:
|
||||
void retranslate();
|
||||
void setIconSize(const QSize & size);
|
||||
void setTabIconSize(const QSize & size);
|
||||
void setButtonStyle(const Qt::ToolButtonStyle & style) {
|
||||
foreach(QToolButton * i, buttons)
|
||||
i->setToolButtonStyle(style);
|
||||
}
|
||||
void setButtonStyle(const Qt::ToolButtonStyle & style);
|
||||
void setAutoSwitchEnabled(bool yes) { delay_e = yes; }
|
||||
void setAutoSwitchDelay(float delay_s) { delay = delay_s * 1000; }
|
||||
void setCurrentTab(int tab_) {
|
||||
if (tab_ < 0 || tab_ >= tab->count()) return;
|
||||
tab->setCurrentIndex(tab_);
|
||||
}
|
||||
void setCurrentTab(int tab_);
|
||||
int currentTab() const { return tab->currentIndex(); }
|
||||
QTabWidget * tabWidget() const { return tab; }
|
||||
|
||||
@@ -67,21 +61,16 @@ private:
|
||||
void _setIconsSize();
|
||||
void _setButtonText(QToolButton * b, QAction * a);
|
||||
|
||||
int hovered, delay;
|
||||
bool delay_e;
|
||||
int hovered = -1, delay = 1000;
|
||||
bool delay_e = true;
|
||||
QList<QToolButton *> buttons;
|
||||
QMap<int, int> hovers;
|
||||
ETabWidget * tab;
|
||||
QScrollArea * scroll_area;
|
||||
QMainWindow * parent;
|
||||
ETabWidget * tab = nullptr;
|
||||
QScrollArea * scroll_area = nullptr;
|
||||
QMainWindow * parent = nullptr;
|
||||
|
||||
private slots:
|
||||
void tabHovered(int tab) {
|
||||
if (!delay_e) return;
|
||||
hovers.clear();
|
||||
hovered = tab;
|
||||
hovers.insert(startTimer(delay), tab);
|
||||
}
|
||||
void tabHovered(int tab);
|
||||
|
||||
public slots:
|
||||
void setVisible(bool yes);
|
||||
|
||||
Reference in New Issue
Block a user