Skip to content

Commit

Permalink
refactor(style): update check sequence of isEdit first
Browse files Browse the repository at this point in the history
Change-Id: Idd02c1cdf455f8e587fb3c39ad4b8cd70165bfc4
  • Loading branch information
justforlxz committed Jan 22, 2018
1 parent 291c729 commit c4f1ad1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dstyleplugin/menuhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ bool Style::drawMenuItemControl(const QStyleOption *option, QPainter *painter, c
QRect(menuitem->rect.x() + 4, menuitem->rect.y(),
checkcol, menuitem->rect.height()));
// NOTE: If widget is QLineEdit and qApp is DApplication, will hide menu icon
if (!menuItem->icon.isNull() && isVisibleMenuIcon() && !isEdit(widget)) {
if (!menuItem->icon.isNull() && (!isEdit(widget) || isVisibleMenuIcon())) {
QIcon::Mode mode = dis ? QIcon::Disabled : QIcon::Normal;
if (act && !dis)
mode = QIcon::Active;
Expand Down

0 comments on commit c4f1ad1

Please sign in to comment.