feat(colorlcd): Value widget text alignment options (#3080)

* Adds option to align value widget label and value to left, center or right border of the widget zone.

* Cpn sync

* Typofix thx to @Eldenroot

* fix: Add `TW` translation

* fix: Two spaces for indent

---------

Co-authored-by: elecpower <neilh713@tpg.com.au>
This commit is contained in:
Risto
2023-02-20 14:57:58 +10:00
committed by GitHub
co-authored by elecpower
parent 688addd5d2
commit 97c57cf9ee
24 changed files with 538 additions and 368 deletions
@@ -89,6 +89,7 @@ inline ZoneOptionValueEnum zoneValueEnumFromType(ZoneOption::Type type)
case ZoneOption::Timer:
case ZoneOption::Switch:
case ZoneOption::TextSize:
case ZoneOption::Align:
default:
return ZOV_Unsigned;
}
+12 -1
View File
@@ -75,6 +75,16 @@ enum ZoneOptionValueEnum {
ZOV_LAST = ZOV_Color
};
enum ZoneOptionAlign
{
ALIGN_LEFT,
ALIGN_CENTER,
ALIGN_RIGHT,
// this one MUST be last
ALIGN_COUNT
};
struct ZoneOption
{
enum Type {
@@ -86,7 +96,8 @@ struct ZoneOption
TextSize,
Timer,
Switch,
Color
Color,
Align
};
const char * name;