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 shortcut: controlsAction.shortcut
|
||||
property alias text: controlsAction.text
|
||||
property alias iconName: controlsAction.icon.name
|
||||
property alias iconSource: controlsAction.icon.source
|
||||
property alias iconColor: controlsAction.icon.color
|
||||
property alias icon: controlsAction.icon
|
||||
|
||||
Native.MenuItem {
|
||||
id: nativeAction
|
||||
|
@ -65,7 +63,6 @@ Item {
|
|||
Component.onCompleted: {
|
||||
// Forwarding to MenuBar. Little hack to make Action shortcuts work properly, because otherwise, they would not trigger
|
||||
if(shortcut != 0) {
|
||||
console.log("Adding shortcut for", text, "with shortcut", shortcut)
|
||||
parent.parent.addShortcut(shortcut, root.triggered)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,6 +95,5 @@ Item {
|
|||
}`, root, "shortcut" + sequence);
|
||||
newShortcut.sequence = sequence
|
||||
newShortcut.activated.connect(trigger)
|
||||
console.log("Added shortcut " + sequence)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,9 +42,7 @@ Item {
|
|||
property bool enabled: true
|
||||
property font font: trueItem.font
|
||||
property string text: ""
|
||||
property alias iconName: controlsMenuItem.icon.name
|
||||
property alias iconSource: controlsMenuItem.icon.source
|
||||
property alias iconColor: controlsMenuItem.icon.color
|
||||
property alias icon: controlsMenuItem.icon
|
||||
|
||||
Native.MenuItem {
|
||||
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 |
|
||||
|-------------------------------------|---|--------------------------------------------------------|
|
||||
|`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`|
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue