File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
demos/home-automation/ui/components/mainView Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ export component MainScreen inherits Rectangle {
118118 ]
119119 }
120120
121- Rectangle {
121+ if AppState.orientation == Orientation.landscape: Rectangle {
122122 property <bool > showing-time : true ;
123123 property <length > margin : AppState.graphics-accelerator-available ? 5px : 20px ;
124124 width : 200px ;
@@ -184,7 +184,7 @@ export component MainScreen inherits Rectangle {
184184 }
185185 }
186186 }
187- if AppState.orientation == Orientation.portrait: HorizontalLayout {
187+ if AppState.orientation == Orientation.portrait: HorizontalLayout {
188188 y : root .height - self .height - 10px ;
189189 alignment : center;
190190 spacing : 30px ;
@@ -208,7 +208,7 @@ export component MainScreen inherits Rectangle {
208208 }
209209 HorizontalLayout {
210210 HaText {
211- text : Api.current-time.hour.mod(12 );
211+ text : Api.current-time.hour.mod(12 ) == 0 ? 12 : Api.current-time.hour.mod( 12 ) ;
212212 horizontal-alignment : center;
213213 vertical-alignment : center;
214214 color : Palette.info-foreground;
You can’t perform that action at this time.
0 commit comments