QmlDesigner: Adding tool tips for anchoring

Task-number: QTCREATORBUG-13503
Change-Id: I2c65e47797ba77d3cc2e5b2c6723b1c010982d8f
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Thomas Hartmann
2016-06-21 18:15:58 +02:00
parent add3828389
commit 8eeb657e75
2 changed files with 10 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ ButtonRow {
ButtonRowButton { ButtonRowButton {
iconSource: "images/anchor-top.png" iconSource: "images/anchor-top.png"
tooltip: qsTr("Anchor item to the top.")
property bool topAnchored: anchorBackend.topAnchored property bool topAnchored: anchorBackend.topAnchored
onTopAnchoredChanged: { onTopAnchoredChanged: {
@@ -53,6 +54,7 @@ ButtonRow {
ButtonRowButton { ButtonRowButton {
iconSource: "images/anchor-bottom.png" iconSource: "images/anchor-bottom.png"
tooltip: qsTr("Anchor item to the bottom.")
property bool bottomAnchored: anchorBackend.bottomAnchored property bool bottomAnchored: anchorBackend.bottomAnchored
onBottomAnchoredChanged: { onBottomAnchoredChanged: {
@@ -73,6 +75,7 @@ ButtonRow {
ButtonRowButton { ButtonRowButton {
iconSource: "images/anchor-left.png" iconSource: "images/anchor-left.png"
tooltip: qsTr("Anchor item to the left.")
property bool leftAnchored: anchorBackend.leftAnchored property bool leftAnchored: anchorBackend.leftAnchored
onLeftAnchoredChanged: { onLeftAnchoredChanged: {
@@ -92,6 +95,7 @@ ButtonRow {
ButtonRowButton { ButtonRowButton {
iconSource: "images/anchor-right.png" iconSource: "images/anchor-right.png"
tooltip: qsTr("Anchor item to the right.")
property bool rightAnchored: anchorBackend.rightAnchored property bool rightAnchored: anchorBackend.rightAnchored
onRightAnchoredChanged: { onRightAnchoredChanged: {
@@ -116,6 +120,7 @@ ButtonRow {
ButtonRowButton { ButtonRowButton {
iconSource: "images/anchor-fill.png" iconSource: "images/anchor-fill.png"
tooltip: qsTr("Fill parent item.")
property bool isFilled: anchorBackend.isFilled property bool isFilled: anchorBackend.isFilled
onIsFilledChanged: { onIsFilledChanged: {
@@ -137,6 +142,7 @@ ButtonRow {
ButtonRowButton { ButtonRowButton {
iconSource: "images/anchor-vertical.png" iconSource: "images/anchor-vertical.png"
tooltip: qsTr("Anchor item vertically.")
property bool verticalCentered: anchorBackend.verticalCentered; property bool verticalCentered: anchorBackend.verticalCentered;
onVerticalCenteredChanged: { onVerticalCenteredChanged: {
@@ -158,6 +164,7 @@ ButtonRow {
ButtonRowButton { ButtonRowButton {
iconSource: "images/anchor-horizontal.png" iconSource: "images/anchor-horizontal.png"
tooltip: qsTr("Anchor item horizontally.")
property bool horizontalCentered: anchorBackend.horizontalCentered; property bool horizontalCentered: anchorBackend.horizontalCentered;
onHorizontalCenteredChanged: { onHorizontalCenteredChanged: {

View File

@@ -126,6 +126,7 @@ RowLayout {
exclusive: true exclusive: true
ButtonRowButton { ButtonRowButton {
iconSource: verticalAnchor ? "../HelperWidgets/images/anchor-top.png" : "../HelperWidgets/images/anchor-left.png" iconSource: verticalAnchor ? "../HelperWidgets/images/anchor-top.png" : "../HelperWidgets/images/anchor-left.png"
tooltip: verticalAnchor ? qsTr("Anchor to the top of the target.") : qsTr("Anchor to the left of the target.")
onClicked: { onClicked: {
if (!invertRelativeTargets) if (!invertRelativeTargets)
sameEdgeButtonClicked(); sameEdgeButtonClicked();
@@ -136,12 +137,14 @@ RowLayout {
ButtonRowButton { ButtonRowButton {
iconSource: verticalAnchor ? "../HelperWidgets/images/anchor-vertical.png" : "../HelperWidgets/images/anchor-horizontal.png" iconSource: verticalAnchor ? "../HelperWidgets/images/anchor-vertical.png" : "../HelperWidgets/images/anchor-horizontal.png"
tooltip: verticalAnchor ? qsTr("Anchor to the vertical center of the target.") : qsTr("Anchor to the horizontal center of the target.")
onClicked: centerButtonClicked(); onClicked: centerButtonClicked();
} }
ButtonRowButton { ButtonRowButton {
iconSource: verticalAnchor ? "../HelperWidgets/images/anchor-bottom.png" : "../HelperWidgets/images/anchor-right.png" iconSource: verticalAnchor ? "../HelperWidgets/images/anchor-bottom.png" : "../HelperWidgets/images/anchor-right.png"
tooltip: verticalAnchor ? qsTr("Anchor to the bottom of the target.") : qsTr("Anchor to the right of the target.")
onClicked: { onClicked: {
if (!invertRelativeTargets) if (!invertRelativeTargets)
oppositeEdgeButtonClicked(); oppositeEdgeButtonClicked();