new tab button style improvement

use an icon instead of a text "+"
add a background when mouse over it
better centered position
This commit is contained in:
luddens 2020-01-08 15:57:58 +01:00 committed by Kelson
parent 6242d04288
commit 468cba66e3
4 changed files with 10 additions and 2 deletions

View File

@ -149,7 +149,13 @@ QTabBar::tab:last {
QTabBar::tab:last QToolButton {
font-size: 30px;
margin-bottom: 5px;
width: 30px; min-width: 30px; max-width: 30px;
height: 30px; min-height:30px; max-height:30px;
border-radius: 5px;
}
QTabBar::tab:last QToolButton::hover {
background-color: grey;
}
/* -----------------------------------------

View File

@ -0,0 +1 @@
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="93.562px" height="93.562px" viewBox="0 0 93.562 93.562" style="enable-background:new 0 0 93.562 93.562;" xml:space="preserve"><g><path d="M87.952,41.17l-36.386,0.11V5.61c0-3.108-2.502-5.61-5.61-5.61c-3.107,0-5.61,2.502-5.61,5.61l0.11,35.561H5.61 c-3.108,0-5.61,2.502-5.61,5.61c0,3.107,2.502,5.609,5.61,5.609h34.791v35.562c0,3.106,2.502,5.61,5.61,5.61c3.108,0,5.61-2.504,5.61-5.61V52.391h36.331c3.108,0,5.61-2.504,5.61-5.61C93.562,43.672,91.032,41.17,87.952,41.17z"/></g></svg>

After

Width:  |  Height:  |  Size: 610 B

View File

@ -69,6 +69,7 @@
<file>icons/play-button.png</file>
<file>icons/pause-button.png</file>
<file>icons/cancel-button.png</file>
<file>icons/new-tab-icon.svg</file>
</qresource>
<qresource lang="fr" prefix="/">
<file alias="texts/about.html">texts/fr/about.html</file>

View File

@ -109,7 +109,7 @@ void TabBar::setNewTabButton()
{
QToolButton *tb = new QToolButton();
tb->setDefaultAction(KiwixApp::instance()->getAction(KiwixApp::NewTabAction));
tb->setText("+");
tb->setIcon(QIcon(":/icons/new-tab-icon.svg"));
addTab("");
setTabEnabled(1, false);
setTabButton(1, QTabBar::LeftSide, tb);