[Table] Cosmetics
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include "ff.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.
|
constexpr uint8_t LEN_FILE_EXTENSION_MAX = 5; // longest used, including the dot, excluding null term.
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -48,7 +48,8 @@ class Table: public FormField {
|
|||||||
|
|
||||||
void paint(BitmapBuffer * dc, coord_t x, coord_t y, LcdFlags flags) override
|
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
|
bool needsInvalidate() override
|
||||||
@@ -70,7 +71,7 @@ class Table: public FormField {
|
|||||||
void paint(BitmapBuffer * dc, coord_t x, coord_t y, LcdFlags flags) override
|
void paint(BitmapBuffer * dc, coord_t x, coord_t y, LcdFlags flags) override
|
||||||
{
|
{
|
||||||
auto text = getText();
|
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
|
bool needsInvalidate() override
|
||||||
|
|||||||
Reference in New Issue
Block a user