mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
Don't show context menu on scrollbars.
Also fixed coding style in mactoolbutton.cpp
This commit is contained in:
parent
915b972e48
commit
36e73949c2
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* 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
|
* 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
|
* 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
|
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 int(true);
|
||||||
}
|
|
||||||
|
|
||||||
|
case QStyle::SH_ScrollBar_ContextMenu:
|
||||||
|
return int(false);
|
||||||
|
|
||||||
|
default:
|
||||||
return QProxyStyle::styleHint(hint, option, widget, returnData);
|
return QProxyStyle::styleHint(hint, option, widget, returnData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ProxyStyle::pixelMetric(PixelMetric metric, const QStyleOption* option, const QWidget* widget) const
|
int ProxyStyle::pixelMetric(PixelMetric metric, const QStyleOption* option, const QWidget* widget) const
|
||||||
|
@ -29,7 +29,7 @@ MacToolButton::MacToolButton(QWidget* parent)
|
|||||||
void MacToolButton::setIconSize(const QSize &size)
|
void MacToolButton::setIconSize(const QSize &size)
|
||||||
{
|
{
|
||||||
QPushButton::setIconSize(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)
|
void MacToolButton::setAutoRaise(bool enable)
|
||||||
|
Loading…
Reference in New Issue
Block a user