How to handle buttons on bigger touch area

What do you want to achieve?

Touch area (480x600) is bigger than actual display area (480x272).

This extended touch area has some additional buttons that should influence gui.

Is there any way to handle bigger touch than display area in squareline?

What would be a smart way to handle it within squareline projects?

LVGL will probably only handle touch/pointer coordinates outside of the 480x272 widget-area if the screens created and exported from SquareLine Studio are the same resolution/size as the wished touch-sensitive resolution/size. So when you create a new project in SquareLine Studio you can set the display-size to 480x600, and to constrain/position widgets into the smaller actively displayed 480x272 area, you can use a container sized and positioned to the 480x272 area as a parent instead of the whole screen. (It doesn’t matter for LVGL if the parent of the button is the whole screen or a smaller container.)

But you didn’t specify if the top-left (pixel[0]) reference corner of your display and touch matches. If there’s an area at the top/left sides where there’s only touch and no display, then you might need to use an offset to match the touch and display coordinates, and to show only the active part of the screen. This offset can be set in SquareLine Studio project-creation panel, but mostly in the code after export. The latter allows flexible configuration, most display and touchpad drivers allow you to set x/y offset, rotation, scaling, etc. Maybe a little bit of tweaking will be needed, It’s best to set/calibrate it with a temporary test-widget that cyclically follows the ‘finger/pointer’ coordinates e.g. in the main loop. (You might need negative offsets in places.)

LVGL itself will probably not handle the touches to widgets made outside of the screen (you should test that with widgets out of screen, but anyway it usually complains in the console about coordinates outside of screen at runtime), a widget’s ‘Overflow visible’ flag in SquareLine Studio might have an impact on the button-clickability of outside-screen area (exports lv_obj_add_flag( widget, LV_OBJ_FLAG_OVERFLOW_VISIBLE ); ). But in any case, the driver of the touchpad/pointer will hopefully report the outside-coordinates in its handler function registered to lv_indev_drv_t in the HAL initialization routines. So if you won’t have a SquareLine/LVGL related behaviour, you can use the coordinates reported by the driver directly and handle clicking/tapping on the ‘outside-display’ touchscreen-area.