Disabled state is now correctly taken into account by style drawing methods.
[GB.QT4] * BUG: Disabled state is now correctly taken into account by style drawing methods. [GB.QT5] * BUG: Disabled state is now correctly taken into account by style drawing methods.
This commit is contained in:
parent
2a2780c95b
commit
c4a6164f96
1 changed files with 3 additions and 0 deletions
|
@ -120,6 +120,9 @@ static void init_option(QStyleOption &opt, int x, int y, int w, int h, int state
|
|||
palette.setColor(role, TO_QCOLOR(color));
|
||||
opt.palette = palette;
|
||||
}
|
||||
|
||||
if (state & GB_DRAW_STATE_DISABLED)
|
||||
opt.palette.setCurrentColorGroup(QPalette::Disabled);
|
||||
}
|
||||
|
||||
static void paint_focus(QPainter *p, int x, int y, int w, int h, int state)
|
||||
|
|
Loading…
Reference in a new issue