Merge PR #828: Fix for some light controls being invisible after entering details view
This commit is contained in:
commit
96ce87e7d7
@ -106,7 +106,7 @@ Item {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
print("current color:", shownColor.r, shownColor.g, shownColor.b)
|
// print("current color:", shownColor.r, shownColor.g, shownColor.b)
|
||||||
|
|
||||||
var whitePart = Math.min(Math.min(shownColor.r, shownColor.g), shownColor.b)
|
var whitePart = Math.min(Math.min(shownColor.r, shownColor.g), shownColor.b)
|
||||||
|
|
||||||
@ -143,17 +143,17 @@ Item {
|
|||||||
var stopBefore = g.stops[stopIndex]
|
var stopBefore = g.stops[stopIndex]
|
||||||
var stopAfter = g.stops[stopIndex+1]
|
var stopAfter = g.stops[stopIndex+1]
|
||||||
|
|
||||||
print("stopIndex", stopIndex)
|
// print("stopIndex", stopIndex)
|
||||||
print("stopBefore:", stopBefore.color.r, stopBefore.color.g, stopBefore.color.b)
|
// print("stopBefore:", stopBefore.color.r, stopBefore.color.g, stopBefore.color.b)
|
||||||
print("stopAfter:", stopAfter.color.r, stopAfter.color.g, stopAfter.color.b)
|
// print("stopAfter:", stopAfter.color.r, stopAfter.color.g, stopAfter.color.b)
|
||||||
print("progressInStop", progressInStop)
|
// print("progressInStop", progressInStop)
|
||||||
|
|
||||||
|
|
||||||
print("beforePosition", stopBefore.position)
|
// print("beforePosition", stopBefore.position)
|
||||||
|
|
||||||
var positionInGradient = stopBefore.position + (stopAfter.position - stopBefore.position) * progressInStop
|
var positionInGradient = stopBefore.position + (stopAfter.position - stopBefore.position) * progressInStop
|
||||||
|
|
||||||
print("positionInGradient", positionInGradient)
|
// print("positionInGradient", positionInGradient)
|
||||||
|
|
||||||
var degrees = 360 * positionInGradient;
|
var degrees = 360 * positionInGradient;
|
||||||
degrees -= 90;
|
degrees -= 90;
|
||||||
@ -166,10 +166,10 @@ Item {
|
|||||||
var x = radius * Math.cos(radian)
|
var x = radius * Math.cos(radian)
|
||||||
var y = radius * Math.sin(radian)
|
var y = radius * Math.sin(radian)
|
||||||
|
|
||||||
print("degrees", degrees)
|
// print("degrees", degrees)
|
||||||
print("radius", radius)
|
// print("radius", radius)
|
||||||
|
|
||||||
print("Setting point to", x, y)
|
// print("Setting point to", x, y)
|
||||||
point = Qt.point(x, y)
|
point = Qt.point(x, y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -275,12 +275,11 @@ ThingPageBase {
|
|||||||
GridLayout {
|
GridLayout {
|
||||||
id: basicItems
|
id: basicItems
|
||||||
Layout.fillWidth: !app.landscape
|
Layout.fillWidth: !app.landscape
|
||||||
Layout.fillHeight: app.landscape
|
Layout.fillHeight: app.landscape && (powerButton.visible || brightnessSlider.visible)
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
columnSpacing: app.margins
|
columnSpacing: app.margins
|
||||||
rowSpacing: app.margins
|
rowSpacing: app.margins
|
||||||
columns: app.landscape ? 1 : 2
|
columns: app.landscape ? 1 : 2
|
||||||
visible: powerButton.visible || brightnessSlider.visible
|
|
||||||
|
|
||||||
ProgressButton {
|
ProgressButton {
|
||||||
id: powerButton
|
id: powerButton
|
||||||
|
|||||||
Reference in New Issue
Block a user