Review feedback

Now with unified style as agreed upon by Simon & Ian.

Rules:

- ID before all other props.
- All props before children.
- All props after ID in alphabetical order.
- Empty line between children.
- Semi-colons.

Note: I didn't touch the DiscoverUM3Action because that's it's whole own UI part.
This commit is contained in:
Ian Paschal 2018-10-03 10:55:38 +02:00
parent 2c5095befb
commit 5ca0c599e9
18 changed files with 721 additions and 821 deletions

View file

@ -4,46 +4,37 @@
import QtQuick 2.3
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.3
import QtQuick.Controls 2.0 as Controls2
import QtGraphicalEffects 1.0
import UM 1.3 as UM
import Cura 1.0 as Cura
Rectangle
{
property var iconSource: null
Rectangle {
property var iconSource: null;
color: clickArea.containsMouse ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary");
height: width;
radius: 0.5 * width;
width: 36 * screenScaleFactor;
width: 36 * screenScaleFactor
height: width
radius: 0.5 * width
color: clickArea.containsMouse ? UM.Theme.getColor("primary_hover") : UM.Theme.getColor("primary")
UM.RecolorImage
{
id: icon
width: parent.width / 2
height: width
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
color: UM.Theme.getColor("primary_text")
source: iconSource
UM.RecolorImage {
id: icon;
anchors {
horizontalCenter: parent.horizontalCenter;
verticalCenter: parent.verticalCenter;
}
color: UM.Theme.getColor("primary_text");
height: width;
source: iconSource;
width: parent.width / 2;
}
MouseArea
{
id: clickArea
anchors.fill:parent
hoverEnabled: true
onClicked:
{
if (OutputDevice.activeCamera !== null)
{
MouseArea {
id: clickArea;
anchors.fill: parent;
hoverEnabled: true;
onClicked: {
if (OutputDevice.activeCamera !== null) {
OutputDevice.setActiveCamera(null)
}
else
{
OutputDevice.setActiveCamera(modelData.camera)
} else {
OutputDevice.setActiveCamera(modelData.camera);
}
}
}