a lightweight, interval-based utility to combat digital strain through "Ma" (intentional pauses) for the eyes and body.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(ui): replace static display chip with chip set for active-profile

+31 -24
+31 -24
ui/settings.slint
··· 594 594 horizontal-stretch: 1; 595 595 } 596 596 597 - // Profile chip 598 - Rectangle { 599 - height: 32px; 600 - min-width: 160px; 601 - border-radius: 6px; 602 - background: #FFFFFF80; 603 - border-width: 1px; 604 - border-color: #2320281A; 597 + // Profile chips — click to select 598 + HorizontalLayout { 599 + spacing: 6px; 600 + alignment: center; 605 601 606 - HorizontalLayout { 607 - padding-left: 12px; 608 - padding-right: 12px; 609 - spacing: 10px; 610 - alignment: center; 602 + for name in root.profile-names: profile-chip-ta := TouchArea { 603 + height: 32px; 604 + min-width: 48px; 605 + clicked => { 606 + root.active-profile = name; 607 + root.profile-changed(name); 608 + } 609 + 610 + Rectangle { 611 + border-radius: 6px; 612 + background: name == root.active-profile ? #232028 : (profile-chip-ta.has-hover ? #FFFFFF : #FFFFFF80); 613 + border-width: 1px; 614 + border-color: name == root.active-profile ? transparent : #2320281A; 615 + animate background { duration: 120ms; } 611 616 612 - Text { 613 - text: root.active-profile; 614 - font-size: 12.5px; 615 - color: #232028; 616 - vertical-alignment: center; 617 - } 617 + HorizontalLayout { 618 + padding-left: 12px; 619 + padding-right: 12px; 620 + alignment: center; 618 621 619 - Text { 620 - text: "every 20 min, look 20 ft for 20 s"; 621 - font-size: 11px; 622 - color: #23202880; 623 - vertical-alignment: center; 622 + Text { 623 + text: name; 624 + font-size: 12px; 625 + font-weight: name == root.active-profile ? 600 : 400; 626 + color: name == root.active-profile ? #F3EFE7 : #232028; 627 + vertical-alignment: center; 628 + animate color { duration: 120ms; } 629 + } 630 + } 624 631 } 625 632 } 626 633 }