parent
7345665382
commit
4117778324
5 changed files with 13 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
- feat: Add config option to customise bullet character (#17)
|
||||
- fix: Use actual screen DPI value to compute sizes and spaces
|
||||
|
||||
## 0.2.0 (2022-05-27)
|
||||
|
|
|
|||
8
config.c
8
config.c
|
|
@ -78,6 +78,7 @@ static void init_opts(ul_config_opts *opts) {
|
|||
opts->keyboard.layout_id = SQ2LV_LAYOUT_US;
|
||||
opts->keyboard.popovers = false;
|
||||
opts->textarea.obscured = true;
|
||||
opts->textarea.bullet = LV_SYMBOL_BULLET;
|
||||
opts->theme.default_id = UL_THEMES_THEME_BREEZY_DARK;
|
||||
opts->theme.alternate_id = UL_THEMES_THEME_BREEZY_LIGHT;
|
||||
}
|
||||
|
|
@ -125,6 +126,13 @@ static int parsing_handler(void* user_data, const char* section, const char* key
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
if (strcmp(key, "bullet") == 0) {
|
||||
char *bullet = strdup(value);
|
||||
if (bullet) {
|
||||
opts->textarea.bullet = bullet;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
} else if (strcmp(section, "theme") == 0) {
|
||||
if (strcmp(key, "default") == 0) {
|
||||
ul_themes_theme_id_t id = ul_themes_find_theme_with_name(value);
|
||||
|
|
|
|||
2
config.h
2
config.h
|
|
@ -57,6 +57,8 @@ typedef struct {
|
|||
typedef struct {
|
||||
/* If true, disguise the entered text with dots */
|
||||
bool obscured;
|
||||
/* The character to use for disguising the entered text */
|
||||
const char *bullet;
|
||||
} ul_config_opts_textarea;
|
||||
|
||||
/**
|
||||
|
|
|
|||
1
main.c
1
main.c
|
|
@ -512,6 +512,7 @@ int main(int argc, char *argv[]) {
|
|||
lv_obj_t *textarea = lv_textarea_create(textarea_container);
|
||||
lv_textarea_set_one_line(textarea, true);
|
||||
lv_textarea_set_password_mode(textarea, true);
|
||||
lv_textarea_set_password_bullet(textarea, conf_opts.textarea.bullet);
|
||||
lv_textarea_set_placeholder_text(textarea, "Enter password...");
|
||||
lv_obj_add_event_cb(textarea, textarea_ready_cb, LV_EVENT_READY, NULL);
|
||||
lv_obj_set_flex_grow(textarea, 1);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ popovers=true
|
|||
|
||||
[textarea]
|
||||
obscured=true
|
||||
#bullet=
|
||||
|
||||
[theme]
|
||||
default=breezy-dark
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue