@@ -2,7 +2,6 @@ import QtQuick
22import QtQuick.Layouts
33
44import ComponentLibrary
5- import WatchFlower
65
76Rectangle {
87 id: appHeader
@@ -11,16 +10,20 @@ Rectangle {
1110 anchors .left : parent .left
1211 anchors .right : parent .right
1312
14- height: headerHeight + Math . max (screenPaddingStatusbar, screenPaddingTop)
13+ height: headerFullHeight
1514 color: Theme .colorHeader
1615 clip: true
1716 z: 10
1817
19- property int headerHeight: 52
18+ property int headerFullHeight: headerHeight + Math .max (screenPaddingStatusbar, screenPaddingTop) - (headerUnicolor ? 12 : 0 )
19+
20+ property bool headerUnicolor: (Theme .colorHeader === Theme .colorStatusbar )
21+
22+ property int headerHeight: 56 // vertical
2023
2124 property int headerPosition: 56 // horizontal
2225
23- property string headerTitle: " WatchFlower "
26+ property string headerTitle: utilsApp . appName ()
2427
2528 property string headerSubTitle: " "
2629
@@ -32,11 +35,11 @@ Rectangle {
3235 property string rightMenuMode: " off" // on / off
3336 signal rightMenuClicked ()
3437
35- // //////////////////////////////////////////////////////////////////////////
36-
3738 function rightMenuIsOpen () { return actionMenu .visible ; }
3839 function rightMenuClose () { actionMenu .close (); }
3940
41+ // //////////////////////////////////////////////////////////////////////////
42+
4043 signal deviceRebootButtonClicked ()
4144 signal deviceCalibrateButtonClicked ()
4245 signal deviceWateringButtonClicked ()
@@ -72,13 +75,18 @@ Rectangle {
7275
7376 height: Math .max (screenPaddingStatusbar, screenPaddingTop)
7477 color: Theme .colorStatusbar
78+ visible: ! appHeader .headerUnicolor
7579 }
7680
7781 Item {
78- anchors .fill : parent
79- anchors .topMargin : Math .max (screenPaddingStatusbar, screenPaddingTop)
82+ anchors .left : parent .left
8083 anchors .leftMargin : screenPaddingLeft
84+ anchors .right : parent .right
8185 anchors .rightMargin : screenPaddingRight
86+ anchors .bottom : parent .bottom
87+ anchors .bottomMargin : appHeader .headerUnicolor ? - 4 : 0
88+
89+ height: appHeader .headerHeight
8290
8391 // //////////
8492
@@ -167,6 +175,8 @@ Rectangle {
167175
168176 spacing: 4
169177
178+ // //
179+
170180 Item { // right indicator
171181 width: appHeader .headerHeight
172182 height: appHeader .headerHeight
@@ -178,8 +188,8 @@ Rectangle {
178188
179189 IconSvg {
180190 id: workingIndicator
181- width: 24 ; height: 24 ;
182191 anchors .centerIn : parent
192+ width: 24 ; height: 24 ;
183193
184194 source: {
185195 if (deviceManager .scanning )
@@ -216,6 +226,8 @@ Rectangle {
216226 }
217227 }
218228
229+ // //
230+
219231 MouseArea { // right button
220232 width: appHeader .headerHeight
221233 height: appHeader .headerHeight
@@ -226,7 +238,7 @@ Rectangle {
226238 appContent .state === " DeviceEnvironmental" ))
227239
228240 onClicked: {
229- rightMenuClicked ()
241+ appHeader . rightMenuClicked ()
230242 actionMenu .open ()
231243 }
232244
@@ -248,6 +260,8 @@ Rectangle {
248260 color: Theme .colorHeaderContent
249261 }
250262 }
263+
264+ // //
251265 }
252266
253267 // //////////
0 commit comments