Skip to content

Instantly share code, notes, and snippets.

@Samywamy10
Created December 22, 2024 13:49
Show Gist options
  • Select an option

  • Save Samywamy10/769724debe6791bd1ac9537e84d10e84 to your computer and use it in GitHub Desktop.

Select an option

Save Samywamy10/769724debe6791bd1ac9537e84d10e84 to your computer and use it in GitHub Desktop.
lvgl:
touchscreens:
- my_touchscreen
disp_bg_color: 0x000000
pages:
- id: ac_page
bg_opa: 0
widgets:
- tileview:
id: tiles
scrollbar_mode: "OFF"
bg_opa: 0
tiles:
- id: ac_off_tile
row: 0
column: 0
dir: HOR
align: CENTER
bg_opa: 0
layout:
type: flex
flex_flow: column
flex_align_main: center
flex_align_cross: center
flex_align_track: center
pad_row: 5
pad_all: 20
widgets:
- button:
id: btn_ac_on
bg_color: 0x404040
text_color: 0xbab8b8
shadow_color: 0x1a1919
height: 40
width: 130
layout:
type: flex
flex_align_main: center
flex_align_track: center
on_press:
then:
- lvgl.tileview.select:
id: tiles
tile_id: ac_on_tile
animated: off
widgets:
- label:
text: "On"
text_font: montserrat_20
- id: ac_on_tile
row: 0
column: 1
dir: HOR
align: CENTER
bg_opa: 0
layout:
type: flex
flex_flow: column
flex_align_main: center
flex_align_cross: center
flex_align_track: center
pad_row: 0
pad_all: 20
widgets:
- button:
id: btn_ac_off
bg_color: 0x404040
text_color: 0xbab8b8
shadow_color: 0x1a1919
height: 40
width: 130
layout:
type: flex
flex_align_main: center
flex_align_track: center
on_press:
then:
- lvgl.tileview.select:
id: tiles
tile_id: ac_off_tile
animated: off
widgets:
- label:
text: "Off"
text_font: montserrat_20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment