mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Merge branch 'Falkon/3.0'
This commit is contained in:
commit
69bccb046f
12
src/lib/3rdparty/fancytabwidget.cpp
vendored
12
src/lib/3rdparty/fancytabwidget.cpp
vendored
@ -416,7 +416,7 @@ void FancyTabBar::paintTab(QPainter* painter, int tabIndex) const
|
|||||||
painter->drawLine(rect.bottomLeft() + QPoint(0, -1), rect.bottomRight() - QPoint(0, 1));
|
painter->drawLine(rect.bottomLeft() + QPoint(0, -1), rect.bottomRight() - QPoint(0, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString tabText(painter->fontMetrics().elidedText(this->tabText(tabIndex), Qt::ElideMiddle, width()));
|
// QString tabText(painter->fontMetrics().elidedText(this->tabText(tabIndex), Qt::ElideMiddle, width()));
|
||||||
QRect tabTextRect(tabRect(tabIndex));
|
QRect tabTextRect(tabRect(tabIndex));
|
||||||
QRect tabIconRect(tabTextRect);
|
QRect tabIconRect(tabTextRect);
|
||||||
tabIconRect.adjust(+4, +4, -4, -4);
|
tabIconRect.adjust(+4, +4, -4, -4);
|
||||||
@ -426,8 +426,8 @@ void FancyTabBar::paintTab(QPainter* painter, int tabIndex) const
|
|||||||
boldFont.setBold(true);
|
boldFont.setBold(true);
|
||||||
painter->setFont(boldFont);
|
painter->setFont(boldFont);
|
||||||
painter->setPen(selected ? QColor(255, 255, 255, 160) : QColor(0, 0, 0, 110));
|
painter->setPen(selected ? QColor(255, 255, 255, 160) : QColor(0, 0, 0, 110));
|
||||||
int textFlags = Qt::AlignCenter | Qt::AlignBottom;
|
// int textFlags = Qt::AlignCenter | Qt::AlignBottom;
|
||||||
painter->drawText(tabTextRect, textFlags, tabText);
|
// painter->drawText(tabTextRect, textFlags, tabText);
|
||||||
painter->setPen(selected ? QColor(60, 60, 60) : Utils::StyleHelper::panelTextColor());
|
painter->setPen(selected ? QColor(60, 60, 60) : Utils::StyleHelper::panelTextColor());
|
||||||
#ifndef Q_OS_MACOS
|
#ifndef Q_OS_MACOS
|
||||||
if (!selected) {
|
if (!selected) {
|
||||||
@ -447,12 +447,12 @@ void FancyTabBar::paintTab(QPainter* painter, int tabIndex) const
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const int textHeight = painter->fontMetrics().height();
|
// const int textHeight = painter->fontMetrics().height();
|
||||||
tabIconRect.adjust(0, 4, 0, -textHeight);
|
tabIconRect.adjust(0, 6, 0, -6);
|
||||||
Utils::StyleHelper::drawIconWithShadow(tabIcon(tabIndex), tabIconRect, painter, selected ? QIcon::Selected : QIcon::Normal);
|
Utils::StyleHelper::drawIconWithShadow(tabIcon(tabIndex), tabIconRect, painter, selected ? QIcon::Selected : QIcon::Normal);
|
||||||
|
|
||||||
painter->translate(0, -1);
|
painter->translate(0, -1);
|
||||||
painter->drawText(tabTextRect, textFlags, tabText);
|
// painter->drawText(tabTextRect, textFlags, tabText);
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,6 +116,7 @@ void AdBlockSubscription::loadSubscription(const QStringList &disabledRules)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDeleteAll(m_rules);
|
||||||
m_rules.clear();
|
m_rules.clear();
|
||||||
|
|
||||||
while (!textStream.atEnd()) {
|
while (!textStream.atEnd()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user