1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

Remove any remaining Oxygen style workarounds

This commit is contained in:
David Rosca 2018-02-16 11:52:40 +01:00
parent bce5ef9a2e
commit c83f7e3c01
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
6 changed files with 1 additions and 30 deletions

View File

@ -432,13 +432,6 @@ void BrowserWindow::setupUi()
#endif
}
// Workaround for Oxygen tooltips not having transparent background
QPalette pal = QToolTip::palette();
QColor col = pal.window().color();
col.setAlpha(0);
pal.setColor(QPalette::Window, col);
QToolTip::setPalette(pal);
restoreUiState(uiState);
// Set some sane minimum width

View File

@ -55,12 +55,7 @@ int ProxyStyle::pixelMetric(PixelMetric metric, const QStyleOption* option, cons
case PM_TabBarTabHSpace:
if (m_TabBarTabHSpace == -1) {
m_TabBarTabHSpace = qMin(QProxyStyle::pixelMetric(PM_TabBarTabHSpace, option, widget), 14);
if (name() == QLatin1String("oxygen")) {
m_TabBarTabHSpace = 14;
}
}
return m_TabBarTabHSpace;
default:

View File

@ -55,7 +55,7 @@ LocationBar::LocationBar(QWidget *parent)
setObjectName("locationbar");
setDragEnabled(true);
// Disable Oxygen QLineEdit transitions, it breaks with setText() && home()
// Disable KDE QLineEdit transitions, it breaks with setText() && home()
setProperty("_kde_no_animations", QVariant(true));
m_bookmarkIcon = new BookmarksIcon(this);

View File

@ -135,16 +135,6 @@ void TipLabel::hideDelayed()
m_timer->start();
}
void TipLabel::resizeEvent(QResizeEvent* ev)
{
SqueezeLabelV1::resizeEvent(ev);
// Oxygen is setting rounded corners only for top-level tooltips
if (mApp->styleName() == QLatin1String("oxygen")) {
setMask(QzTools::roundedRect(rect(), 4));
}
}
void TipLabel::paintEvent(QPaintEvent* ev)
{
QStylePainter p(this);

View File

@ -39,7 +39,6 @@ public:
bool eventFilter(QObject* o, QEvent* e);
private:
void resizeEvent(QResizeEvent* ev);
void paintEvent(QPaintEvent* ev);
QTimer* m_timer;

View File

@ -531,12 +531,6 @@ void ComboTabBar::setUpLayout()
height = qMax(m_mainTabBar->sizeHint().height(), m_pinnedTabBar->sizeHint().height());
}
// Workaround for Oxygen theme. For some reason, QTabBar::height() returns bigger
// height than it actually should.
if (mApp->styleName() == QLatin1String("oxygen")) {
height -= 4;
}
// We need to setup heights even before m_mainTabBar->height() has correct value
// So lets just set minimum 5px height
height = qMax(5, height);