@@ -48,6 +48,7 @@ ApplicationWindow {
4848 property int notchRight: 0
4949 property int notchBot: 0
5050 property int notchTop: 0
51+ property bool mainIsHorizontal: appWindow .width > appWindow .height
5152
5253 // https://github.com/ekke/c2gQtWS_x/blob/master/qml/main.qml
5354 flags: Qt .platform .os === " ios" ? (Qt .Window | Qt .MaximizeUsingFullscreenGeometryHint ) : Qt .Window
@@ -66,16 +67,16 @@ ApplicationWindow {
6667
6768 Timer {
6869 id: oriTimer
69- interval: 100 ; running: true ; repeat: false
70+ interval: 100
71+ running: true
72+ repeat: true
73+
7074 onTriggered: {
7175 updateNotch ()
7276 }
7377 }
7478
7579 Screen .orientationUpdateMask : Qt .LandscapeOrientation | Qt .PortraitOrientation
76- Screen .onPrimaryOrientationChanged : {
77- oriTimer .start ()
78- }
7980
8081 Component .onCompleted : {
8182 if (! VescIf .isIntroDone ()) {
@@ -301,6 +302,7 @@ ApplicationWindow {
301302 anchors .fill : parent
302303 anchors .leftMargin : 10
303304 anchors .rightMargin : 10
305+ isHorizontal: mainIsHorizontal
304306
305307 onRequestOpenControls: {
306308 controls .openDialog ()
@@ -366,6 +368,7 @@ ApplicationWindow {
366368 sourceComponent: RtData {
367369 anchors .fill : parent
368370 updateData: tabBar .currentIndex == (1 + indexOffset ()) && rtSwipeView .currentIndex == 0
371+ isHorizontal: mainIsHorizontal
369372 }
370373 }
371374 }
@@ -379,6 +382,7 @@ ApplicationWindow {
379382 anchors .fill : parent
380383 dialogParent: mainSwipeView
381384 updateData: tabBar .currentIndex == (1 + indexOffset ()) && rtSwipeView .currentIndex == 1
385+ isHorizontal: mainIsHorizontal
382386 }
383387 }
384388 }
@@ -431,6 +435,7 @@ ApplicationWindow {
431435
432436 sourceComponent: StatPage {
433437 anchors .fill : parent
438+ isHorizontal: mainIsHorizontal
434439 }
435440 }
436441 }
@@ -445,6 +450,7 @@ ApplicationWindow {
445450 visible: status == Loader .Ready
446451 sourceComponent: BMS {
447452 anchors .fill : parent
453+ isHorizontal: mainIsHorizontal
448454 }
449455 }
450456 }
@@ -607,6 +613,7 @@ ApplicationWindow {
607613 dialogParent: mainSwipeView
608614 anchors .leftMargin : 10
609615 anchors .rightMargin : 10
616+ isHorizontal: mainIsHorizontal
610617 }
611618 }
612619 }
@@ -624,6 +631,7 @@ ApplicationWindow {
624631 anchors .fill : parent
625632 anchors .leftMargin : 10
626633 anchors .rightMargin : 10
634+ isHorizontal: mainIsHorizontal
627635 }
628636 }
629637 }
@@ -640,6 +648,7 @@ ApplicationWindow {
640648 anchors .fill : parent
641649 anchors .leftMargin : 10
642650 anchors .rightMargin : 10
651+ isHorizontal: mainIsHorizontal
643652 }
644653 }
645654 }
0 commit comments