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.

chore(ui): replace hard coded font sizes

+19 -19
+6 -6
ui/components/buttons.slint
··· 5 5 in property <string> text; 6 6 callback clicked; 7 7 8 - height: 28px; 8 + height: 28px * Theme.font-scale; 9 9 min-width: 100px; 10 10 preferred-width: 160px; 11 11 ··· 40 40 41 41 Text { 42 42 text: root.text; 43 - font-size: 12px; 43 + font-size: Theme.font_xsmall; 44 44 color: Theme.ink; 45 45 horizontal-alignment: center; 46 46 vertical-alignment: center; ··· 53 53 in property <string> text; 54 54 callback clicked; 55 55 56 - height: 30px; 56 + height: 30px * Theme.font-scale; 57 57 min-width: 72px; 58 58 59 59 ta := TouchArea { ··· 83 83 in property <string> text; 84 84 callback clicked; 85 85 86 - height: 30px; 86 + height: 30px * Theme.font-scale; 87 87 min-width: 72px; 88 88 89 89 ta := TouchArea { ··· 100 100 101 101 Text { 102 102 text: root.text; 103 - font-size: 12px; 103 + font-size: Theme.font_xsmall; 104 104 color: Theme.ink; 105 105 horizontal-alignment: center; 106 106 vertical-alignment: center; ··· 114 114 in property <bool> active: false; 115 115 callback clicked; 116 116 117 - height: 40px; 117 + height: 40px * Theme.font-scale; 118 118 min-width: 64px; 119 119 120 120 TouchArea {
+4 -4
ui/components/chips.slint
··· 10 10 alignment: center; 11 11 12 12 for label[i] in root.labels: chip-root := Rectangle { 13 - height: 32px; 13 + height: 32px * Theme.font-scale; 14 14 15 15 accessible-role: AccessibleRole.radio-button; 16 16 accessible-label: label; ··· 81 81 alignment: center; 82 82 83 83 for name[i] in root.profile-names: chip-root := Rectangle { 84 - height: 32px; 84 + height: 32px * Theme.font-scale; 85 85 86 86 accessible-role: AccessibleRole.radio-button; 87 87 accessible-label: name; ··· 119 119 border-color: chip-fs.has-focus 120 120 ? Theme.accent-muted 121 121 : (name == root.active-profile ? transparent : Theme.line); 122 - // adaptive min-width: provided name-width (px) + 24px padding, but at least 48px 123 - min-width: ((root.name-widths[i] * 1px) + 24px) < 48px ? 48px : ((root.name-widths[i] * 1px) + 24px); 122 + // adaptive min-width: scale with font-scale so text isn't clipped at larger sizes 123 + min-width: (((root.name-widths[i] * 1px) + 24px) * Theme.font-scale) < 48px ? 48px : ((root.name-widths[i] * 1px) + 24px) * Theme.font-scale; 124 124 animate background { duration: 120ms; } 125 125 animate border-color { duration: 120ms; } 126 126
+3 -3
ui/components/inputs.slint
··· 9 9 10 10 callback edited(int); 11 11 12 - height: 28px; 12 + height: 28px * Theme.font-scale; 13 13 min-width: 80px; 14 14 accessible-role: spinbox; 15 15 accessible-label: root.field-label; ··· 133 133 in property <bool> enabled: true; 134 134 callback edited(string); 135 135 136 - height: 32px; 136 + height: 32px * Theme.font-scale; 137 137 accessible-role: text-input; 138 138 accessible-label: root.field-label; 139 139 accessible-value: root.text; ··· 164 164 horizontal-stretch: 1; 165 165 enabled: root.enabled; 166 166 text <=> root.text; 167 - font-size: 13px; 167 + font-size: Theme.font_xsmall; 168 168 font-weight: 500; 169 169 color: Theme.ink; 170 170 horizontal-alignment: left;
+1 -1
ui/views/about_tab.slint
··· 83 83 84 84 Text { 85 85 text: "間 (ma) is the Japanese notion of the pause between —\nthe rest in music, the silence between words.\nioma gives that pause back to your eyes and body."; 86 - font-size: Theme.font_caption; 86 + font-size: Theme.font_label; 87 87 color: Theme.ink-mid; 88 88 horizontal-alignment: center; 89 89 vertical-alignment: center;
+5 -5
ui/views/profile_tab.slint
··· 105 105 106 106 Text { 107 107 text: "+ Add interval"; 108 - font-size: 12px; 108 + font-size: Theme.font_xsmall; 109 109 color: add-ta.has-hover ? Theme.ink : Theme.ink-lo; 110 110 horizontal-alignment: center; 111 111 vertical-alignment: center; ··· 147 147 148 148 Text { 149 149 text: "after"; 150 - font-size: Theme.font_caption; 150 + font-size: Theme.font_label; 151 151 color: Theme.ink-mid; 152 152 vertical-alignment: center; 153 153 } ··· 163 163 164 164 Text { 165 165 text: "cycles, take"; 166 - font-size: Theme.font_caption; 166 + font-size: Theme.font_label; 167 167 color: Theme.ink-mid; 168 168 vertical-alignment: center; 169 169 } ··· 179 179 180 180 Text { 181 181 text: "min"; 182 - font-size: Theme.font_caption; 182 + font-size: Theme.font_label; 183 183 color: Theme.ink-mid; 184 184 vertical-alignment: center; 185 185 } 186 186 187 187 Text { 188 188 text: "·"; 189 - font-size: Theme.font_caption; 189 + font-size: Theme.font_label; 190 190 color: Theme.ink-lo; 191 191 vertical-alignment: center; 192 192 }