Commit ce368046 authored by Alessandro Portale's avatar Alessandro Portale Committed by Thomas Hartmann
Browse files

QmlDesigner: New anchor icons



Themable and High-DPI

Change-Id: Ic073a6a8c5f3fc7eb28b9b498d3dddbebedb243c
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@theqtcompany.com>
parent dc8fcdf0
......@@ -33,7 +33,7 @@ ButtonRow {
id: buttonRow
ButtonRowButton {
iconSource: "images/anchor-top.png"
iconSource: "image://icons/anchor-top"
tooltip: qsTr("Anchor item to the top.")
property bool topAnchored: anchorBackend.topAnchored
......@@ -53,7 +53,7 @@ ButtonRow {
}
ButtonRowButton {
iconSource: "images/anchor-bottom.png"
iconSource: "image://icons/anchor-bottom"
tooltip: qsTr("Anchor item to the bottom.")
property bool bottomAnchored: anchorBackend.bottomAnchored
......@@ -74,7 +74,7 @@ ButtonRow {
}
ButtonRowButton {
iconSource: "images/anchor-left.png"
iconSource: "image://icons/anchor-left"
tooltip: qsTr("Anchor item to the left.")
property bool leftAnchored: anchorBackend.leftAnchored
......@@ -94,7 +94,7 @@ ButtonRow {
}
ButtonRowButton {
iconSource: "images/anchor-right.png"
iconSource: "image://icons/anchor-right"
tooltip: qsTr("Anchor item to the right.")
property bool rightAnchored: anchorBackend.rightAnchored
......@@ -119,7 +119,7 @@ ButtonRow {
ButtonRowButton {
iconSource: "images/anchor-fill.png"
iconSource: "image://icons/anchor-fill"
tooltip: qsTr("Fill parent item.")
property bool isFilled: anchorBackend.isFilled
......@@ -141,7 +141,7 @@ ButtonRow {
}
ButtonRowButton {
iconSource: "images/anchor-vertical.png"
iconSource: "image://icons/anchor-vertical"
tooltip: qsTr("Anchor item vertically.")
property bool verticalCentered: anchorBackend.verticalCentered;
......@@ -163,7 +163,7 @@ ButtonRow {
}
ButtonRowButton {
iconSource: "images/anchor-horizontal.png"
iconSource: "image://icons/anchor-horizontal"
tooltip: qsTr("Anchor item horizontally.")
property bool horizontalCentered: anchorBackend.horizontalCentered;
......
......@@ -69,7 +69,7 @@ Item {
anchors.fill: parent
visible: checked
color: creatorTheme.QmlDesignerBackgroundColorDarker
color: creatorTheme.QmlDesignerBackgroundColorDarkAlternate
}
RoundedPanel {
......@@ -78,15 +78,15 @@ Item {
anchors.fill: parent
visible: !checked
color: creatorTheme.BackgroundColorDark
color: creatorTheme.QmlDesignerBackgroundColorDarker
}
}
Image {
id: image
//source: iconSource
width: 16
height: 16
anchors.centerIn: parent
anchors.leftMargin: leftPadding
}
ToolTipArea {
......
......@@ -38,7 +38,7 @@ Item {
height: 16
Image {
id: image
anchors.centerIn: parent
anchors.fill: parent
}
}
......
......@@ -128,7 +128,7 @@ RowLayout {
exclusive: true
ButtonRowButton {
iconSource: verticalAnchor ? "../HelperWidgets/images/anchor-top.png" : "../HelperWidgets/images/anchor-left.png"
iconSource: "image://icons/anchor-" + (verticalAnchor ? "top" : "left")
tooltip: verticalAnchor ? qsTr("Anchor to the top of the target.") : qsTr("Anchor to the left of the target.")
onClicked: {
if (!invertRelativeTargets)
......@@ -139,14 +139,14 @@ RowLayout {
}
ButtonRowButton {
iconSource: verticalAnchor ? "../HelperWidgets/images/anchor-vertical.png" : "../HelperWidgets/images/anchor-horizontal.png"
iconSource: "image://icons/anchor-" + (verticalAnchor ? "vertical" : "horizontal")
tooltip: verticalAnchor ? qsTr("Anchor to the vertical center of the target.") : qsTr("Anchor to the horizontal center of the target.")
onClicked: centerButtonClicked();
}
ButtonRowButton {
iconSource: verticalAnchor ? "../HelperWidgets/images/anchor-bottom.png" : "../HelperWidgets/images/anchor-right.png"
iconSource: "image://icons/anchor-" + (verticalAnchor ? "bottom" : "right")
tooltip: verticalAnchor ? qsTr("Anchor to the bottom of the target.") : qsTr("Anchor to the right of the target.")
onClicked: {
if (!invertRelativeTargets)
......
......@@ -50,7 +50,7 @@ Section {
AnchorRow {
visible: anchorBackend.topAnchored;
iconSource: "../HelperWidgets/images/anchor-top.png"
iconSource: "image://icons/anchor-top"
anchorMargin: backendValues.anchors_topMargin
targetName: anchorBackend.topTarget
onTargetChanged: {
......@@ -73,7 +73,7 @@ Section {
AnchorRow {
visible: anchorBackend.bottomAnchored;
iconSource: "../HelperWidgets/images/anchor-bottom.png"
iconSource: "image://icons/anchor-bottom"
anchorMargin: backendValues.anchors_bottomMargin
targetName: anchorBackend.bottomTarget
onTargetChanged: {
......@@ -97,7 +97,7 @@ Section {
AnchorRow {
visible: anchorBackend.leftAnchored;
iconSource: "../HelperWidgets/images/anchor-left.png"
iconSource: "image://icons/anchor-left"
anchorMargin: backendValues.anchors_leftMargin
targetName: anchorBackend.leftTarget
onTargetChanged: {
......@@ -120,7 +120,7 @@ Section {
AnchorRow {
visible: anchorBackend.rightAnchored;
iconSource: "../HelperWidgets/images/anchor-right.png"
iconSource: "image://icons/anchor-right"
anchorMargin: backendValues.anchors_rightMargin
targetName: anchorBackend.rightTarget
onTargetChanged: {
......@@ -145,7 +145,7 @@ Section {
AnchorRow {
showAlternativeTargets: false
visible: anchorBackend.horizontalCentered;
iconSource: "../HelperWidgets/images/anchor-horizontal.png"
iconSource: "image://icons/anchor-horizontal"
anchorMargin: backendValues.anchors_horizontalCenterOffset
targetName: anchorBackend.horizontalTarget
onTargetChanged: {
......@@ -158,7 +158,7 @@ Section {
AnchorRow {
showAlternativeTargets: false
visible: anchorBackend.verticalCentered;
iconSource: "../HelperWidgets/images/anchor-vertical.png"
iconSource: "image://icons/anchor-vertical"
anchorMargin: backendValues.anchors_verticalCenterOffset
targetName: anchorBackend.verticalTarget
onTargetChanged: {
......
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