mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 06:32:35 +02:00
8244 Rename captionColorOverride to captionColor
This commit is contained in:
parent
0306c22394
commit
c5d2f598d7
4 changed files with 17 additions and 13 deletions
|
@ -5,7 +5,9 @@ import TabletScriptingInterface 1.0
|
|||
Item {
|
||||
id: tabletButton
|
||||
|
||||
property string captionColorOverride: ""
|
||||
property color defaultCaptionColor: "#ffffff"
|
||||
property color captionColor: defaultCaptionColor
|
||||
|
||||
property var uuid;
|
||||
property string icon: "icons/tablet-icons/edit-i.svg"
|
||||
property string hoverIcon: tabletButton.icon
|
||||
|
@ -105,7 +107,7 @@ Item {
|
|||
|
||||
Text {
|
||||
id: text
|
||||
color: captionColorOverride !== "" ? captionColorOverride: "#ffffff"
|
||||
color: captionColor
|
||||
text: tabletButton.text
|
||||
font.bold: true
|
||||
font.pixelSize: 18
|
||||
|
@ -171,7 +173,7 @@ Item {
|
|||
|
||||
PropertyChanges {
|
||||
target: text
|
||||
color: captionColorOverride !== "" ? captionColorOverride: "#ffffff"
|
||||
color: captionColor
|
||||
text: tabletButton.hoverText
|
||||
}
|
||||
|
||||
|
@ -197,7 +199,7 @@ Item {
|
|||
|
||||
PropertyChanges {
|
||||
target: text
|
||||
color: captionColorOverride !== "" ? captionColorOverride: "#333333"
|
||||
color: captionColor !== defaultCaptionColor ? captionColor : "#333333"
|
||||
text: tabletButton.activeText
|
||||
}
|
||||
|
||||
|
@ -228,7 +230,7 @@ Item {
|
|||
|
||||
PropertyChanges {
|
||||
target: text
|
||||
color: captionColorOverride !== "" ? captionColorOverride: "#333333"
|
||||
color: captionColor !== defaultCaptionColor ? captionColor : "#333333"
|
||||
text: tabletButton.activeHoverText
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,9 @@ import QtQuick.Controls 1.4
|
|||
StateImage {
|
||||
id: button
|
||||
|
||||
property string captionColorOverride: ""
|
||||
property color defaultCaptionColor: "#ffffff"
|
||||
property color captionColor: defaultCaptionColor
|
||||
|
||||
property bool buttonEnabled: true
|
||||
property bool isActive: false
|
||||
property bool isEntered: false
|
||||
|
@ -98,7 +100,7 @@ StateImage {
|
|||
|
||||
Text {
|
||||
id: caption
|
||||
color: captionColorOverride !== "" ? captionColorOverride: (button.isActive ? "#000000" : "#ffffff")
|
||||
color: button.isActive ? "#000000" : captionColor
|
||||
text: button.isActive ? (button.isEntered ? button.activeHoverText : button.activeText) : (button.isEntered ? button.hoverText : button.text)
|
||||
font.bold: false
|
||||
font.pixelSize: 9
|
||||
|
|
|
@ -419,7 +419,7 @@ var toolBar = (function () {
|
|||
var createButtonIconRsrc = (hasRezPermissions ? CREATE_ENABLED_ICON : CREATE_DISABLED_ICON);
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
activeButton = tablet.addButton({
|
||||
captionColorOverride: hasRezPermissions ? "" : "#888888",
|
||||
captionColor: hasRezPermissions ? "#ffffff" : "#888888",
|
||||
icon: createButtonIconRsrc,
|
||||
activeIcon: "icons/tablet-icons/edit-a.svg",
|
||||
text: "CREATE",
|
||||
|
@ -792,7 +792,7 @@ function handleDomainChange() {
|
|||
var hasRezPermissions = (Entities.canRez() || Entities.canRezTmp() || Entities.canRezCertified() || Entities.canRezTmpCertified());
|
||||
createButton.editProperties({
|
||||
icon: (hasRezPermissions ? CREATE_ENABLED_ICON : CREATE_DISABLED_ICON),
|
||||
captionColorOverride: (hasRezPermissions ? "" : "#888888"),
|
||||
captionColor: (hasRezPermissions ? "#ffffff" : "#888888"),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
APP_ICON_INACTIVE = Script.resolvePath("./assets/shapes-i.svg"),
|
||||
APP_ICON_ACTIVE = Script.resolvePath("./assets/shapes-a.svg"),
|
||||
APP_ICON_DISABLED = Script.resolvePath("./assets/shapes-d.svg"),
|
||||
ENABLED_CAPTION_COLOR_OVERRIDE = "",
|
||||
ENABLED_CAPTION_COLOR_OVERRIDE = "#ffffff",
|
||||
DISABLED_CAPTION_COLOR_OVERRIDE = "#888888",
|
||||
START_DELAY = 2000, // ms
|
||||
|
||||
|
@ -1865,7 +1865,7 @@
|
|||
}
|
||||
button.editProperties({
|
||||
icon: hasRezPermissions ? APP_ICON_INACTIVE : APP_ICON_DISABLED,
|
||||
captionColorOverride: hasRezPermissions ? ENABLED_CAPTION_COLOR_OVERRIDE : DISABLED_CAPTION_COLOR_OVERRIDE,
|
||||
captionColor: hasRezPermissions ? ENABLED_CAPTION_COLOR_OVERRIDE : DISABLED_CAPTION_COLOR_OVERRIDE,
|
||||
isActive: isAppActive
|
||||
});
|
||||
}
|
||||
|
@ -1880,7 +1880,7 @@
|
|||
}
|
||||
button.editProperties({
|
||||
icon: hasRezPermissions ? APP_ICON_INACTIVE : APP_ICON_DISABLED,
|
||||
captionColorOverride: hasRezPermissions ? ENABLED_CAPTION_COLOR_OVERRIDE : DISABLED_CAPTION_COLOR_OVERRIDE,
|
||||
captionColor: hasRezPermissions ? ENABLED_CAPTION_COLOR_OVERRIDE : DISABLED_CAPTION_COLOR_OVERRIDE,
|
||||
isActive: isAppActive
|
||||
});
|
||||
}
|
||||
|
@ -1945,7 +1945,7 @@
|
|||
hasRezPermissions = Entities.canRez() || Entities.canRezTmp();
|
||||
button = tablet.addButton({
|
||||
icon: hasRezPermissions ? APP_ICON_INACTIVE : APP_ICON_DISABLED,
|
||||
captionColorOverride: hasRezPermissions ? ENABLED_CAPTION_COLOR_OVERRIDE : DISABLED_CAPTION_COLOR_OVERRIDE,
|
||||
captionColor: hasRezPermissions ? ENABLED_CAPTION_COLOR_OVERRIDE : DISABLED_CAPTION_COLOR_OVERRIDE,
|
||||
activeIcon: APP_ICON_ACTIVE,
|
||||
text: APP_NAME,
|
||||
isActive: isAppActive
|
||||
|
|
Loading…
Reference in a new issue