Skip to content

Commit

Permalink
aligned columns in data table, no functional change
Browse files Browse the repository at this point in the history
  • Loading branch information
barry-ha committed Mar 9, 2024
1 parent ac7551f commit 986b03b
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions view_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ class ViewTime : public View {
// color scheme: see constants.h

// ========== text screen layout ===================================
// these are names for the array indexes, must be named in same order as array below

// vertical placement of text rows
const int yRow9 = 226; // aligned vertically wqith + and - buttons

// ----- screen text
// names for the array indexes, must be named in same order as array below
enum txtIndex {
TITLE = 0,
HOURS,
Expand All @@ -90,21 +95,24 @@ class ViewTime : public View {
NUMSATS,
};

// ----- static + dynamic screen text
// clang-format off
#define numClockFields 11
TextField txtClock[numClockFields] = {
// text x,y color align font
{"Griduino GMT", -1, 18, cTITLE, ALIGNCENTER, eFONTSMALLEST}, // [TITLE] program title, centered
{"hh", 12, 94, cVALUE, ALIGNLEFT, eFONTGIANT}, // [HOURS] giant clock hours
{":", 94, 94, cVALUE, ALIGNLEFT, eFONTGIANT}, // [COLON1] :
{"mm", 120, 94, cVALUE, ALIGNLEFT, eFONTGIANT}, // [MINUTES] giant clock minutes
{":", 204, 94, cVALUE, ALIGNLEFT, eFONTGIANT}, // [COLON2] :
{"ss", 230, 94, cVALUE, ALIGNLEFT, eFONTGIANT}, // [SECONDS] giant clock seconds
{"MMM dd, yyyy", -1, 140, cVALUE, ALIGNCENTER, eFONTSMALL}, // [GMTDATE] GMT date
{"", -1, 174, cVALUE, ALIGNCENTER, eFONTSMALL}, // [DEGREES] Temperature e.g. "12.3 F"
{"hh:mm:ss", 118, 226, cTEXTCOLOR, ALIGNLEFT, eFONTSMALL}, // [LOCALTIME] Local time
{"-7h", 8, 226, cFAINT, ALIGNLEFT, eFONTSMALLEST}, // [TIMEZONE] addHours time zone
{"6#", 308, 226, cFAINT, ALIGNRIGHT, eFONTSMALLEST}, // [NUMSATS] numSats
// text x,y color align font
{"Griduino GMT", -1, 18, cTITLE, ALIGNCENTER, eFONTSMALLEST}, // [TITLE] program title, centered
{"hh", 12, 94, cVALUE, ALIGNLEFT, eFONTGIANT}, // [HOURS] giant clock hours
{":", 94, 94, cVALUE, ALIGNLEFT, eFONTGIANT}, // [COLON1] :
{"mm", 120, 94, cVALUE, ALIGNLEFT, eFONTGIANT}, // [MINUTES] giant clock minutes
{":", 204, 94, cVALUE, ALIGNLEFT, eFONTGIANT}, // [COLON2] :
{"ss", 230, 94, cVALUE, ALIGNLEFT, eFONTGIANT}, // [SECONDS] giant clock seconds
{"MMM dd, yyyy", -1, 140, cVALUE, ALIGNCENTER, eFONTSMALL}, // [GMTDATE] GMT date
{"", -1, 174, cVALUE, ALIGNCENTER, eFONTSMALL}, // [DEGREES] Temperature e.g. "12.3 F"
{"hh:mm:ss", 118, yRow9, cTEXTCOLOR,ALIGNLEFT, eFONTSMALL}, // [LOCALTIME] Local time
{"-7h", 8, yRow9, cFAINT, ALIGNLEFT, eFONTSMALLEST}, // [TIMEZONE] addHours time zone
{"6#", 308, yRow9, cFAINT, ALIGNRIGHT, eFONTSMALLEST}, // [NUMSATS] numSats
};
// clang-format on

enum buttonID {
etimeZonePlus,
Expand Down

0 comments on commit 986b03b

Please sign in to comment.