diff --git a/resources/css/style.css b/resources/css/style.css index c575120..7793387 100644 --- a/resources/css/style.css +++ b/resources/css/style.css @@ -201,12 +201,13 @@ QTabBar::tab:first { border-radius: 3px; } -#nextTabButton, #prevTabButton { +#nextTabButton, #prevTabButton, #newTabSideButton { border: 1px solid #ccc; } #closeTabButton:hover, #newTabButton:hover, -#nextTabButton:hover, #prevTabButton:hover{ +#nextTabButton:hover, #prevTabButton:hover, +#newTabSideButton:hover { border: 1px solid #3366CC; background-color: #D9E9FF; border-radius: 3px; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ea32218..5999a2a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -27,6 +27,7 @@ MainWindow::MainWindow(QWidget *parent) : addAction(app->getAction(KiwixApp::NextTabAction)); addAction(app->getAction(KiwixApp::PreviousTabAction)); + mp_ui->newTabSideButton->setDefaultAction(app->getAction(KiwixApp::NewTabAction)); mp_ui->nextTabButton->setDefaultAction(app->getAction(KiwixApp::ScrollNextTabAction)); mp_ui->prevTabButton->setDefaultAction(app->getAction(KiwixApp::ScrollPreviousTabAction)); diff --git a/src/tabbar.cpp b/src/tabbar.cpp index 48819df..64b6160 100644 --- a/src/tabbar.cpp +++ b/src/tabbar.cpp @@ -252,7 +252,7 @@ QSize TabBar::tabSizeHint(int index) const { QWidget *w = mp_stackedWidget->widget(index); - if (w && qobject_cast(w)) + if ((w && qobject_cast(w)) || index >= count() - 1) return QSize(40, 40); // the "Library" tab is only icon return QSize(205, 40); // "Settings" and content tabs have text diff --git a/ui/mainwindow.ui b/ui/mainwindow.ui index 48375e5..dd2749e 100644 --- a/ui/mainwindow.ui +++ b/ui/mainwindow.ui @@ -71,6 +71,29 @@ + + + + + 40 + 40 + + + + + + + + :/icons/new-tab-icon.svg:/icons/new-tab-icon.svg + + + + 16 + 16 + + + + @@ -179,6 +202,8 @@ 1 - + + +