1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Don't show context menu on scrollbars.

Also fixed coding style in mactoolbutton.cpp
This commit is contained in:
nowrep 2013-02-22 09:05:30 +01:00
parent 915b972e48
commit 36e73949c2
2 changed files with 10 additions and 5 deletions

View File

@ -1,6 +1,6 @@
/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2013 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -25,11 +25,16 @@ ProxyStyle::ProxyStyle()
int ProxyStyle::styleHint(StyleHint hint, const QStyleOption* option, const QWidget* widget, QStyleHintReturn* returnData) const
{
if (hint == QStyle::SH_Menu_Scrollable) {
switch (hint) {
case QStyle::SH_Menu_Scrollable:
return int(true);
}
return QProxyStyle::styleHint(hint, option, widget, returnData);
case QStyle::SH_ScrollBar_ContextMenu:
return int(false);
default:
return QProxyStyle::styleHint(hint, option, widget, returnData);
}
}
int ProxyStyle::pixelMetric(PixelMetric metric, const QStyleOption* option, const QWidget* widget) const

View File

@ -29,7 +29,7 @@ MacToolButton::MacToolButton(QWidget* parent)
void MacToolButton::setIconSize(const QSize &size)
{
QPushButton::setIconSize(size);
m_buttonFixedSize = QSize(size.width()+2, size.height()+2);
m_buttonFixedSize = QSize(size.width() + 2, size.height() + 2);
}
void MacToolButton::setAutoRaise(bool enable)