mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
TabBar: Disable greying out not restored tabs
It doesn't really work with some themes and there doesn't seem to be easy way to make the text always clearly visible.
This commit is contained in:
parent
7adda247dc
commit
6a48f4d862
|
@ -381,20 +381,6 @@ void TabBar::currentTabChanged(int index)
|
|||
m_tabWidget->currentTabChanged(index);
|
||||
}
|
||||
|
||||
void TabBar::overrideTabTextColor(int index, QColor color)
|
||||
{
|
||||
if (!m_originalTabTextColor.isValid()) {
|
||||
m_originalTabTextColor = tabTextColor(index);
|
||||
}
|
||||
|
||||
setTabTextColor(index, color);
|
||||
}
|
||||
|
||||
void TabBar::restoreTabTextColor(int index)
|
||||
{
|
||||
setTabTextColor(index, m_originalTabTextColor);
|
||||
}
|
||||
|
||||
void TabBar::setTabText(int index, const QString &text)
|
||||
{
|
||||
QString tabText = text;
|
||||
|
|
|
@ -38,9 +38,6 @@ public:
|
|||
void setVisible(bool visible);
|
||||
void setForceHidden(bool hidden);
|
||||
|
||||
void overrideTabTextColor(int index, QColor color);
|
||||
void restoreTabTextColor(int index);
|
||||
|
||||
void setTabText(int index, const QString &text);
|
||||
|
||||
void wheelEvent(QWheelEvent* event);
|
||||
|
@ -88,7 +85,6 @@ private:
|
|||
mutable int m_normalTabWidth;
|
||||
mutable int m_activeTabWidth;
|
||||
|
||||
QColor m_originalTabTextColor;
|
||||
QPoint m_dragStartPosition;
|
||||
|
||||
bool m_forceHidden;
|
||||
|
|
|
@ -380,19 +380,6 @@ void WebTab::restoreTab(const WebTab::SavedTab &tab)
|
|||
m_tabBar->setTabText(index, tab.title);
|
||||
m_locationBar->showUrl(tab.url);
|
||||
m_tabIcon->updateIcon();
|
||||
|
||||
if (!tab.url.isEmpty()) {
|
||||
QColor col = m_tabBar->palette().text().color();
|
||||
QColor newCol = col.lighter(250);
|
||||
|
||||
// It won't work for black color because (V) = 0
|
||||
// It won't also work for white, as white won't get any lighter
|
||||
if (col == Qt::black || col == Qt::white) {
|
||||
newCol = Qt::gray;
|
||||
}
|
||||
|
||||
m_tabBar->overrideTabTextColor(index, newCol);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// This is called only on restore session and restoring tabs immediately
|
||||
|
@ -471,7 +458,6 @@ void WebTab::slotRestore()
|
|||
}
|
||||
|
||||
p_restoreTab(m_savedTab);
|
||||
m_tabBar->restoreTabTextColor(tabIndex());
|
||||
m_savedTab.clear();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user