fix focus editing outline globally in styles.
This commit is contained in:
committed by
Raphael Coeffic
parent
0cbf0fbf6c
commit
60293ae763
@@ -204,6 +204,8 @@ static lv_style_t textedit_style_focused;
|
||||
static lv_style_t textedit_style_cursor;
|
||||
static lv_style_t textedit_style_cursor_edit;
|
||||
|
||||
static lv_style_t focus_key_style;
|
||||
|
||||
|
||||
static void theme_apply_cb(lv_theme_t * th, lv_obj_t * obj)
|
||||
{
|
||||
@@ -211,6 +213,9 @@ static void theme_apply_cb(lv_theme_t * th, lv_obj_t * obj)
|
||||
|
||||
lv_obj_add_style(obj, &generic_style, LV_PART_MAIN);
|
||||
|
||||
lv_obj_add_style(obj, &focus_key_style, LV_STATE_FOCUS_KEY);
|
||||
lv_obj_add_style(obj, &focus_key_style, LV_STATE_EDITED);
|
||||
|
||||
lv_obj_t* parent = lv_obj_get_parent(obj);
|
||||
if (parent == NULL) {
|
||||
// main screen
|
||||
@@ -245,6 +250,11 @@ static void init_theme()
|
||||
{
|
||||
/*Initialize the styles*/
|
||||
|
||||
// generic focus outline style to overide default theme
|
||||
lv_style_init(&focus_key_style);
|
||||
lv_style_set_outline_width(&focus_key_style, 0);
|
||||
lv_style_set_outline_opa(&focus_key_style, LV_OPA_0);
|
||||
|
||||
// Generic (applied to all)
|
||||
lv_style_init(&generic_style);
|
||||
lv_style_set_pad_all(&generic_style, 0);
|
||||
|
||||
Vendored
+1
-1
Submodule radio/src/thirdparty/libopenui updated: e717e3b85b...31824ab1f0
Reference in New Issue
Block a user