From aa9d097d11b54a7cf34a802805a0688b510b5fc9 Mon Sep 17 00:00:00 2001 From: iota97 Date: Mon, 14 Feb 2022 15:07:33 +0100 Subject: [PATCH] More fixes for themes --- Common/UI/UIScreen.cpp | 6 ++++++ Common/UI/View.cpp | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Common/UI/UIScreen.cpp b/Common/UI/UIScreen.cpp index 15215148af..2df6ea2bf5 100644 --- a/Common/UI/UIScreen.cpp +++ b/Common/UI/UIScreen.cpp @@ -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); diff --git a/Common/UI/View.cpp b/Common/UI/View.cpp index 03459a296c..9df5e38286 100644 --- a/Common/UI/View.cpp +++ b/Common/UI/View.cpp @@ -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);