Merge pull request #7224 from ctrlaltdavid/20816

Change Running Scripts reload, close, and tree buttons when pressed
This commit is contained in:
Chris Collins 2016-03-01 10:26:58 -08:00
commit 926b93b4db
2 changed files with 16 additions and 5 deletions

View file

@ -133,13 +133,14 @@ TableView {
HiFiGlyphs {
id: reloadButton
text: hifi.glyphs.reloadSmall
color: parent.color
color: reloadButtonArea.pressed ? hifi.colors.white : parent.color
anchors {
top: parent.top
right: stopButton.left
verticalCenter: parent.verticalCenter
}
MouseArea {
id: reloadButtonArea
anchors { fill: parent; margins: -2 }
onClicked: reloadScript(model.url)
}
@ -149,13 +150,14 @@ TableView {
HiFiGlyphs {
id: stopButton
text: hifi.glyphs.closeSmall
color: parent.color
color: stopButtonArea.pressed ? hifi.colors.white : parent.color
anchors {
top: parent.top
right: parent.right
verticalCenter: parent.verticalCenter
}
MouseArea {
id: stopButtonArea
anchors { fill: parent; margins: -2 }
onClicked: stopScript(model.url)
}

View file

@ -56,14 +56,23 @@ TreeView {
branchDelegate: HiFiGlyphs {
text: styleData.isExpanded ? hifi.glyphs.disclosureCollapse : hifi.glyphs.disclosureExpand
size: hifi.fontSizes.tableText * 2.5 // tableText is in points; proportionately scale to pixels
size: hifi.fontSizes.tableText * 2.5
color: colorScheme == hifi.colorSchemes.light
? (styleData.selected ? hifi.colors.black : hifi.colors.baseGrayHighlight)
: (styleData.selected ? hifi.colors.black : hifi.colors.lightGrayText)
? (styleData.selected
? hifi.colors.black
: (iconArea.pressed ? hifi.colors.white : hifi.colors.baseGrayHighlight))
: (styleData.selected
? hifi.colors.black
: (iconArea.pressed ? hifi.colors.white : hifi.colors.lightGrayText))
anchors {
left: parent ? parent.left : undefined
leftMargin: hifi.dimensions.tablePadding / 2
}
MouseArea {
id: iconArea
anchors.fill: parent
propagateComposedEvents: true
}
}
handle: Item {