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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user