More fixes for themes

This commit is contained in:
iota97 2022-02-14 15:07:33 +01:00
parent 561870dc25
commit aa9d097d11
2 changed files with 14 additions and 1 deletions

View File

@ -822,6 +822,12 @@ void AbstractChoiceWithValueDisplay::Draw(UIContext &dc) {
if (!IsEnabled()) {
style = dc.theme->itemDisabledStyle;
}
if (HasFocus()) {
style = dc.theme->itemFocusedStyle;
}
if (down_) {
style = dc.theme->itemDownStyle;
}
int paddingX = 12;
dc.SetFontStyle(dc.theme->uiFont);

View File

@ -687,8 +687,15 @@ EventReturn CheckBox::OnClicked(EventParams &e) {
void CheckBox::Draw(UIContext &dc) {
Style style = dc.theme->itemStyle;
if (!IsEnabled())
if (!IsEnabled()) {
style = dc.theme->itemDisabledStyle;
}
if (HasFocus()) {
style = dc.theme->itemFocusedStyle;
}
if (down_) {
style = dc.theme->itemDownStyle;
}
dc.SetFontStyle(dc.theme->uiFont);
ClickableItem::Draw(dc);