[Table] Cosmetics

This commit is contained in:
Bertrand Songis
2020-10-07 19:51:10 +02:00
parent 31657fe534
commit 9959974322
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -24,7 +24,7 @@
#include <string.h>
#include <inttypes.h>
#include "ff.h"
#include "libopenui_defines.h"
// #include "libopenui_defines.h"
constexpr uint8_t LEN_FILE_EXTENSION_MAX = 5; // longest used, including the dot, excluding null term.
+3 -2
View File
@@ -48,7 +48,8 @@ class Table: public FormField {
void paint(BitmapBuffer * dc, coord_t x, coord_t y, LcdFlags flags) override
{
dc->drawText(x, y + (TABLE_LINE_HEIGHT - getFontHeight(TABLE_BODY_FONT)) / 2 + 3, value.c_str(), flags);
dc->drawText(x, y - 2 + (TABLE_LINE_HEIGHT - getFontHeight(TABLE_HEADER_FONT)) / 2 + 3, value.c_str(), flags);
}
bool needsInvalidate() override
@@ -70,7 +71,7 @@ class Table: public FormField {
void paint(BitmapBuffer * dc, coord_t x, coord_t y, LcdFlags flags) override
{
auto text = getText();
dc->drawText(x, y + (TABLE_LINE_HEIGHT - getFontHeight(TABLE_BODY_FONT)) / 2 + 3, text.c_str(), SPACING_NUMBERS_CONST | flags);
dc->drawText(x, y - 2 + (TABLE_LINE_HEIGHT - getFontHeight(TABLE_BODY_FONT)) / 2 + 3, text.c_str(), SPACING_NUMBERS_CONST | flags);
}
bool needsInvalidate() override