Now using the proper icon properties! Also removing debug.

This commit is contained in:
Adsooi 2021-07-23 00:37:42 +02:00
parent 66e3761b50
commit f0d6a96174
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
4 changed files with 2 additions and 11 deletions

View file

@ -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)
}
}

View file

@ -95,6 +95,5 @@ Item {
}`, root, "shortcut" + sequence);
newShortcut.sequence = sequence
newShortcut.activated.connect(trigger)
console.log("Added shortcut " + sequence)
}
}

View file

@ -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

View file

@ -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`|