mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 01:04:06 +02:00
Add shortcut keys to HMD menu
This commit is contained in:
parent
ecf67282d5
commit
9da64e540d
2 changed files with 13 additions and 2 deletions
|
@ -81,15 +81,25 @@ Item {
|
|||
}
|
||||
|
||||
Item {
|
||||
// Space for shortcut key or disclosure icon.
|
||||
id: tail
|
||||
width: 48
|
||||
width: 48 + (shortcut.visible ? shortcut.width : 0)
|
||||
anchors {
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
rightMargin: hifi.dimensions.menuPadding.x
|
||||
}
|
||||
|
||||
RalewayLight {
|
||||
id: shortcut
|
||||
text: source.shortcut ? source.shortcut : ""
|
||||
size: hifi.fontSizes.shortcutText
|
||||
color: hifi.colors.baseGrayShadow
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 15
|
||||
visible: source.visible && text != ""
|
||||
}
|
||||
|
||||
HiFiGlyphs {
|
||||
text: hifi.glyphs.disclosureExpand
|
||||
color: source.enabled ? hifi.colors.baseGrayShadow : hifi.colors.baseGrayShadow25
|
||||
|
|
|
@ -104,6 +104,7 @@ void updateQmlItemFromAction(QObject* target, QAction* source) {
|
|||
target->setProperty("checkable", source->isCheckable());
|
||||
target->setProperty("enabled", source->isEnabled());
|
||||
target->setProperty("text", source->text());
|
||||
target->setProperty("shortcut", source->shortcut().toString());
|
||||
target->setProperty("checked", source->isChecked());
|
||||
target->setProperty("visible", source->isVisible());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue