Making main layout more responsive

This commit is contained in:
Eric Kotato 2018-09-09 19:15:11 +03:00
parent ba7a7d6b29
commit 153a23d178

View file

@ -118,7 +118,7 @@ Rectangle
x: 0 x: 0
y: 0 y: 0
width: root.width width: root.width
height: 35 height: Math.max(buttonPagePower.height, buttonPageSessions.height, buttonPageUsers.height) + 10
SlicedButton SlicedButton
{ {
@ -169,7 +169,7 @@ Rectangle
x: 0 x: 0
y: areaTop.height y: areaTop.height
width: root.width width: root.width
height: root.height - (areaTop.height * 2) height: root.height - areaTop.height - areaBottom.height
PagePower PagePower
{ {
@ -231,15 +231,22 @@ Rectangle
{ {
id: areaBottom id: areaBottom
x: 0 x: 0
y: areaTop.height + areaMain.height y: root.height - height
width: root.width width: root.width
height: 35 height: Math.max(
buttonCapsLock.height,
buttonNumLock.height,
buttonKeyboardLayout.height,
buttonWeekday.height,
buttonDate.height,
buttonTime.height
) + 10
SlicedButton SlicedButton
{ {
id: buttonCapsLock id: buttonCapsLock
x: 5 x: 5
y: 5 y: areaBottom.height - height - 5
hasLeftSlice: false hasLeftSlice: false
text: "Caps Lock" text: "Caps Lock"
@ -254,7 +261,7 @@ Rectangle
{ {
id: buttonNumLock id: buttonNumLock
x: buttonCapsLock.x + buttonCapsLock.widthPartial + 3 x: buttonCapsLock.x + buttonCapsLock.widthPartial + 3
y: 5 y: areaBottom.height - height - 5
text: "Num Lock" text: "Num Lock"
highlighted: keyboard.numLock highlighted: keyboard.numLock
@ -268,7 +275,7 @@ Rectangle
{ {
id: buttonKeyboardLayout id: buttonKeyboardLayout
x: buttonNumLock.x + buttonNumLock.widthPartial + 3 x: buttonNumLock.x + buttonNumLock.widthPartial + 3
y: 5 y: areaBottom.height - height - 5
text: keyboard.layouts[keyboard.currentLayout].longName text: keyboard.layouts[keyboard.currentLayout].longName
@ -285,7 +292,7 @@ Rectangle
{ {
id: buttonWeekday id: buttonWeekday
x: 5 x: 5
y: 5 y: areaBottom.height - height - 5
function updateTime() function updateTime()
{ {
@ -300,7 +307,7 @@ Rectangle
{ {
id: buttonDate id: buttonDate
x: buttonWeekday.x + buttonWeekday.widthPartial + 3 x: buttonWeekday.x + buttonWeekday.widthPartial + 3
y: 5 y: areaBottom.height - height - 5
function updateTime() function updateTime()
{ {
@ -315,7 +322,7 @@ Rectangle
{ {
id: buttonTime id: buttonTime
x: buttonDate.x + buttonDate.widthPartial + 3 x: buttonDate.x + buttonDate.widthPartial + 3
y: 5 y: areaBottom.height - height - 5
hasRightSlice: false hasRightSlice: false