mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 13:49:46 +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 {
|
Item {
|
||||||
// Space for shortcut key or disclosure icon.
|
|
||||||
id: tail
|
id: tail
|
||||||
width: 48
|
width: 48 + (shortcut.visible ? shortcut.width : 0)
|
||||||
anchors {
|
anchors {
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
right: parent.right
|
right: parent.right
|
||||||
rightMargin: hifi.dimensions.menuPadding.x
|
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 {
|
HiFiGlyphs {
|
||||||
text: hifi.glyphs.disclosureExpand
|
text: hifi.glyphs.disclosureExpand
|
||||||
color: source.enabled ? hifi.colors.baseGrayShadow : hifi.colors.baseGrayShadow25
|
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("checkable", source->isCheckable());
|
||||||
target->setProperty("enabled", source->isEnabled());
|
target->setProperty("enabled", source->isEnabled());
|
||||||
target->setProperty("text", source->text());
|
target->setProperty("text", source->text());
|
||||||
|
target->setProperty("shortcut", source->shortcut().toString());
|
||||||
target->setProperty("checked", source->isChecked());
|
target->setProperty("checked", source->isChecked());
|
||||||
target->setProperty("visible", source->isVisible());
|
target->setProperty("visible", source->isVisible());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue