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:
gambas 2020-11-11 02:03:10 +01:00
parent 2a2780c95b
commit c4a6164f96

View file

@ -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)