Use names for HiFi glyph characters

This commit is contained in:
David Rowe 2016-02-24 12:37:23 +13:00
parent bac703b29e
commit ad4d697f38
5 changed files with 20 additions and 6 deletions

View file

@ -132,7 +132,7 @@ TableView {
// FIXME: Put reload item in tableModel passed in from RunningScripts.
HiFiGlyphs {
id: reloadButton
text: "a"
text: hifi.glyphs.reloadSmall
color: parent.color
anchors {
top: parent.top
@ -148,7 +148,7 @@ TableView {
// FIXME: Put stop item in tableModel passed in from RunningScripts.
HiFiGlyphs {
id: stopButton
text: "C"
text: hifi.glyphs.closeSmall
color: parent.color
anchors {
top: parent.top

View file

@ -55,7 +55,7 @@ TreeView {
alternateBackgroundColor: parent.isLightColorScheme ? hifi.colors.tableRowLightOdd : hifi.colors.tableRowDarkOdd
branchDelegate: HiFiGlyphs {
text: styleData.isExpanded ? "Z" : "B"
text: styleData.isExpanded ? hifi.glyphs.disclosureCollapse : hifi.glyphs.disclosureExpand
size: hifi.fontSizes.tableText * 2.5 // tableText is in points; proportionately scale to pixels
color: colorScheme == hifi.colorSchemes.light
? (styleData.selected ? hifi.colors.black : hifi.colors.baseGrayHighlight)

View file

@ -16,6 +16,7 @@ Item {
readonly property alias colorSchemes: colorSchemes
readonly property alias dimensions: dimensions
readonly property alias fontSizes: fontSizes
readonly property alias glyphs: glyphs
readonly property alias buttons: buttons
readonly property alias effects: effects
@ -98,6 +99,19 @@ Item {
readonly property real shortcutText: dimensions.largeScreen? 13 : 9
}
Item {
id: glyphs
readonly property string close: "w"
readonly property string closeInverted: "x"
readonly property string closeSmall: "C"
readonly property string disclosureCollapse: "Z"
readonly property string disclosureExpand: "B"
readonly property string pin: "y"
readonly property string pinInverted: "z"
readonly property string reloadSmall: "a"
readonly property string resizeHandle: "A"
}
Item {
id: buttons
readonly property int white: 0

View file

@ -53,7 +53,7 @@ Frame {
HiFiGlyphs {
// "Pin" button
visible: false
text: (frame.pinned && !pinClickArea.containsMouse) || (!frame.pinned && pinClickArea.containsMouse) ? "z" : "y"
text: (frame.pinned && !pinClickArea.containsMouse) || (!frame.pinned && pinClickArea.containsMouse) ? hifi.glyphs.pinInverted : hifi.glyphs.pin
color: pinClickArea.containsMouse && !pinClickArea.pressed ? hifi.colors.redHighlight : hifi.colors.white
size: iconSize
MouseArea {
@ -68,7 +68,7 @@ Frame {
HiFiGlyphs {
// "Close" button
visible: window ? window.closable : false
text: closeClickArea.containsPress ? "x" : "w"
text: closeClickArea.containsPress ? hifi.glyphs.closeInverted : hifi.glyphs.close
color: closeClickArea.containsMouse ? hifi.colors.redHighlight : hifi.colors.white
size: iconSize
MouseArea {

View file

@ -126,7 +126,7 @@ Item {
visible: sizeDrag.enabled
x: -11 // Move a little to visually align
y: -4 // ""
text: "A"
text: hifi.glyphs.resizeHandle
size: iconSize + 10
color: sizeDrag.containsMouse || sizeDrag.pressed ? hifi.colors.white : hifi.colors.white50
}