calibre GUI style: Dont show an arrow for tool buttons set to instant popup mode

This commit is contained in:
Kovid Goyal 2014-04-02 11:15:54 +05:30
parent b078ab5b51
commit 9eaf93e06c

View File

@ -8148,7 +8148,8 @@ void Style::drawComplexControl(ComplexControl control, const QStyleOptionComplex
drawControl(CE_ToolButtonLabel, &label, painter, widget); drawControl(CE_ToolButtonLabel, &label, painter, widget);
if (!(toolbutton->subControls&SC_ToolButtonMenu) && if (!(toolbutton->subControls&SC_ToolButtonMenu) &&
(toolbutton->features&QStyleOptionToolButton::HasMenu)) (toolbutton->features&QStyleOptionToolButton::HasMenu &&
toolbutton->features & QStyleOptionToolButton::PopupDelay))
{ {
QRect arrow(r.right()-(LARGE_ARR_WIDTH+(etched ? 3 : 2)), QRect arrow(r.right()-(LARGE_ARR_WIDTH+(etched ? 3 : 2)),
r.bottom()-(LARGE_ARR_HEIGHT+(etched ? 4 : 3)), r.bottom()-(LARGE_ARR_HEIGHT+(etched ? 4 : 3)),