Commit d5565069 authored by Bruno Coudoin's avatar Bruno Coudoin
Browse files

renewable, made the touch area bigger to accomodate touch screens

parent 39eb56b7
......@@ -423,7 +423,10 @@ Item {
}
MouseArea {
id: dam_area
anchors.fill: dam
anchors.centerIn: parent
// Size the area for a touch screen
width: 70 * ApplicationInfo.ratio
height: width
onClicked: parent.started = !parent.started
}
property bool started: false
......@@ -457,7 +460,10 @@ Item {
property int power: started && damwire.power ? damwire.power : 0
MouseArea {
id: stepup1_area
anchors.fill: parent
anchors.centerIn: parent
// Size the area for a touch screen
width: 70 * ApplicationInfo.ratio
height: width
onClicked: {
parent.started = !parent.started
}
......
......@@ -224,7 +224,10 @@ ActivityBase {
leftMargin: parent.width * 0.72
}
MouseArea {
anchors.fill: parent
anchors.centerIn: parent
// Size the area for a touch screen
width: 70 * ApplicationInfo.ratio
height: width
onClicked: {
onClicked: parent.started = !parent.started
}
......@@ -348,7 +351,10 @@ ActivityBase {
MouseArea {
id: small_area
visible: parent.visible
anchors.fill: parent
anchors.centerIn: parent
// Size the area for a touch screen
width: 70 * ApplicationInfo.ratio
height: width
onClicked: {
if(stepDown.powerIn - stepDown.powerOut >= residentSmallLights.power)
parent.on = !parent.on
......@@ -408,7 +414,10 @@ ActivityBase {
MouseArea {
id: big_area
visible: parent.visible
anchors.fill: parent
anchors.centerIn: parent
// Size the area for a touch screen
width: 70 * ApplicationInfo.ratio
height: width
onClicked: {
if(stepDown.powerIn - stepDown.powerOut >= residentBigLights.power)
parent.on = !parent.on
......@@ -485,7 +494,10 @@ ActivityBase {
}
MouseArea {
id: off_area
anchors.fill: parent
anchors.centerIn: parent
// Size the area for a touch screen
width: 70 * ApplicationInfo.ratio
height: width
onClicked: {
if(stepDown.powerIn - stepDown.powerOut >= tux.power)
parent.on = !parent.on
......
......@@ -46,7 +46,10 @@ Item {
property bool started: false
property int power: started ? solarPanel.power : 0
MouseArea {
anchors.fill: parent
anchors.centerIn: parent
// Size the area for a touch screen
width: 70 * ApplicationInfo.ratio
height: width
onClicked: parent.started = !parent.started
}
}
......@@ -100,7 +103,10 @@ Item {
property bool started: false
property int power: started && items.sunIsUp ? 1000 : 0
MouseArea {
anchors.fill: parent
anchors.centerIn: parent
// Size the area for a touch screen
width: 70 * ApplicationInfo.ratio
height: width
onClicked: parent.started = !parent.started
}
}
......
......@@ -76,7 +76,10 @@ Item {
property bool started: false
property int power: started ? windTurbine.power : 0
MouseArea {
anchors.fill: parent
anchors.centerIn: parent
// Size the area for a touch screen
width: 70 * ApplicationInfo.ratio
height: width
onClicked: {
parent.started = !parent.started
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment