@@ -353,38 +353,21 @@ static void compute_position(nbgl_obj_t *obj, nbgl_obj_t *prevObj)
353
353
354
354
obj -> area .x0 = parent -> obj .area .x0 + obj -> rel_x0 ;
355
355
obj -> area .y0 = parent -> obj .area .y0 + obj -> rel_y0 ;
356
- if ((obj -> area .x0 + obj -> area .width ) > (parent -> obj .area .x0 + parent -> obj .area .width )) {
357
- #ifdef BUILD_SCREENSHOTS
358
- obj -> area .width = parent -> obj .area .x0 + parent -> obj .area .width - obj -> area .x0 ;
359
- // Be sure the area is not empty
360
- if (!obj -> area .width ) {
361
- obj -> area .width = 1 ;
362
- obj -> area .x0 -= 1 ;
363
- }
364
- #else // BUILD_SCREENSHOTS
356
+
357
+ if ((obj -> area .x0 + obj -> area .width ) > SCREEN_WIDTH ) {
365
358
LOG_FATAL (OBJ_LOGGER ,
366
359
"compute_position(), forbidden width, obj->type = %d, x0=%d, width=%d\n" ,
367
360
obj -> type ,
368
361
obj -> area .x0 ,
369
362
obj -> area .width );
370
- #endif // BUILD_SCREENSHOTS
371
363
}
372
364
#ifdef HAVE_SE_TOUCH
373
- if ((obj -> area .y0 + obj -> area .height ) > (parent -> obj .area .y0 + parent -> obj .area .height )) {
374
- #ifdef BUILD_SCREENSHOTS
375
- obj -> area .height = parent -> obj .area .y0 + parent -> obj .area .height - obj -> area .y0 ;
376
- // Be sure the area is not empty
377
- if (!obj -> area .height ) {
378
- obj -> area .height = 1 ;
379
- obj -> area .y0 -= 1 ;
380
- }
381
- #else // BUILD_SCREENSHOTS
365
+ if ((obj -> area .y0 + obj -> area .height ) > SCREEN_HEIGHT ) {
382
366
LOG_FATAL (OBJ_LOGGER ,
383
367
"compute_position(), forbidden height, obj->type = %d, y0=%d, height=%d\n" ,
384
368
obj -> type ,
385
369
obj -> area .y0 ,
386
370
obj -> area .height );
387
- #endif // BUILD_SCREENSHOTS
388
371
}
389
372
#endif // HAVE_SE_TOUCH
390
373
}
0 commit comments