mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Fix tab bar visibility when the execution log tab is enabled
This commit is contained in:
@@ -36,9 +36,29 @@
|
||||
|
||||
class HidableTabWidget : public QTabWidget {
|
||||
public:
|
||||
|
||||
void showTabBar(bool show) {
|
||||
tabBar()->setVisible(show);
|
||||
}
|
||||
|
||||
protected:
|
||||
void tabInserted(int index) {
|
||||
QTabWidget::tabInserted(index);
|
||||
if(count() == 1) {
|
||||
showTabBar(false);
|
||||
} else {
|
||||
showTabBar(true);
|
||||
}
|
||||
}
|
||||
|
||||
void tabRemoved(int index) {
|
||||
QTabWidget::tabInserted(index);
|
||||
if(count() == 1) {
|
||||
showTabBar(false);
|
||||
} else {
|
||||
showTabBar(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#endif // HIDABLETABWIDGET_H
|
||||
|
||||
Reference in New Issue
Block a user