mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 10:12:52 +02:00
note: the idea is to make imports like 'import controlsUit 1.0' to work with 'styles-uit'/'controls-uit' it is not possible because of two reasons: 1. import controls-uit 1.0 is invalid syntax 2. qmldir inside controls-uit is 'module controlsUit'
34 lines
700 B
QML
34 lines
700 B
QML
import QtQuick 2.3
|
|
import QtQuick.Controls 2.2 as Original
|
|
|
|
import "."
|
|
import "../styles"
|
|
|
|
Original.Button {
|
|
id: control
|
|
|
|
HifiConstants { id: hifi }
|
|
property Action action: null
|
|
|
|
onActionChanged: {
|
|
if (action !== null && action.text !== "") {
|
|
control.text = action.text
|
|
}
|
|
}
|
|
|
|
padding {
|
|
top: 8
|
|
left: 12
|
|
right: 12
|
|
bottom: 8
|
|
}
|
|
background: Border {
|
|
anchors.fill: parent
|
|
}
|
|
contentItem: Text {
|
|
verticalAlignment: Text.AlignVCenter
|
|
horizontalAlignment: Text.AlignHCenter
|
|
text: control.text
|
|
color: control.enabled ? hifi.colors.text : hifi.colors.disabledText
|
|
}
|
|
}
|