From ae076936aead69ce5ed91ee6cfb05a264f50e1ae Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 11 Jul 2023 17:28:56 +1000 Subject: Fix browser view jank --- src/ui/themes.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/ui/themes.cpp') diff --git a/src/ui/themes.cpp b/src/ui/themes.cpp index 6ae59365..54a41607 100644 --- a/src/ui/themes.cpp +++ b/src/ui/themes.cpp @@ -1,4 +1,5 @@ #include "themes.hpp" +#include "core/lv_obj.h" namespace ui { namespace themes { @@ -29,9 +30,10 @@ void Theme::Apply(void) { } void Theme::Callback(lv_obj_t* obj) { - if (lv_obj_check_type(obj, &lv_btn_class) || lv_obj_check_type(obj, &lv_list_btn_class)) { - lv_obj_add_style(obj, &button_style_, 0); + if (lv_obj_check_type(obj, &lv_btn_class) || + lv_obj_check_type(obj, &lv_list_btn_class)) { + lv_obj_add_style(obj, &button_style_, LV_PART_MAIN | LV_STATE_FOCUSED); } } } // namespace themes -} // namespace ui \ No newline at end of file +} // namespace ui -- cgit v1.2.3