mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix a bug in the calibre style that prevented popup arrow from showing on buttons that have a popup delay, such as the authors to author sort button in the edit metadata dialog
This commit is contained in:
parent
4dbc1b5c43
commit
110dfad9d1
@ -182,7 +182,7 @@ class CalibreStyle: public QProxyStyle {
|
||||
case CC_ToolButton:
|
||||
// We do not want an arrow if the toolbutton has an instant popup
|
||||
toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(option);
|
||||
if (toolbutton && toolbutton->features & QStyleOptionToolButton::HasMenu & ~QStyleOptionToolButton::PopupDelay) {
|
||||
if (toolbutton && (toolbutton->features & QStyleOptionToolButton::HasMenu) && !(toolbutton->features & QStyleOptionToolButton::PopupDelay)) {
|
||||
QStyleOptionToolButton opt = QStyleOptionToolButton(*toolbutton);
|
||||
opt.features = toolbutton->features & ~QStyleOptionToolButton::HasMenu;
|
||||
return QProxyStyle::drawComplexControl(control, &opt, painter, widget);
|
||||
|
Loading…
x
Reference in New Issue
Block a user