mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 05:52:38 +02:00
6819 - Create button not disabled
This commit is contained in:
parent
8474bfb550
commit
180acbc188
2 changed files with 6 additions and 2 deletions
|
@ -4,6 +4,7 @@ import QtQuick.Controls 1.4
|
|||
StateImage {
|
||||
id: button
|
||||
|
||||
property string captionColorOverride: ""
|
||||
property bool buttonEnabled: true
|
||||
property bool isActive: false
|
||||
property bool isEntered: false
|
||||
|
@ -97,7 +98,7 @@ StateImage {
|
|||
|
||||
Text {
|
||||
id: caption
|
||||
color: button.isActive ? "#000000" : "#ffffff"
|
||||
color: captionColorOverride !== "" ? captionColorOverride: (button.isActive ? "#000000" : "#ffffff")
|
||||
text: button.isActive ? (button.isEntered ? button.activeHoverText : button.activeText) : (button.isEntered ? button.hoverText : button.text)
|
||||
font.bold: false
|
||||
font.pixelSize: 9
|
||||
|
|
|
@ -405,9 +405,11 @@ var toolBar = (function () {
|
|||
}
|
||||
});
|
||||
|
||||
var createButtonIconRsrc = ((Entities.canRez() || Entities.canRezTmp()) ? CREATE_ENABLED_ICON : CREATE_DISABLED_ICON);
|
||||
var hasRezPermissions = (Entities.canRez() || Entities.canRezTmp());
|
||||
var createButtonIconRsrc = (hasRezPermissions ? CREATE_ENABLED_ICON : CREATE_DISABLED_ICON);
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
activeButton = tablet.addButton({
|
||||
captionColorOverride: hasRezPermissions ? "" : "#888888",
|
||||
icon: createButtonIconRsrc,
|
||||
activeIcon: "icons/tablet-icons/edit-a.svg",
|
||||
text: "CREATE",
|
||||
|
@ -789,6 +791,7 @@ function handleDomainChange() {
|
|||
var hasRezPermissions = (Entities.canRez() || Entities.canRezTmp());
|
||||
createButton.editProperties({
|
||||
icon: (hasRezPermissions ? CREATE_ENABLED_ICON : CREATE_DISABLED_ICON),
|
||||
captionColorOverride: (hasRezPermissions ? "" : "#888888"),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue