parent
6661c1e8bb
commit
6f20e044c2
5 changed files with 12 additions and 5 deletions
9
main.c
9
main.c
|
|
@ -195,6 +195,7 @@ static void sigaction_handler(int signum);
|
|||
*/
|
||||
|
||||
static void toggle_theme_btn_clicked_cb(lv_event_t *event) {
|
||||
LV_UNUSED(event);
|
||||
toggle_theme();
|
||||
}
|
||||
|
||||
|
|
@ -208,6 +209,7 @@ static void set_theme(bool is_alternate) {
|
|||
}
|
||||
|
||||
static void toggle_pw_btn_clicked_cb(lv_event_t *event) {
|
||||
LV_UNUSED(event);
|
||||
toggle_password_obscured();
|
||||
}
|
||||
|
||||
|
|
@ -222,6 +224,7 @@ static void set_password_obscured(bool is_obscured) {
|
|||
}
|
||||
|
||||
static void toggle_kb_btn_clicked_cb(lv_event_t *event) {
|
||||
LV_UNUSED(event);
|
||||
toggle_keyboard_hidden();
|
||||
}
|
||||
|
||||
|
|
@ -264,6 +267,7 @@ static void layout_dropdown_value_changed_cb(lv_event_t *event) {
|
|||
}
|
||||
|
||||
static void shutdown_btn_clicked_cb(lv_event_t *event) {
|
||||
LV_UNUSED(event);
|
||||
static const char *btns[] = { "Yes", "No", "" };
|
||||
lv_obj_t *mbox = lv_msgbox_create(NULL, NULL, "Shutdown device?", btns, false);
|
||||
lv_obj_set_width(mbox, 400);
|
||||
|
|
@ -310,6 +314,7 @@ static void print_password_and_exit(lv_obj_t *textarea) {
|
|||
}
|
||||
|
||||
static void sigaction_handler(int signum) {
|
||||
LV_UNUSED(signum);
|
||||
ul_terminal_reset_current_terminal();
|
||||
exit(0);
|
||||
}
|
||||
|
|
@ -377,10 +382,10 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
/* Override display parameters with command line options if necessary */
|
||||
if (cli_opts.hor_res > 0) {
|
||||
hor_res = LV_MIN(hor_res, cli_opts.hor_res);
|
||||
hor_res = LV_MIN(hor_res, (uint32_t)cli_opts.hor_res);
|
||||
}
|
||||
if (cli_opts.ver_res > 0) {
|
||||
ver_res = LV_MIN(ver_res, cli_opts.ver_res);
|
||||
ver_res = LV_MIN(ver_res, (uint32_t)cli_opts.ver_res);
|
||||
}
|
||||
if (cli_opts.dpi > 0) {
|
||||
dpi = cli_opts.dpi;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ project(
|
|||
'unl0kr',
|
||||
'c',
|
||||
version: '0.1.0',
|
||||
default_options: 'warning_level=1',
|
||||
default_options: 'warning_level=3',
|
||||
meson_version: '>=0.53.0'
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit e3ce01bc38020b21bc61844fa1fed1a4f41097c5
|
||||
Subproject commit 02fe94c78793888a7bbcf862455c2be27dc451e0
|
||||
2
theme.c
2
theme.c
|
|
@ -219,6 +219,8 @@ static void reset_style(lv_style_t *style) {
|
|||
}
|
||||
|
||||
static void apply_theme_cb(lv_theme_t *theme, lv_obj_t *obj) {
|
||||
LV_UNUSED(theme);
|
||||
|
||||
lv_obj_add_style(obj, &(styles.widget), 0);
|
||||
|
||||
if (lv_obj_get_parent(obj) == NULL) {
|
||||
|
|
|
|||
2
unl0kr.h
2
unl0kr.h
|
|
@ -31,7 +31,7 @@
|
|||
* Fonts
|
||||
*/
|
||||
|
||||
LV_FONT_DECLARE(font_32);
|
||||
LV_FONT_DECLARE(font_32)
|
||||
|
||||
#define UL_SYMBOL_ADJUST "\xef\x81\x82" // 0xF042 (https://fontawesome.com/v5.15/icons/adjust?style=solid)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue