Replace Theme property accessors with getThing calls

This commit is contained in:
Arjen Hiemstra 2016-01-21 18:56:18 +01:00 committed by Ghostkeeper
parent c50c223124
commit 720324f0c6
15 changed files with 255 additions and 229 deletions

View file

@ -11,11 +11,11 @@ import UM 1.0 as UM
UM.PointingRectangle {
id: base;
width: UM.Theme.sizes.tooltip.width;
height: label.height + UM.Theme.sizes.tooltip_margins.height * 2;
color: UM.Theme.colors.tooltip;
width: UM.Theme.getSize("tooltip").width;
height: label.height + UM.Theme.getSize("tooltip_margins").height * 2;
color: UM.Theme.getColor("tooltip");
arrowSize: UM.Theme.sizes.default_arrow.width
arrowSize: UM.Theme.getSize("default_arrow").width
opacity: 0;
Behavior on opacity { NumberAnimation { duration: 100; } }
@ -28,7 +28,7 @@ UM.PointingRectangle {
y = parent.height - base.height;
} else {
x = position.x - base.width;
y = position.y - UM.Theme.sizes.tooltip_arrow_margins.height;
y = position.y - UM.Theme.getSize("tooltip_arrow_margins").height;
}
base.opacity = 1;
target = Qt.point(40 , position.y)
@ -42,14 +42,14 @@ UM.PointingRectangle {
id: label;
anchors {
top: parent.top;
topMargin: UM.Theme.sizes.tooltip_margins.height;
topMargin: UM.Theme.getSize("tooltip_margins").height;
left: parent.left;
leftMargin: UM.Theme.sizes.tooltip_margins.width;
leftMargin: UM.Theme.getSize("tooltip_margins").width;
right: parent.right;
rightMargin: UM.Theme.sizes.tooltip_margins.width;
rightMargin: UM.Theme.getSize("tooltip_margins").width;
}
wrapMode: Text.Wrap;
font: UM.Theme.fonts.default;
color: UM.Theme.colors.tooltip_text;
font: UM.Theme.getFont("default");
color: UM.Theme.getColor("tooltip_text");
}
}