feat(color): Single select option for model labels. label AND/OR filtering logic (#4532)
This commit is contained in:
+5
-6
@@ -169,20 +169,19 @@ coord_t TableField::getColumnWidth(uint16_t col) const
|
||||
return lv_table_get_col_width(lvobj, col);
|
||||
}
|
||||
|
||||
void TableField::select(uint16_t row, uint16_t col)
|
||||
void TableField::select(uint16_t row, uint16_t col, bool force)
|
||||
{
|
||||
lv_table_t* table = (lv_table_t*)lvobj;
|
||||
if (table->row_act == row && table->col_act == row) return;
|
||||
if (!force && table->row_act == row && table->col_act == row) return;
|
||||
|
||||
if (row >= table->row_cnt || col >= table->col_cnt) {
|
||||
table->col_act = LV_TABLE_CELL_NONE;
|
||||
table->row_act = LV_TABLE_CELL_NONE;
|
||||
return;
|
||||
} else {
|
||||
table->row_act = row;
|
||||
table->col_act = col;
|
||||
}
|
||||
|
||||
table->row_act = row;
|
||||
table->col_act = col;
|
||||
|
||||
lv_obj_invalidate(lvobj);
|
||||
adjustScroll();
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ class TableField : public Window
|
||||
void setColumnWidth(uint16_t col, coord_t w);
|
||||
coord_t getColumnWidth(uint16_t col) const;
|
||||
|
||||
void select(uint16_t row, uint16_t col);
|
||||
void select(uint16_t row, uint16_t col, bool force = false);
|
||||
virtual void onPress(uint16_t row, uint16_t col) {}
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user