From ea8b09968893a06c8613fc01c102b0d5811bb56b Mon Sep 17 00:00:00 2001 From: nowrep Date: Mon, 23 Dec 2013 20:28:14 +0100 Subject: [PATCH] [ComboTabBar] Tweaked appearance of buttons when tabs overflows. Also disabled painting shadow gradient indicationg that tabbar is not scrolled at the end. --- bin/themes/chrome/images/tab-left-arrow.png | Bin 0 -> 192 bytes bin/themes/chrome/images/tab-right-arrow.png | Bin 0 -> 188 bytes bin/themes/chrome/main.css | 12 ++++++++++++ bin/themes/default/images/tab-left-arrow.png | Bin 0 -> 192 bytes bin/themes/default/images/tab-right-arrow.png | Bin 0 -> 188 bytes bin/themes/default/main.css | 12 ++++++++++++ bin/themes/linux/images/tab-left-arrow.png | Bin 0 -> 192 bytes bin/themes/linux/images/tab-right-arrow.png | Bin 0 -> 188 bytes bin/themes/linux/main.css | 12 ++++++++++++ bin/themes/mac/images/tab-left-arrow.png | Bin 0 -> 192 bytes bin/themes/mac/images/tab-right-arrow.png | Bin 0 -> 188 bytes bin/themes/mac/main.css | 12 ++++++++++++ bin/themes/windows/images/tab-left-arrow.png | Bin 0 -> 192 bytes bin/themes/windows/images/tab-right-arrow.png | Bin 0 -> 188 bytes bin/themes/windows/main.css | 12 ++++++++++++ src/lib/tools/combotabbar.cpp | 4 ++++ 16 files changed, 64 insertions(+) create mode 100644 bin/themes/chrome/images/tab-left-arrow.png create mode 100644 bin/themes/chrome/images/tab-right-arrow.png create mode 100644 bin/themes/default/images/tab-left-arrow.png create mode 100644 bin/themes/default/images/tab-right-arrow.png create mode 100644 bin/themes/linux/images/tab-left-arrow.png create mode 100644 bin/themes/linux/images/tab-right-arrow.png create mode 100644 bin/themes/mac/images/tab-left-arrow.png create mode 100644 bin/themes/mac/images/tab-right-arrow.png create mode 100644 bin/themes/windows/images/tab-left-arrow.png create mode 100644 bin/themes/windows/images/tab-right-arrow.png diff --git a/bin/themes/chrome/images/tab-left-arrow.png b/bin/themes/chrome/images/tab-left-arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..fcc62a2c57f5bec3cf37312e3c78ce4719b1aa9c GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ#0V1dK=^KLtlDyqr82*Fcg1yTp14TFsJR*x3 z7`TN&n2}-D90{Nxdx@v7EBjp@abaFA#lW>ZKp|gG7sn8e>&XcUj4TPlJ?RMvJG%5{ zoIh}&U|M6NBTwXp#>U2n2F%RN_C5`qo}c)cnGe_JJX>yTU=Wj(kTBt(n&d&CTJGt^ ddp}gMF*w+BeD`cPlm|4J!PC{xWt~$(696E8Ht7HW literal 0 HcmV?d00001 diff --git a/bin/themes/chrome/images/tab-right-arrow.png b/bin/themes/chrome/images/tab-right-arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..89b5aeb8307c991c7b3932a55c17f823ec536ccb GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ#0V1dK=^KLtlDyqr82*Fcg1yTp14TFsJR*x3 z7`TN&n2}-D90{Nxdx@v7EBjp@abaFD(}0i8Kp{_07sn8e>%C_d@-{e#xE$oS7YA{JI2XboClEi)tA!qD}9 b^ZvWh_8i}r^l>Nw4Q23j^>bP0l+XkKFfusc literal 0 HcmV?d00001 diff --git a/bin/themes/chrome/main.css b/bin/themes/chrome/main.css index 7f25ba749..9562803b6 100644 --- a/bin/themes/chrome/main.css +++ b/bin/themes/chrome/main.css @@ -108,6 +108,18 @@ width: 0px; } +#tabbar-button-right +{ + qproperty-icon: url(images/tab-right-arrow.png); + qproperty-fixedsize: 15px 25px; +} + +#tabbar-button-left +{ + qproperty-icon: url(images/tab-left-arrow.png); + qproperty-fixedsize: 15px 25px; +} + #tabwidget-button-opentabs { qproperty-multiIcon: url(images/tabs-list-button.png); diff --git a/bin/themes/default/images/tab-left-arrow.png b/bin/themes/default/images/tab-left-arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..fcc62a2c57f5bec3cf37312e3c78ce4719b1aa9c GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ#0V1dK=^KLtlDyqr82*Fcg1yTp14TFsJR*x3 z7`TN&n2}-D90{Nxdx@v7EBjp@abaFA#lW>ZKp|gG7sn8e>&XcUj4TPlJ?RMvJG%5{ zoIh}&U|M6NBTwXp#>U2n2F%RN_C5`qo}c)cnGe_JJX>yTU=Wj(kTBt(n&d&CTJGt^ ddp}gMF*w+BeD`cPlm|4J!PC{xWt~$(696E8Ht7HW literal 0 HcmV?d00001 diff --git a/bin/themes/default/images/tab-right-arrow.png b/bin/themes/default/images/tab-right-arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..89b5aeb8307c991c7b3932a55c17f823ec536ccb GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ#0V1dK=^KLtlDyqr82*Fcg1yTp14TFsJR*x3 z7`TN&n2}-D90{Nxdx@v7EBjp@abaFD(}0i8Kp{_07sn8e>%C_d@-{e#xE$oS7YA{JI2XboClEi)tA!qD}9 b^ZvWh_8i}r^l>Nw4Q23j^>bP0l+XkKFfusc literal 0 HcmV?d00001 diff --git a/bin/themes/default/main.css b/bin/themes/default/main.css index 1825d4a2a..5a048ae0b 100644 --- a/bin/themes/default/main.css +++ b/bin/themes/default/main.css @@ -123,6 +123,18 @@ width: 0px; } +#tabbar-button-right +{ + qproperty-icon: url(images/tab-right-arrow.png); + qproperty-fixedsize: 15px 25px; +} + +#tabbar-button-left +{ + qproperty-icon: url(images/tab-left-arrow.png); + qproperty-fixedsize: 15px 25px; +} + #tabwidget-button-opentabs::menu-indicator { background: url(images/transp.png); diff --git a/bin/themes/linux/images/tab-left-arrow.png b/bin/themes/linux/images/tab-left-arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..fcc62a2c57f5bec3cf37312e3c78ce4719b1aa9c GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ#0V1dK=^KLtlDyqr82*Fcg1yTp14TFsJR*x3 z7`TN&n2}-D90{Nxdx@v7EBjp@abaFA#lW>ZKp|gG7sn8e>&XcUj4TPlJ?RMvJG%5{ zoIh}&U|M6NBTwXp#>U2n2F%RN_C5`qo}c)cnGe_JJX>yTU=Wj(kTBt(n&d&CTJGt^ ddp}gMF*w+BeD`cPlm|4J!PC{xWt~$(696E8Ht7HW literal 0 HcmV?d00001 diff --git a/bin/themes/linux/images/tab-right-arrow.png b/bin/themes/linux/images/tab-right-arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..89b5aeb8307c991c7b3932a55c17f823ec536ccb GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ#0V1dK=^KLtlDyqr82*Fcg1yTp14TFsJR*x3 z7`TN&n2}-D90{Nxdx@v7EBjp@abaFD(}0i8Kp{_07sn8e>%C_d@-{e#xE$oS7YA{JI2XboClEi)tA!qD}9 b^ZvWh_8i}r^l>Nw4Q23j^>bP0l+XkKFfusc literal 0 HcmV?d00001 diff --git a/bin/themes/linux/main.css b/bin/themes/linux/main.css index 1819fa4ab..46f6e36be 100644 --- a/bin/themes/linux/main.css +++ b/bin/themes/linux/main.css @@ -85,6 +85,18 @@ width: 0px; } +#tabbar-button-right +{ + qproperty-icon: url(images/tab-right-arrow.png); + qproperty-fixedsize: 15px 25px; +} + +#tabbar-button-left +{ + qproperty-icon: url(images/tab-left-arrow.png); + qproperty-fixedsize: 15px 25px; +} + #tabwidget-button-opentabs { qproperty-icon: url(images/tabs-list-button.png); diff --git a/bin/themes/mac/images/tab-left-arrow.png b/bin/themes/mac/images/tab-left-arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..fcc62a2c57f5bec3cf37312e3c78ce4719b1aa9c GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ#0V1dK=^KLtlDyqr82*Fcg1yTp14TFsJR*x3 z7`TN&n2}-D90{Nxdx@v7EBjp@abaFA#lW>ZKp|gG7sn8e>&XcUj4TPlJ?RMvJG%5{ zoIh}&U|M6NBTwXp#>U2n2F%RN_C5`qo}c)cnGe_JJX>yTU=Wj(kTBt(n&d&CTJGt^ ddp}gMF*w+BeD`cPlm|4J!PC{xWt~$(696E8Ht7HW literal 0 HcmV?d00001 diff --git a/bin/themes/mac/images/tab-right-arrow.png b/bin/themes/mac/images/tab-right-arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..89b5aeb8307c991c7b3932a55c17f823ec536ccb GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ#0V1dK=^KLtlDyqr82*Fcg1yTp14TFsJR*x3 z7`TN&n2}-D90{Nxdx@v7EBjp@abaFD(}0i8Kp{_07sn8e>%C_d@-{e#xE$oS7YA{JI2XboClEi)tA!qD}9 b^ZvWh_8i}r^l>Nw4Q23j^>bP0l+XkKFfusc literal 0 HcmV?d00001 diff --git a/bin/themes/mac/main.css b/bin/themes/mac/main.css index 71a181d82..83b34ae2c 100644 --- a/bin/themes/mac/main.css +++ b/bin/themes/mac/main.css @@ -103,6 +103,18 @@ width: 0px; } +#tabbar-button-right +{ + qproperty-icon: url(images/tab-right-arrow.png); + qproperty-fixedsize: 15px 25px; +} + +#tabbar-button-left +{ + qproperty-icon: url(images/tab-left-arrow.png); + qproperty-fixedsize: 15px 25px; +} + #tabwidget-button-opentabs { qproperty-multiIcon: url(images/tabs-list-button.png); diff --git a/bin/themes/windows/images/tab-left-arrow.png b/bin/themes/windows/images/tab-left-arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..fcc62a2c57f5bec3cf37312e3c78ce4719b1aa9c GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ#0V1dK=^KLtlDyqr82*Fcg1yTp14TFsJR*x3 z7`TN&n2}-D90{Nxdx@v7EBjp@abaFA#lW>ZKp|gG7sn8e>&XcUj4TPlJ?RMvJG%5{ zoIh}&U|M6NBTwXp#>U2n2F%RN_C5`qo}c)cnGe_JJX>yTU=Wj(kTBt(n&d&CTJGt^ ddp}gMF*w+BeD`cPlm|4J!PC{xWt~$(696E8Ht7HW literal 0 HcmV?d00001 diff --git a/bin/themes/windows/images/tab-right-arrow.png b/bin/themes/windows/images/tab-right-arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..89b5aeb8307c991c7b3932a55c17f823ec536ccb GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ#0V1dK=^KLtlDyqr82*Fcg1yTp14TFsJR*x3 z7`TN&n2}-D90{Nxdx@v7EBjp@abaFD(}0i8Kp{_07sn8e>%C_d@-{e#xE$oS7YA{JI2XboClEi)tA!qD}9 b^ZvWh_8i}r^l>Nw4Q23j^>bP0l+XkKFfusc literal 0 HcmV?d00001 diff --git a/bin/themes/windows/main.css b/bin/themes/windows/main.css index 124cb221b..fec4970f2 100644 --- a/bin/themes/windows/main.css +++ b/bin/themes/windows/main.css @@ -113,6 +113,18 @@ width: 0px; } +#tabbar-button-right +{ + qproperty-icon: url(images/tab-right-arrow.png); + qproperty-fixedsize: 15px 25px; +} + +#tabbar-button-left +{ + qproperty-icon: url(images/tab-left-arrow.png); + qproperty-fixedsize: 15px 25px; +} + #tabwidget-button-opentabs { qproperty-icon: url(images/tabs-list-button.png); diff --git a/src/lib/tools/combotabbar.cpp b/src/lib/tools/combotabbar.cpp index 0b9da7ef8..5ab692415 100644 --- a/src/lib/tools/combotabbar.cpp +++ b/src/lib/tools/combotabbar.cpp @@ -974,6 +974,7 @@ void TabBarHelper::paintEvent(QPaintEvent* event) QTabBar::paintEvent(event); } +#if 0 if (m_scrollArea) { const int tearWidth = 15; const int maxAlpha = 200; @@ -1002,6 +1003,7 @@ void TabBarHelper::paintEvent(QPaintEvent* event) p.fillRect(QRect(globalTopRight, QSize(tearWidth, height())), fade); } } +#endif } void TabBarHelper::mousePressEvent(QMouseEvent* event) @@ -1111,11 +1113,13 @@ TabBarScrollWidget::TabBarScrollWidget(QTabBar* tabBar, QWidget* parent) m_scrollArea->setWidget(m_tabBar); m_leftScrollButton = new ToolButton(this); + m_leftScrollButton->setAutoRaise(true); m_leftScrollButton->setObjectName("tabbar-button-left"); connect(m_leftScrollButton, SIGNAL(pressed()), this, SLOT(scrollStart())); connect(m_leftScrollButton, SIGNAL(released()), this, SLOT(scrollStop())); m_rightScrollButton = new ToolButton(this); + m_rightScrollButton->setAutoRaise(true); m_rightScrollButton->setObjectName("tabbar-button-right"); connect(m_rightScrollButton, SIGNAL(pressed()), this, SLOT(scrollStart())); connect(m_rightScrollButton, SIGNAL(released()), this, SLOT(scrollStop()));