Now using the proper icon properties! Also removing debug.
This commit is contained in:
parent
66e3761b50
commit
f0d6a96174
4 changed files with 2 additions and 11 deletions
|
@ -42,9 +42,7 @@ Item {
|
||||||
property alias enabled: controlsAction.enabled
|
property alias enabled: controlsAction.enabled
|
||||||
property alias shortcut: controlsAction.shortcut
|
property alias shortcut: controlsAction.shortcut
|
||||||
property alias text: controlsAction.text
|
property alias text: controlsAction.text
|
||||||
property alias iconName: controlsAction.icon.name
|
property alias icon: controlsAction.icon
|
||||||
property alias iconSource: controlsAction.icon.source
|
|
||||||
property alias iconColor: controlsAction.icon.color
|
|
||||||
|
|
||||||
Native.MenuItem {
|
Native.MenuItem {
|
||||||
id: nativeAction
|
id: nativeAction
|
||||||
|
@ -65,7 +63,6 @@ Item {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
// Forwarding to MenuBar. Little hack to make Action shortcuts work properly, because otherwise, they would not trigger
|
// Forwarding to MenuBar. Little hack to make Action shortcuts work properly, because otherwise, they would not trigger
|
||||||
if(shortcut != 0) {
|
if(shortcut != 0) {
|
||||||
console.log("Adding shortcut for", text, "with shortcut", shortcut)
|
|
||||||
parent.parent.addShortcut(shortcut, root.triggered)
|
parent.parent.addShortcut(shortcut, root.triggered)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,5 @@ Item {
|
||||||
}`, root, "shortcut" + sequence);
|
}`, root, "shortcut" + sequence);
|
||||||
newShortcut.sequence = sequence
|
newShortcut.sequence = sequence
|
||||||
newShortcut.activated.connect(trigger)
|
newShortcut.activated.connect(trigger)
|
||||||
console.log("Added shortcut " + sequence)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,9 +42,7 @@ Item {
|
||||||
property bool enabled: true
|
property bool enabled: true
|
||||||
property font font: trueItem.font
|
property font font: trueItem.font
|
||||||
property string text: ""
|
property string text: ""
|
||||||
property alias iconName: controlsMenuItem.icon.name
|
property alias icon: controlsMenuItem.icon
|
||||||
property alias iconSource: controlsMenuItem.icon.source
|
|
||||||
property alias iconColor: controlsMenuItem.icon.color
|
|
||||||
|
|
||||||
Native.MenuItem {
|
Native.MenuItem {
|
||||||
id: nativeMenuItem
|
id: nativeMenuItem
|
||||||
|
|
|
@ -24,9 +24,6 @@ When switching from QtQuick.Controls 2 to MixedMenu, the following changes need
|
||||||
|QtQuick.Controls2/Qt.labs | > |eu.ad5001.MixedMenu |
|
|QtQuick.Controls2/Qt.labs | > |eu.ad5001.MixedMenu |
|
||||||
|-------------------------------------|---|--------------------------------------------------------|
|
|-------------------------------------|---|--------------------------------------------------------|
|
||||||
|`import import QtQuick.Controls 2.12`| > |`import eu.ad5001.MixedMenu 1.0` |
|
|`import import QtQuick.Controls 2.12`| > |`import eu.ad5001.MixedMenu 1.0` |
|
||||||
|`icon.name: ...` | > |`iconName: ...` |
|
|
||||||
|`icon.source: ...` | > |`iconSource: ...` |
|
|
||||||
|`icon.color: ...` | > |`iconColor: ...` |
|
|
||||||
|`menuBar: MenuBar {}` | > |`MenuBar { id: appMenu }`<br>`menuBar: appMenu.trueItem`|
|
|`menuBar: MenuBar {}` | > |`MenuBar { id: appMenu }`<br>`menuBar: appMenu.trueItem`|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue