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")
|
||||
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
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: action.currentValue !== ConnectionModelStatementDelegate.Custom && !backend.hasCondition
|
||||
|
||||
@@ -133,7 +133,7 @@ Column {
|
||||
buttonIcon: qsTr("Remove Condition")
|
||||
tooltip: qsTr("Removes the logical condition for the <b>Target</b> component.")
|
||||
iconSize: StudioTheme.Values.baseFontSize
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: action.currentValue !== ConnectionModelStatementDelegate.Custom && backend.hasCondition
|
||||
|
||||
@@ -184,7 +184,7 @@ Column {
|
||||
buttonIcon: qsTr("Add Else Statement")
|
||||
tooltip: qsTr("Sets an alternate condition for the previously defined logical condition.")
|
||||
iconSize: StudioTheme.Values.baseFontSize
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: action.currentValue !== ConnectionModelStatementDelegate.Custom
|
||||
&& backend.hasCondition && !backend.hasElse
|
||||
@@ -198,7 +198,7 @@ Column {
|
||||
buttonIcon: qsTr("Remove Else Statement")
|
||||
tooltip: qsTr("Removes the alternate logical condition for the previously defined logical condition.")
|
||||
iconSize: StudioTheme.Values.baseFontSize
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: action.currentValue !== ConnectionModelStatementDelegate.Custom
|
||||
&& backend.hasCondition && backend.hasElse
|
||||
|
@@ -321,7 +321,7 @@ Item {
|
||||
visible: true
|
||||
buttonIcon: qsTr("Cancel")
|
||||
iconSize: DialogValues.defaultPixelSize
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
|
||||
onClicked: {
|
||||
BackendApi.reject();
|
||||
@@ -337,7 +337,7 @@ Item {
|
||||
buttonIcon: qsTr("Create")
|
||||
iconSize: DialogValues.defaultPixelSize
|
||||
enabled: BackendApi.fieldsValid
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
|
||||
onClicked: {
|
||||
BackendApi.accept();
|
||||
|
@@ -121,7 +121,7 @@ Item {
|
||||
iconSize: 20
|
||||
visible: true
|
||||
buttonIcon: "…"
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
|
||||
onClicked: {
|
||||
var newLocation = BackendApi.chooseProjectLocation()
|
||||
@@ -439,7 +439,8 @@ Item {
|
||||
id: savePresetButton
|
||||
width: StudioTheme.Values.singleControlColumnWidth
|
||||
buttonIcon: qsTr("Save Custom Preset")
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconSize: DialogValues.defaultPixelSize
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
@@ -337,7 +337,6 @@ Section {
|
||||
PropertyLabel {
|
||||
text: qsTr("Warning")
|
||||
visible: root.warningVisible
|
||||
font.weight: Font.Bold
|
||||
}
|
||||
|
||||
SecondColumnLayout {
|
||||
@@ -354,7 +353,7 @@ Section {
|
||||
Layout.fillWidth: true
|
||||
font.family: StudioTheme.Constants.font.family
|
||||
font.pixelSize: StudioTheme.Values.myFontSize
|
||||
color: StudioTheme.Values.themeTextColor
|
||||
color: StudioTheme.Values.themeAmberLight
|
||||
wrapMode: Text.WordWrap
|
||||
text: qsTr("- The selection contains the root component.")
|
||||
}
|
||||
@@ -365,7 +364,7 @@ Section {
|
||||
Layout.fillWidth: true
|
||||
font.family: StudioTheme.Constants.font.family
|
||||
font.pixelSize: StudioTheme.Values.myFontSize
|
||||
color: StudioTheme.Values.themeTextColor
|
||||
color: StudioTheme.Values.themeAmberLight
|
||||
wrapMode: Text.WordWrap
|
||||
text: qsTr("- The selection contains a non-visual component.")
|
||||
}
|
||||
@@ -376,7 +375,7 @@ Section {
|
||||
Layout.fillWidth: true
|
||||
font.family: StudioTheme.Constants.font.family
|
||||
font.pixelSize: StudioTheme.Values.myFontSize
|
||||
color: StudioTheme.Values.themeTextColor
|
||||
color: StudioTheme.Values.themeAmberLight
|
||||
wrapMode: Text.WordWrap
|
||||
text: qsTr("- A component in the selection uses anchors.")
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ Section {
|
||||
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
||||
width: StudioTheme.Values.singleControlColumnWidth
|
||||
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.")
|
||||
onClicked: {
|
||||
if (root.hasDesignerEffect) {
|
||||
@@ -535,7 +535,7 @@ Section {
|
||||
implicitWidth: StudioTheme.Values.singleControlColumnWidth
|
||||
width: StudioTheme.Values.singleControlColumnWidth
|
||||
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.")
|
||||
onClicked: {
|
||||
modelNodeBackend.createModelNode(root.effectNode,
|
||||
|
@@ -28,7 +28,7 @@ Column {
|
||||
AbstractButton {
|
||||
implicitWidth: 180
|
||||
buttonIcon: qsTr("Edit Component")
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
|
||||
onClicked: goIntoComponent()
|
||||
}
|
||||
|
@@ -246,7 +246,7 @@ Section {
|
||||
width: StudioTheme.Values.singleControlColumnWidth
|
||||
visible: !annotationEditor.hasAuxData
|
||||
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.")
|
||||
onClicked: annotationEditor.showWidget()
|
||||
onHoveredChanged: annotationEditor.checkAux()
|
||||
|
@@ -732,7 +732,7 @@ Section {
|
||||
id: acceptButton
|
||||
|
||||
buttonIcon: qsTr("Add Property")
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
width: cePopup.width / 3
|
||||
enabled: textField.acceptableInput
|
||||
|
||||
|
@@ -16,8 +16,10 @@ T.AbstractButton {
|
||||
|
||||
property alias buttonIcon: buttonIcon.text
|
||||
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 iconBold: buttonIcon.font.bold
|
||||
property alias iconRotation: buttonIcon.rotation
|
||||
@@ -58,8 +60,10 @@ T.AbstractButton {
|
||||
T.Label {
|
||||
id: buttonIcon
|
||||
color: control.style.icon.idle
|
||||
font.family: StudioTheme.Constants.iconFont.family
|
||||
font.pixelSize: control.style.baseIconFontSize
|
||||
font {
|
||||
family: control.iconFontFamily
|
||||
pixelSize: control.iconSize
|
||||
}
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
anchors.fill: parent
|
||||
|
@@ -384,17 +384,17 @@ QtObject {
|
||||
readonly property string zoomSelection: "\u0193"
|
||||
|
||||
readonly property font iconFont: Qt.font({
|
||||
"family": controlIcons.name,
|
||||
"pixelSize": 12
|
||||
})
|
||||
family: controlIcons.name,
|
||||
pixelSize: 12
|
||||
})
|
||||
|
||||
readonly property font font: Qt.font({
|
||||
"family": "Arial",
|
||||
"pointSize": Qt.application.font.pixelSize
|
||||
})
|
||||
family: Qt.application.font.family,
|
||||
pointSize: Qt.application.font.pixelSize
|
||||
})
|
||||
|
||||
readonly property font largeFont: Qt.font({
|
||||
"family": "Arial",
|
||||
"pointSize": Qt.application.font.pixelSize * 1.6
|
||||
})
|
||||
family: "Arial",
|
||||
pointSize: Qt.application.font.pixelSize * 1.6
|
||||
})
|
||||
}
|
||||
|
@@ -168,7 +168,7 @@ Item {
|
||||
height: stateBackground.controlHeight
|
||||
checkedInverted: true
|
||||
buttonIcon: qsTr("Default")
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
tooltip: qsTr("Set State as default")
|
||||
onClicked: {
|
||||
root.defaultClicked()
|
||||
|
@@ -153,7 +153,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: runProject.right
|
||||
anchors.leftMargin: 10
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
buttonIcon: qsTr("Live Preview")
|
||||
|
||||
onClicked: {
|
||||
@@ -340,7 +340,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: moreItems.left
|
||||
anchors.rightMargin: 8
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
buttonIcon: qsTr("Share")
|
||||
visible: !root.flyoutEnabled && backend.isSharingEnabled
|
||||
enabled: backend.isSharingEnabled
|
||||
@@ -466,7 +466,7 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
style: StudioTheme.Values.primaryToolbarStyle
|
||||
width: shareButton.width
|
||||
iconFont: StudioTheme.Constants.font
|
||||
iconFontFamily: StudioTheme.Constants.font.family
|
||||
buttonIcon: qsTr("Share")
|
||||
enabled: backend.isSharingEnabled
|
||||
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