Battery info switcher (#2230)

This commit is contained in:
Totoo 2024-08-28 11:32:24 +02:00 committed by GitHub
parent 1a0555f9eb
commit 0ae7768f20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 147 additions and 29 deletions

View file

@ -53,11 +53,14 @@ class BattinfoView : public View {
Labels labels{
{{2 * 8, 1 * 16}, "Percent:", Theme::getInstance()->fg_light->foreground},
{{2 * 8, 2 * 16}, "Voltage:", Theme::getInstance()->fg_light->foreground}};
{{2 * 8, 2 * 16}, "Voltage:", Theme::getInstance()->fg_light->foreground},
{{2 * 8, 3 * 16}, "Method:", Theme::getInstance()->fg_light->foreground},
{{2 * 8, 7 * 16}, "Change method:", Theme::getInstance()->fg_light->foreground},
};
Labels labels_opt{
{{2 * 8, 3 * 16}, "Current:", Theme::getInstance()->fg_light->foreground},
{{2 * 8, 4 * 16}, "Charge:", Theme::getInstance()->fg_light->foreground}};
{{2 * 8, 4 * 16}, "Current:", Theme::getInstance()->fg_light->foreground},
{{2 * 8, 5 * 16}, "Charge:", Theme::getInstance()->fg_light->foreground}};
Text text_percent{
{13 * 8, 1 * 16, 10 * 16, 16},
@ -65,12 +68,19 @@ class BattinfoView : public View {
Text text_voltage{
{13 * 8, 2 * 16, 10 * 16, 16},
"-"};
Text text_current{
Text text_method{
{13 * 8, 3 * 16, 10 * 16, 16},
"-"};
Text text_charge{
Text text_current{
{13 * 8, 4 * 16, 10 * 16, 16},
"-"};
Text text_charge{
{13 * 8, 5 * 16, 10 * 16, 16},
"-"};
Button button_mode{
{2 * 8, 8 * 16 + 5, 5 * 16, 32},
"Volt"};
Button button_exit{
{72, 17 * 16, 96, 32},