forked from qt-creator/qt-creator
QmlDesigner: Remove wrong font family alias
* Remove wrong font family alias from AbstractButton and replace it with the correct one * Change the Contants font to the system/application font * Change warning color in PropertyEditor Change-Id: I1a33ced8ffc34aafa78f75100b2531845ddff5ef Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
fd4214205e
commit
80ff1f90fd
@@ -120,7 +120,7 @@ Column {
|
|||||||
buttonIcon: qsTr("Add Condition")
|
buttonIcon: qsTr("Add Condition")
|
||||||
tooltip: qsTr("Sets a logical condition for the selected <b>Signal</b>. It works with the properties of the <b>Target</b> component.")
|
tooltip: qsTr("Sets a logical condition for the selected <b>Signal</b>. It works with the properties of the <b>Target</b> component.")
|
||||||
iconSize: StudioTheme.Values.baseFontSize
|
iconSize: StudioTheme.Values.baseFontSize
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: action.currentValue !== ConnectionModelStatementDelegate.Custom && !backend.hasCondition
|
visible: action.currentValue !== ConnectionModelStatementDelegate.Custom && !backend.hasCondition
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ Column {
|
|||||||
buttonIcon: qsTr("Remove Condition")
|
buttonIcon: qsTr("Remove Condition")
|
||||||
tooltip: qsTr("Removes the logical condition for the <b>Target</b> component.")
|
tooltip: qsTr("Removes the logical condition for the <b>Target</b> component.")
|
||||||
iconSize: StudioTheme.Values.baseFontSize
|
iconSize: StudioTheme.Values.baseFontSize
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: action.currentValue !== ConnectionModelStatementDelegate.Custom && backend.hasCondition
|
visible: action.currentValue !== ConnectionModelStatementDelegate.Custom && backend.hasCondition
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ Column {
|
|||||||
buttonIcon: qsTr("Add Else Statement")
|
buttonIcon: qsTr("Add Else Statement")
|
||||||
tooltip: qsTr("Sets an alternate condition for the previously defined logical condition.")
|
tooltip: qsTr("Sets an alternate condition for the previously defined logical condition.")
|
||||||
iconSize: StudioTheme.Values.baseFontSize
|
iconSize: StudioTheme.Values.baseFontSize
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: action.currentValue !== ConnectionModelStatementDelegate.Custom
|
visible: action.currentValue !== ConnectionModelStatementDelegate.Custom
|
||||||
&& backend.hasCondition && !backend.hasElse
|
&& backend.hasCondition && !backend.hasElse
|
||||||
@@ -198,7 +198,7 @@ Column {
|
|||||||
buttonIcon: qsTr("Remove Else Statement")
|
buttonIcon: qsTr("Remove Else Statement")
|
||||||
tooltip: qsTr("Removes the alternate logical condition for the previously defined logical condition.")
|
tooltip: qsTr("Removes the alternate logical condition for the previously defined logical condition.")
|
||||||
iconSize: StudioTheme.Values.baseFontSize
|
iconSize: StudioTheme.Values.baseFontSize
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: action.currentValue !== ConnectionModelStatementDelegate.Custom
|
visible: action.currentValue !== ConnectionModelStatementDelegate.Custom
|
||||||
&& backend.hasCondition && backend.hasElse
|
&& backend.hasCondition && backend.hasElse
|
||||||
|
@@ -321,7 +321,7 @@ Item {
|
|||||||
visible: true
|
visible: true
|
||||||
buttonIcon: qsTr("Cancel")
|
buttonIcon: qsTr("Cancel")
|
||||||
iconSize: DialogValues.defaultPixelSize
|
iconSize: DialogValues.defaultPixelSize
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
BackendApi.reject();
|
BackendApi.reject();
|
||||||
@@ -337,7 +337,7 @@ Item {
|
|||||||
buttonIcon: qsTr("Create")
|
buttonIcon: qsTr("Create")
|
||||||
iconSize: DialogValues.defaultPixelSize
|
iconSize: DialogValues.defaultPixelSize
|
||||||
enabled: BackendApi.fieldsValid
|
enabled: BackendApi.fieldsValid
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
BackendApi.accept();
|
BackendApi.accept();
|
||||||
|
@@ -121,7 +121,7 @@ Item {
|
|||||||
iconSize: 20
|
iconSize: 20
|
||||||
visible: true
|
visible: true
|
||||||
buttonIcon: "…"
|
buttonIcon: "…"
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var newLocation = BackendApi.chooseProjectLocation()
|
var newLocation = BackendApi.chooseProjectLocation()
|
||||||
@@ -439,7 +439,8 @@ Item {
|
|||||||
id: savePresetButton
|
id: savePresetButton
|
||||||
width: StudioTheme.Values.singleControlColumnWidth
|
width: StudioTheme.Values.singleControlColumnWidth
|
||||||
buttonIcon: qsTr("Save Custom Preset")
|
buttonIcon: qsTr("Save Custom Preset")
|
||||||
iconFont: StudioTheme.Constants.font
|
iconSize: DialogValues.defaultPixelSize
|
||||||
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
|
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
@@ -337,7 +337,6 @@ Section {
|
|||||||
PropertyLabel {
|
PropertyLabel {
|
||||||
text: qsTr("Warning")
|
text: qsTr("Warning")
|
||||||
visible: root.warningVisible
|
visible: root.warningVisible
|
||||||
font.weight: Font.Bold
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SecondColumnLayout {
|
SecondColumnLayout {
|
||||||
@@ -354,7 +353,7 @@ Section {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
font.family: StudioTheme.Constants.font.family
|
font.family: StudioTheme.Constants.font.family
|
||||||
font.pixelSize: StudioTheme.Values.myFontSize
|
font.pixelSize: StudioTheme.Values.myFontSize
|
||||||
color: StudioTheme.Values.themeTextColor
|
color: StudioTheme.Values.themeAmberLight
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: qsTr("- The selection contains the root component.")
|
text: qsTr("- The selection contains the root component.")
|
||||||
}
|
}
|
||||||
@@ -365,7 +364,7 @@ Section {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
font.family: StudioTheme.Constants.font.family
|
font.family: StudioTheme.Constants.font.family
|
||||||
font.pixelSize: StudioTheme.Values.myFontSize
|
font.pixelSize: StudioTheme.Values.myFontSize
|
||||||
color: StudioTheme.Values.themeTextColor
|
color: StudioTheme.Values.themeAmberLight
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: qsTr("- The selection contains a non-visual component.")
|
text: qsTr("- The selection contains a non-visual component.")
|
||||||
}
|
}
|
||||||
@@ -376,7 +375,7 @@ Section {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
font.family: StudioTheme.Constants.font.family
|
font.family: StudioTheme.Constants.font.family
|
||||||
font.pixelSize: StudioTheme.Values.myFontSize
|
font.pixelSize: StudioTheme.Values.myFontSize
|
||||||
color: StudioTheme.Values.themeTextColor
|
color: StudioTheme.Values.themeAmberLight
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: qsTr("- A component in the selection uses anchors.")
|
text: qsTr("- A component in the selection uses anchors.")
|
||||||
}
|
}
|
||||||
|
@@ -62,7 +62,7 @@ Section {
|
|||||||
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
||||||
width: StudioTheme.Values.singleControlColumnWidth
|
width: StudioTheme.Values.singleControlColumnWidth
|
||||||
buttonIcon: root.hasDesignerEffect ? qsTr("Remove Effects") : qsTr("Add Effects")
|
buttonIcon: root.hasDesignerEffect ? qsTr("Remove Effects") : qsTr("Add Effects")
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
tooltip: qsTr("Adds visual effects on the component.")
|
tooltip: qsTr("Adds visual effects on the component.")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (root.hasDesignerEffect) {
|
if (root.hasDesignerEffect) {
|
||||||
@@ -535,7 +535,7 @@ Section {
|
|||||||
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
||||||
width: StudioTheme.Values.singleControlColumnWidth
|
width: StudioTheme.Values.singleControlColumnWidth
|
||||||
buttonIcon: qsTr("Add Shadow Effect")
|
buttonIcon: qsTr("Add Shadow Effect")
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
tooltip: qsTr("Adds <b>Drop Shadow</b> or <b>Inner Shadow</b> effects to a component.")
|
tooltip: qsTr("Adds <b>Drop Shadow</b> or <b>Inner Shadow</b> effects to a component.")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
modelNodeBackend.createModelNode(root.effectNode,
|
modelNodeBackend.createModelNode(root.effectNode,
|
||||||
|
@@ -28,7 +28,7 @@ Column {
|
|||||||
AbstractButton {
|
AbstractButton {
|
||||||
implicitWidth: 180
|
implicitWidth: 180
|
||||||
buttonIcon: qsTr("Edit Component")
|
buttonIcon: qsTr("Edit Component")
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
|
|
||||||
onClicked: goIntoComponent()
|
onClicked: goIntoComponent()
|
||||||
}
|
}
|
||||||
|
@@ -246,7 +246,7 @@ Section {
|
|||||||
width: StudioTheme.Values.singleControlColumnWidth
|
width: StudioTheme.Values.singleControlColumnWidth
|
||||||
visible: !annotationEditor.hasAuxData
|
visible: !annotationEditor.hasAuxData
|
||||||
buttonIcon: qsTr("Add Annotation")
|
buttonIcon: qsTr("Add Annotation")
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
tooltip: qsTr("Adds a note with a title to explain the component.")
|
tooltip: qsTr("Adds a note with a title to explain the component.")
|
||||||
onClicked: annotationEditor.showWidget()
|
onClicked: annotationEditor.showWidget()
|
||||||
onHoveredChanged: annotationEditor.checkAux()
|
onHoveredChanged: annotationEditor.checkAux()
|
||||||
|
@@ -732,7 +732,7 @@ Section {
|
|||||||
id: acceptButton
|
id: acceptButton
|
||||||
|
|
||||||
buttonIcon: qsTr("Add Property")
|
buttonIcon: qsTr("Add Property")
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
width: cePopup.width / 3
|
width: cePopup.width / 3
|
||||||
enabled: textField.acceptableInput
|
enabled: textField.acceptableInput
|
||||||
|
|
||||||
|
@@ -16,8 +16,10 @@ T.AbstractButton {
|
|||||||
|
|
||||||
property alias buttonIcon: buttonIcon.text
|
property alias buttonIcon: buttonIcon.text
|
||||||
property alias iconColor: buttonIcon.color
|
property alias iconColor: buttonIcon.color
|
||||||
property alias iconFont: buttonIcon.font.family
|
|
||||||
property alias iconSize: buttonIcon.font.pixelSize
|
property string iconFontFamily: StudioTheme.Constants.iconFont.family
|
||||||
|
property int iconSize: control.style.baseIconFontSize
|
||||||
|
|
||||||
property alias iconItalic: buttonIcon.font.italic
|
property alias iconItalic: buttonIcon.font.italic
|
||||||
property alias iconBold: buttonIcon.font.bold
|
property alias iconBold: buttonIcon.font.bold
|
||||||
property alias iconRotation: buttonIcon.rotation
|
property alias iconRotation: buttonIcon.rotation
|
||||||
@@ -58,8 +60,10 @@ T.AbstractButton {
|
|||||||
T.Label {
|
T.Label {
|
||||||
id: buttonIcon
|
id: buttonIcon
|
||||||
color: control.style.icon.idle
|
color: control.style.icon.idle
|
||||||
font.family: StudioTheme.Constants.iconFont.family
|
font {
|
||||||
font.pixelSize: control.style.baseIconFontSize
|
family: control.iconFontFamily
|
||||||
|
pixelSize: control.iconSize
|
||||||
|
}
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@@ -384,17 +384,17 @@ QtObject {
|
|||||||
readonly property string zoomSelection: "\u0193"
|
readonly property string zoomSelection: "\u0193"
|
||||||
|
|
||||||
readonly property font iconFont: Qt.font({
|
readonly property font iconFont: Qt.font({
|
||||||
"family": controlIcons.name,
|
family: controlIcons.name,
|
||||||
"pixelSize": 12
|
pixelSize: 12
|
||||||
})
|
})
|
||||||
|
|
||||||
readonly property font font: Qt.font({
|
readonly property font font: Qt.font({
|
||||||
"family": "Arial",
|
family: Qt.application.font.family,
|
||||||
"pointSize": Qt.application.font.pixelSize
|
pointSize: Qt.application.font.pixelSize
|
||||||
})
|
})
|
||||||
|
|
||||||
readonly property font largeFont: Qt.font({
|
readonly property font largeFont: Qt.font({
|
||||||
"family": "Arial",
|
family: "Arial",
|
||||||
"pointSize": Qt.application.font.pixelSize * 1.6
|
pointSize: Qt.application.font.pixelSize * 1.6
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@@ -168,7 +168,7 @@ Item {
|
|||||||
height: stateBackground.controlHeight
|
height: stateBackground.controlHeight
|
||||||
checkedInverted: true
|
checkedInverted: true
|
||||||
buttonIcon: qsTr("Default")
|
buttonIcon: qsTr("Default")
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
tooltip: qsTr("Set State as default")
|
tooltip: qsTr("Set State as default")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.defaultClicked()
|
root.defaultClicked()
|
||||||
|
@@ -153,7 +153,7 @@ Rectangle {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: runProject.right
|
anchors.left: runProject.right
|
||||||
anchors.leftMargin: 10
|
anchors.leftMargin: 10
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
buttonIcon: qsTr("Live Preview")
|
buttonIcon: qsTr("Live Preview")
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
@@ -340,7 +340,7 @@ Rectangle {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: moreItems.left
|
anchors.right: moreItems.left
|
||||||
anchors.rightMargin: 8
|
anchors.rightMargin: 8
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
buttonIcon: qsTr("Share")
|
buttonIcon: qsTr("Share")
|
||||||
visible: !root.flyoutEnabled && backend.isSharingEnabled
|
visible: !root.flyoutEnabled && backend.isSharingEnabled
|
||||||
enabled: backend.isSharingEnabled
|
enabled: backend.isSharingEnabled
|
||||||
@@ -466,7 +466,7 @@ Rectangle {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
style: StudioTheme.Values.primaryToolbarStyle
|
style: StudioTheme.Values.primaryToolbarStyle
|
||||||
width: shareButton.width
|
width: shareButton.width
|
||||||
iconFont: StudioTheme.Constants.font
|
iconFontFamily: StudioTheme.Constants.font.family
|
||||||
buttonIcon: qsTr("Share")
|
buttonIcon: qsTr("Share")
|
||||||
enabled: backend.isSharingEnabled
|
enabled: backend.isSharingEnabled
|
||||||
tooltip: shareButton.enabled ? qsTr("Share your project online.") : qsTr("Sharing your project online is disabled in the Community Version.")
|
tooltip: shareButton.enabled ? qsTr("Share your project online.") : qsTr("Sharing your project online is disabled in the Community Version.")
|
||||||
|
Reference in New Issue
Block a user