Add debug info to tabview
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include <stdio.h>
|
||||
#include "../lv_objx/lv_page.h"
|
||||
#if LV_USE_PAGE != 0
|
||||
|
||||
@@ -402,6 +403,10 @@ bool lv_page_on_edge(lv_obj_t *page, lv_page_edge_t edge) {
|
||||
lv_obj_get_coords(scrl, &scrl_coords);
|
||||
lv_obj_get_coords(page, &page_coords);
|
||||
|
||||
if(edge == LV_PAGE_EDGE_LEFT) {
|
||||
printf("scrl_coords.x1 %d\n", scrl_coords.x1);
|
||||
printf("page_coords.x1 + page_style->body.padding.left %d\n", page_coords.x1 + page_style->body.padding.left);
|
||||
}
|
||||
if(edge == LV_PAGE_EDGE_TOP && scrl_coords.y1 == page_coords.y1 + page_style->body.padding.top)
|
||||
return true;
|
||||
else if(edge == LV_PAGE_EDGE_BOTTOM && scrl_coords.y2 == page_coords.y2 - page_style->body.padding.bottom)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include <stdio.h>
|
||||
#include "lv_tabview.h"
|
||||
#if LV_USE_TABVIEW != 0
|
||||
|
||||
@@ -744,11 +745,13 @@ static void tabpage_pressing_handler(lv_obj_t * tabview, lv_obj_t * tabpage)
|
||||
ext->point_last.y = point_act.y;
|
||||
}
|
||||
ext->drag_hor = 1;
|
||||
printf("Horizontal drag started\n");
|
||||
lv_obj_set_drag(lv_page_get_scrl(tabpage), false);
|
||||
|
||||
} else if(ext->drag_hor == 0) {
|
||||
ext->drag_hor = 0;
|
||||
}
|
||||
printf("%d %d\n", lv_page_on_edge(tabpage, LV_PAGE_EDGE_LEFT), lv_page_on_edge(tabpage, LV_PAGE_EDGE_RIGHT));
|
||||
} else if(y_diff >= LV_INDEV_DRAG_LIMIT || y_diff <= -LV_INDEV_DRAG_LIMIT) {
|
||||
ext->drag_hor = 0;
|
||||
ext->draging = 1;
|
||||
|
||||
Reference in New Issue
Block a user