Add icons for main menu buttons, ability for buttons in general

The current interface is almost exclusively in written English.
This makes usage of the program more difficult for people who can't
distinguish English words, or remember specific VR/English technical
terminology.

Adding small icons to main menu items will make it easier for the
aforementioned groups to use the application.

This also adds the ability for buttons in general to have a custom icon,
if necessary.
This commit is contained in:
Vasily
2019-11-04 18:00:06 +01:00
committed by username223
parent 1d321cf8d0
commit 43d95d0ece
14 changed files with 188 additions and 11 deletions
+10
View File
@@ -3,6 +3,10 @@ import QtQuick.Controls 2.0
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
Button {
// Overload this
// Empty string = no icon
property string iconPath: ""
property bool activationSoundEnabled: true
hoverEnabled: true
contentItem: MyText {
@@ -15,6 +19,12 @@ Button {
color: parent.down ? "#406288" : (parent.activeFocus ? "#365473" : "#2c435d")
}
Image {
source: iconPath
height: parent.height
width: height
}
onHoveredChanged: {
if (hovered) {
forceActiveFocus()