Let a card's back button take its taps again (0.2.56)
Since firmware 0.2.44 the back arrow of the brightness, colour and climate cards barely responded, and so did the button at the top right of the climate card. on_boot created the settings hold strip after the YAML cards on home_page, so the transparent strip lay on top of them and LVGL's hit test gave it the taps in the top bar region. attach_hold now takes the first card as `below` and moves the strip and its fill line to that index, under every card. Holding the top bar opens the settings page from the tile pages only. The dim wake overlay was never affected: apply_screen_settings moves it to the foreground when dimmed. Checked with 215 Python and 14 C++ tests, generate_packages --check, and ESP32 builds of both Easy profiles. Firmware 0.2.48. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# Source profile for packages/guition.yaml (tools/generate_packages.py); see docs/GUITION.md.
|
||||
# A screen gets its tiles from the ESP Screen Manager add-on while it runs. The CYD is its own profile.
|
||||
substitutions:
|
||||
SCREEN_FIRMWARE_VERSION: "0.2.47"
|
||||
SCREEN_FIRMWARE_VERSION: "0.2.48"
|
||||
# 0: no drift limit; LVGL decides, releasing inside the tile is a tap, leaving it is not
|
||||
# (like iOS). The CYD keeps a limit because its resistive panel jumps.
|
||||
TOUCH_MOVE_LIMIT_PX: "0"
|
||||
@@ -281,7 +281,9 @@ esphome:
|
||||
settings_screen::before_open = []() { id(close_cards).execute(); };
|
||||
settings_screen::hold_limit = ${SETTINGS_HOLD_DRIFT_PX};
|
||||
settings_screen::tap_limit = ${TOUCH_MOVE_LIMIT_PX};
|
||||
settings_screen::attach_hold(id(home_page)->obj, ${SETTINGS_HOLD_X}, 0, ${SETTINGS_HOLD_W}, ${SCROLL_Y});
|
||||
// Under the cards: brightness_overlay is the first of them on the page, so the back button and
|
||||
// the action at the top right of a card keep their taps.
|
||||
settings_screen::attach_hold(id(home_page)->obj, ${SETTINGS_HOLD_X}, 0, ${SETTINGS_HOLD_W}, ${SCROLL_Y}, id(brightness_overlay));
|
||||
- light.turn_on:
|
||||
id: back_light
|
||||
brightness: !lambda "return screen_settings::current.brightness / 100.0f;"
|
||||
|
||||
Reference in New Issue
Block a user