Skip to content

Commit

Permalink
back to numbers, but bigger
Browse files Browse the repository at this point in the history
  • Loading branch information
ctranstrum committed Feb 23, 2024
1 parent 7455d6a commit b7506ad
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ lv_obj_t *zmk_display_status_screen() {

zmk_widget_layer_status_init(&layer_status_widget, screen);
// lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), LV_ALIGN_BOTTOM_LEFT, 2, -18);
lv_obj_align_to(zmk_widget_layer_status_obj(&layer_status_widget), zmk_widget_output_status_obj(&output_status_widget), LV_ALIGN_BOTTOM_LEFT, 0, 21);
lv_obj_align_to(zmk_widget_layer_status_obj(&layer_status_widget), zmk_widget_output_status_obj(&output_status_widget), LV_ALIGN_BOTTOM_LEFT, 0, 20);

zmk_widget_peripheral_battery_status_init(&peripheral_battery_status_widget, screen);
lv_obj_align(zmk_widget_peripheral_battery_status_obj(&peripheral_battery_status_widget), LV_ALIGN_TOP_RIGHT, 0, 0);
Expand Down
4 changes: 2 additions & 2 deletions config/boards/shields/dongle_display/widgets/modifiers_sym.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_OPT uint8
0x00, 0x00,
0x3c, 0xe0,
0x3c, 0xe0,
0x04, 0x00,
0x06, 0x00,
0x06, 0x00,
0x06, 0x00,
0x03, 0x00,
0x03, 0x00,
0x03, 0x00,
0x01, 0x00,
0x01, 0xe0,
0x01, 0xe0,
0x00, 0x00,
Expand Down
4 changes: 2 additions & 2 deletions config/boards/shields/dongle_display/widgets/output_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_ob
lv_img_set_src(bt, &sym_bt);

lv_obj_t *bt_number = lv_img_create(widget->obj);
lv_obj_align_to(bt_number, bt, LV_ALIGN_OUT_RIGHT_TOP, 2, -1);
lv_obj_align_to(bt_number, bt, LV_ALIGN_OUT_RIGHT_TOP, 2, 2);

lv_obj_t *bt_status = lv_img_create(widget->obj);
lv_obj_align_to(bt_number, bt, LV_ALIGN_OUT_RIGHT_TOP, 2, 0);
lv_obj_align_to(bt_status, bt_number, LV_ALIGN_OUT_RIGHT_TOP, 2, 0);

static lv_style_t style_line;
lv_style_init(&style_line);
Expand Down
163 changes: 60 additions & 103 deletions config/boards/shields/dongle_display/widgets/output_status_sym.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,187 +15,144 @@
#define LV_ATTRIBUTE_IMG_SYM_1
#endif

// Numbers instead of symbols:
// w: 5, h: 6, size: 14
// 0x30, 0x70, 0x70, 0x30, 0x30, 0x30
// 0x70, 0xd8, 0x18, 0x30, 0x60, 0xf8
// 0x70, 0x98, 0x30, 0x18, 0xd8, 0x70
// 0x70, 0x98, 0x30, 0x18, 0xd8, 0x70
// 0x78, 0x40, 0x70, 0x18, 0xd8, 0x70

// Office
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_1 uint8_t sym_1_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/

0xff, 0xf8,
0x80, 0x08,
0xb7, 0x68,
0xb7, 0x68,
0xb7, 0x68,
0x80, 0x08,
0x80, 0x08,
0x80, 0x08,
0xb7, 0x68,
0xb7, 0x68,
0xb7, 0x68,
0x87, 0x08,
0x87, 0x08,
0xff, 0xf8,
0x00, 0x00,
0x18,
0x38,
0x78,
0x18,
0x18,
0x18,
0x18,
0x18,
0x7e,
};

const lv_img_dsc_t sym_1 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 13,
.header.h = 15,
.data_size = 38,
.header.w = 8,
.header.h = 9,
.data_size = 17,
.data = sym_1_map,
};

#ifndef LV_ATTRIBUTE_IMG_SYM_2
#define LV_ATTRIBUTE_IMG_SYM_2
#endif

// Home
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_2 uint8_t sym_2_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/

0x02, 0x00,
0x07, 0x00,
0x0d, 0x80,
0x18, 0xc0,
0x30, 0x60,
0x60, 0x30,
0xc0, 0x18,
0x20, 0x20,
0x27, 0x20,
0x27, 0x20,
0x27, 0x20,
0x27, 0x20,
0x27, 0x20,
0x3f, 0xe0,
0x00, 0x00,
0x7c,
0xc6,
0x06,
0x0c,
0x18,
0x30,
0x60,
0xc6,
0xfe,
};

const lv_img_dsc_t sym_2 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 13,
.header.h = 15,
.data_size = 38,
.header.w = 8,
.header.h = 9,
.data_size = 17,
.data = sym_2_map,
};

#ifndef LV_ATTRIBUTE_IMG_SYM_3
#define LV_ATTRIBUTE_IMG_SYM_3
#endif

// Linux
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_3 uint8_t sym_3_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/

0x03, 0x80,
0x07, 0xc0,
0x05, 0x40,
0x07, 0xc0,
0x06, 0xc0,
0x0c, 0x40,
0x1f, 0xe0,
0x38, 0x60,
0x30, 0x30,
0x30, 0x30,
0x10, 0x20,
0x38, 0x70,
0x7c, 0xf0,
0x7f, 0xf0,
0x38, 0x60,
0x7c,
0xc6,
0x06,
0x06,
0x3c,
0x06,
0x06,
0xc6,
0x7c,
};

const lv_img_dsc_t sym_3 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 13,
.header.h = 15,
.data_size = 38,
.header.w = 8,
.header.h = 9,
.data_size = 17,
.data = sym_3_map,
};

#ifndef LV_ATTRIBUTE_IMG_SYM_4
#define LV_ATTRIBUTE_IMG_SYM_4
#endif

// Windows
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_4 uint8_t sym_4_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/

0x00, 0x70,
0x0b, 0xf0,
0x7b, 0xf0,
0x7b, 0xf0,
0x7b, 0xf0,
0x7b, 0xf0,
0x7b, 0xf0,
0x00, 0x00,
0x7b, 0xf0,
0x7b, 0xf0,
0x7b, 0xf0,
0x7b, 0xf0,
0x7b, 0xf0,
0x0b, 0xf0,
0x00, 0x70,
0x0c,
0x1c,
0x3c,
0x6c,
0xcc,
0xfe,
0x0c,
0x0c,
0x1e,
};

const lv_img_dsc_t sym_4 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 13,
.header.h = 15,
.data_size = 38,
.header.w = 8,
.header.h = 9,
.data_size = 17,
.data = sym_4_map,
};

#ifndef LV_ATTRIBUTE_IMG_SYM_5
#define LV_ATTRIBUTE_IMG_SYM_5
#endif

// Mac
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_5 uint8_t sym_5_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/

0x00, 0xc0,
0x01, 0xc0,
0x03, 0x80,
0x03, 0x00,
0x38, 0xe0,
0x7f, 0xf0,
0x7f, 0xe0,
0x7f, 0xc0,
0x7f, 0xc0,
0x7f, 0xe0,
0x7f, 0xf0,
0x7f, 0xf0,
0x3f, 0xe0,
0x1f, 0xc0,
0x0f, 0x80,
0xfe,
0xc0,
0xc0,
0xc0,
0xfc,
0x06,
0x06,
0xc6,
0x78,
};

const lv_img_dsc_t sym_5 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 13,
.header.h = 15,
.data_size = 38,
.header.w = 8,
.header.h = 9,
.data_size = 17,
.data = sym_5_map,
};

Expand Down

0 comments on commit b7506ad

Please sign in to comment.