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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user