mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
[ComboTabBar] Set objectName of base widget, so it can be styled
TabBar base is now correctly styled in all themes. Updated the themes accordingly to this change.
This commit is contained in:
parent
0a8337758e
commit
028db62be0
@ -1,5 +1,5 @@
|
|||||||
/*TabWidget*/
|
/*TabWidget*/
|
||||||
#tabbar
|
#tabbarwidget
|
||||||
{
|
{
|
||||||
background-image: url(images/tabs-bg.png);
|
background-image: url(images/tabs-bg.png);
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
/*TabWidget*/
|
/*TabWidget*/
|
||||||
#tabbar
|
#tabbar
|
||||||
{
|
{
|
||||||
background-image: url(images/tabs-bg.png);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
min-height: 27px;
|
min-height: 27px;
|
||||||
max-height: 27px;
|
max-height: 27px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#tabbarwidget
|
||||||
|
{
|
||||||
|
background-image: url(images/tabs-bg.png);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
|
||||||
#tabbar::tab
|
#tabbar::tab
|
||||||
{
|
{
|
||||||
height: 26px;
|
height: 26px;
|
||||||
|
@ -129,11 +129,6 @@
|
|||||||
qproperty-fixedsize: 25px 27px;
|
qproperty-fixedsize: 25px 27px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tabbar::scroller
|
|
||||||
{
|
|
||||||
width: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tabbar-button-right
|
#tabbar-button-right
|
||||||
{
|
{
|
||||||
qproperty-icon: url(images/tab-right-arrow.png);
|
qproperty-icon: url(images/tab-right-arrow.png);
|
||||||
|
@ -63,11 +63,6 @@
|
|||||||
max-height: 26px;
|
max-height: 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tabbar::scroller
|
|
||||||
{
|
|
||||||
width: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tabbar-button-right
|
#tabbar-button-right
|
||||||
{
|
{
|
||||||
qproperty-icon: url(images/tab-right-arrow.png);
|
qproperty-icon: url(images/tab-right-arrow.png);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*TabWidget*/
|
/*TabWidget*/
|
||||||
#tabbar
|
#tabbarwidget
|
||||||
{
|
{
|
||||||
background-image: url(images/tabs-bg.png);
|
background-image: url(images/tabs-bg.png);
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
|
@ -103,11 +103,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*TabWidget*/
|
/*TabWidget*/
|
||||||
#tabbar::scroller
|
|
||||||
{
|
|
||||||
width: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tabbar-button-right
|
#tabbar-button-right
|
||||||
{
|
{
|
||||||
qproperty-icon: url(images/tab-right-arrow.png);
|
qproperty-icon: url(images/tab-right-arrow.png);
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
/*TabWidget*/
|
/*TabWidget*/
|
||||||
#tabbar
|
#tabbar
|
||||||
{
|
{
|
||||||
background-image: url(images/tabs-bg.png);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
min-height: 27px;
|
min-height: 27px;
|
||||||
max-height: 27px;
|
max-height: 27px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#tabbarwidget
|
||||||
|
{
|
||||||
|
background-image: url(images/tabs-bg.png);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
|
||||||
#tabbar::tab
|
#tabbar::tab
|
||||||
{
|
{
|
||||||
height: 26px;
|
height: 26px;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*TabWidget*/
|
/*TabWidget*/
|
||||||
#tabbar
|
#tabbarwidget
|
||||||
{
|
{
|
||||||
background-image: url(images/tabs-bg.png);
|
background-image: url(images/tabs-bg.png);
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
|
@ -113,11 +113,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*TabWidget*/
|
/*TabWidget*/
|
||||||
#tabbar::scroller
|
|
||||||
{
|
|
||||||
width: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tabbar-button-right
|
#tabbar-button-right
|
||||||
{
|
{
|
||||||
qproperty-icon: url(images/tab-right-arrow.png);
|
qproperty-icon: url(images/tab-right-arrow.png);
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
/*TabWidget*/
|
/*TabWidget*/
|
||||||
#tabbar
|
#tabbar
|
||||||
{
|
{
|
||||||
background-image: url(images/tabs-bg.png);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
min-height: 27px;
|
min-height: 27px;
|
||||||
max-height: 27px;
|
max-height: 27px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#tabbarwidget
|
||||||
|
{
|
||||||
|
background-image: url(images/tabs-bg.png);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
}
|
||||||
|
|
||||||
#tab-icon
|
#tab-icon
|
||||||
{
|
{
|
||||||
padding-right: 3px;
|
padding-right: 3px;
|
||||||
|
@ -46,6 +46,8 @@ ComboTabBar::ComboTabBar(QWidget* parent)
|
|||||||
, m_usesScrollButtons(false)
|
, m_usesScrollButtons(false)
|
||||||
, m_blockCurrentChangedSignal(false)
|
, m_blockCurrentChangedSignal(false)
|
||||||
{
|
{
|
||||||
|
QObject::setObjectName(QSL("tabbarwidget"));
|
||||||
|
|
||||||
m_mainTabBar = new TabBarHelper(this);
|
m_mainTabBar = new TabBarHelper(this);
|
||||||
m_pinnedTabBar = new TabBarHelper(this);
|
m_pinnedTabBar = new TabBarHelper(this);
|
||||||
m_mainTabBarWidget = new TabBarScrollWidget(m_mainTabBar, this);
|
m_mainTabBarWidget = new TabBarScrollWidget(m_mainTabBar, this);
|
||||||
@ -632,11 +634,16 @@ bool ComboTabBar::eventFilter(QObject* obj, QEvent* ev)
|
|||||||
|
|
||||||
void ComboTabBar::paintEvent(QPaintEvent* ev)
|
void ComboTabBar::paintEvent(QPaintEvent* ev)
|
||||||
{
|
{
|
||||||
QWidget::paintEvent(ev);
|
Q_UNUSED(ev);
|
||||||
|
|
||||||
|
// This is needed to apply style sheets
|
||||||
|
QStyleOption option;
|
||||||
|
option.init(this);
|
||||||
|
QPainter p(this);
|
||||||
|
style()->drawPrimitive(QStyle::PE_Widget, &option, &p, this);
|
||||||
|
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
// Draw tabbar base even on parts of ComboTabBar that are not directly QTabBar
|
// Draw tabbar base even on parts of ComboTabBar that are not directly QTabBar
|
||||||
QPainter p(this);
|
|
||||||
QStyleOptionTabBarBaseV2 opt;
|
QStyleOptionTabBarBaseV2 opt;
|
||||||
TabBarHelper::initStyleBaseOption(&opt, m_mainTabBar, size());
|
TabBarHelper::initStyleBaseOption(&opt, m_mainTabBar, size());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user