switch to using glyph button

This commit is contained in:
David Kelly 2017-02-27 12:44:23 -07:00
parent baa7f81d79
commit e7c8085bc8
7 changed files with 20 additions and 107 deletions

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 318.9 318.9" style="enable-background:new 0 0 318.9 318.9;" xml:space="preserve">
<path d="M144.6,79.6c0-11.8-5.4-20.1-16-24.1c-7.7-2.9-18.9-2.5-27.5,7C90.3,74.3,79,86.6,67.2,99c-1,1.1-3,1.9-4.7,2
c-3.7,0.2-7.4,0.2-11,0.1c-2.8,0-5.5,0-8.3,0c-14.5,0.3-25.9,10.8-26,23.8c-0.2,27.9-0.2,41.1,0,70.6c0.1,11.1,9.8,21.8,20.8,22.8
c4.8,0.4,9.7,0.5,14.4,0.6c3.4,0.1,6.9,0.1,10.3,0.3c1.6,0.1,3.4,0.9,4.4,1.9c10.4,11,22.3,23.6,33.5,36.2c5.3,6,12.2,9.1,19.4,9.1
c2.9,0,5.6-0.5,8.6-1.6c10.4-3.7,15.8-12.5,15.8-24.7c0-21.7,0-39.1,0-58.5v-42.9c0-19.6,0-59.2,0-59.2 M118.4,82.6v155.1l-1.5-1.6
c-2.4-2.5-4.5-4.9-6.7-7.2l-8.3-9c-7.6-8.3-15.3-16.6-23-24.8c-1.4-1.5-3.8-2.2-5.5-2.2c-4.3-0.1-8.7-0.1-13.1-0.1
c-2.3,0-4.3,0-6.5,0l-9.5,0v-65.2h2.4c2.4,0,4.8-0.1,7.2-0.1c6,0,12.2,0.1,18.2,0.1c0.1,0,0.3,0,0.4,0c3,0,5.3-1,7.6-3.6
c9.9-10.9,19.9-21.6,30.2-32.7L118.4,82.6z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 318.9 318.9" style="enable-background:new 0 0 318.9 318.9;" xml:space="preserve">
<path d="M144.6,79.6c0-11.8-5.4-20.1-16-24.1c-7.7-2.9-18.9-2.5-27.5,7C90.3,74.3,79,86.6,67.2,99c-1,1.1-3,1.9-4.7,2
c-3.7,0.2-7.4,0.2-11,0.1c-2.8,0-5.5,0-8.3,0c-14.5,0.3-25.9,10.8-26,23.8c-0.2,27.9-0.2,41.1,0,70.6c0.1,11.1,9.8,21.8,20.8,22.8
c4.8,0.4,9.7,0.5,14.4,0.6c3.4,0.1,6.9,0.1,10.3,0.3c1.6,0.1,3.4,0.9,4.4,1.9c10.4,11,22.3,23.6,33.5,36.2c5.3,6,12.2,9.1,19.4,9.1
c2.9,0,5.6-0.5,8.6-1.6c10.4-3.7,15.8-12.5,15.8-24.7c0-21.7,0-39.1,0-58.5v-42.9c0-19.6,0-59.2,0-59.2 M118.4,82.6v155.1l-1.5-1.6
c-2.4-2.5-4.5-4.9-6.7-7.2l-8.3-9c-7.6-8.3-15.3-16.6-23-24.8c-1.4-1.5-3.8-2.2-5.5-2.2c-4.3-0.1-8.7-0.1-13.1-0.1
c-2.3,0-4.3,0-6.5,0l-9.5,0v-65.2h2.4c2.4,0,4.8-0.1,7.2-0.1c6,0,12.2,0.1,18.2,0.1c0.1,0,0.3,0,0.4,0c3,0,5.3-1,7.6-3.6
c9.9-10.9,19.9-21.6,30.2-32.7L118.4,82.6z"/>
<ellipse cx="140.3" cy="159.4" rx="21.4" ry="36"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 318.9 318.9" style="enable-background:new 0 0 318.9 318.9;" xml:space="preserve">
<path d="M184.3,160.7c-1,8.1-1.6,16.4-3.1,24.4c-1.5,7.6-3.9,15.1-6.1,22.5c-1.7,5.8-0.7,10.7,3.2,13.8c7,5.5,16,2.8,19.2-5.9
c8.4-23.1,11.7-46.9,9.1-71.5c-1.5-13.5-4.6-26.7-9.6-39.3c-3-7.5-11.2-10-17.9-5.5c-4.8,3.2-6.2,8.2-3.9,14.5
C180.6,128.9,183.7,144.5,184.3,160.7"/>
<path d="M144.6,79.6c0-11.8-5.4-20.1-16-24.1c-7.7-2.9-18.9-2.5-27.5,7C90.3,74.3,79,86.6,67.2,99c-1,1.1-3,1.9-4.7,2
c-3.7,0.2-7.4,0.2-11,0.1c-2.8,0-5.5,0-8.3,0c-14.5,0.3-25.9,10.8-26,23.8c-0.2,27.9-0.2,41.1,0,70.6c0.1,11.1,9.8,21.8,20.8,22.8
c4.8,0.4,9.7,0.5,14.4,0.6c3.4,0.1,6.9,0.1,10.3,0.3c1.6,0.1,3.4,0.9,4.4,1.9c10.4,11,22.3,23.6,33.5,36.2c5.3,6,12.2,9.1,19.4,9.1
c2.9,0,5.6-0.5,8.6-1.6c10.4-3.7,15.8-12.5,15.8-24.7c0-21.7,0-39.1,0-58.5v-42.9c0-19.6,0-59.2,0-59.2 M118.4,82.6v155.1l-1.5-1.6
c-2.4-2.5-4.5-4.9-6.7-7.2l-8.3-9c-7.6-8.3-15.3-16.6-23-24.8c-1.4-1.5-3.8-2.2-5.5-2.2c-4.3-0.1-8.7-0.1-13.1-0.1
c-2.3,0-4.3,0-6.5,0l-9.5,0v-65.2h2.4c2.4,0,4.8-0.1,7.2-0.1c6,0,12.2,0.1,18.2,0.1c0.1,0,0.3,0,0.4,0c3,0,5.3-1,7.6-3.6
c9.9-10.9,19.9-21.6,30.2-32.7L118.4,82.6z"/>
<ellipse cx="140.3" cy="159.4" rx="21.4" ry="36"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 318.9 318.9" style="enable-background:new 0 0 318.9 318.9;" xml:space="preserve">
<path d="M184.3,160.7c-1,8.1-1.6,16.4-3.1,24.4c-1.5,7.6-3.9,15.1-6.1,22.5c-1.7,5.8-0.7,10.7,3.2,13.8c7,5.5,16,2.8,19.2-5.9
c8.4-23.1,11.7-46.9,9.1-71.5c-1.5-13.5-4.6-26.7-9.6-39.3c-3-7.5-11.2-10-17.9-5.5c-4.8,3.2-6.2,8.2-3.9,14.5
C180.6,128.9,183.7,144.5,184.3,160.7"/>
<path d="M144.6,79.6c0-11.8-5.4-20.1-16-24.1c-7.7-2.9-18.9-2.5-27.5,7C90.3,74.3,79,86.6,67.2,99c-1,1.1-3,1.9-4.7,2
c-3.7,0.2-7.4,0.2-11,0.1c-2.8,0-5.5,0-8.3,0c-14.5,0.3-25.9,10.8-26,23.8c-0.2,27.9-0.2,41.1,0,70.6c0.1,11.1,9.8,21.8,20.8,22.8
c4.8,0.4,9.7,0.5,14.4,0.6c3.4,0.1,6.9,0.1,10.3,0.3c1.6,0.1,3.4,0.9,4.4,1.9c10.4,11,22.3,23.6,33.5,36.2c5.3,6,12.2,9.1,19.4,9.1
c2.9,0,5.6-0.5,8.6-1.6c10.4-3.7,15.8-12.5,15.8-24.7c0-21.7,0-39.1,0-58.5v-42.9c0-19.6,0-59.2,0-59.2 M118.4,82.6v155.1l-1.5-1.6
c-2.4-2.5-4.5-4.9-6.7-7.2l-8.3-9c-7.6-8.3-15.3-16.6-23-24.8c-1.4-1.5-3.8-2.2-5.5-2.2c-4.3-0.1-8.7-0.1-13.1-0.1
c-2.3,0-4.3,0-6.5,0l-9.5,0v-65.2h2.4c2.4,0,4.8-0.1,7.2-0.1c6,0,12.2,0.1,18.2,0.1c0.1,0,0.3,0,0.4,0c3,0,5.3-1,7.6-3.6
c9.9-10.9,19.9-21.6,30.2-32.7L118.4,82.6z"/>
<path d="M256.4,160.4c-0.3-3.2-0.6-6.4-0.9-9.6c-0.6-7.2-1.3-14.6-2.3-21.9c-2.3-15.7-6.9-31.6-13.7-47.5c-1.6-3.8-4.8-6.5-8.6-7.5
c-4-1-8.2-0.1-11.6,2.6c-5,4-6.2,9.5-3.4,16.3c8.6,21.3,13,42,13.5,63.4c0.6,24.5-4,48.9-13.7,72.4c-1.6,4-1.8,7.9-0.4,11.2
c1.3,3.1,3.8,5.4,7.4,6.8c1.7,0.7,3.4,1,5,1c5.3,0,9.9-3.4,12.4-9.4c10.2-24.7,15.6-50.8,16.2-77.7L256.4,160.4z"/>
<ellipse cx="140.3" cy="159.4" rx="21.4" ry="36"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 318.9 318.9" style="enable-background:new 0 0 318.9 318.9;" xml:space="preserve">
<path d="M184.3,160.7c-1,8.1-1.6,16.4-3.1,24.4c-1.5,7.6-3.9,15.1-6.1,22.5c-1.7,5.8-0.7,10.7,3.2,13.8c7,5.5,16,2.8,19.2-5.9
c8.4-23.1,11.7-46.9,9.1-71.5c-1.5-13.5-4.6-26.7-9.6-39.3c-3-7.5-11.2-10-17.9-5.5c-4.8,3.2-6.2,8.2-3.9,14.5
C180.6,128.9,183.7,144.5,184.3,160.7"/>
<path d="M144.6,79.6c0-11.8-5.4-20.1-16-24.1c-7.7-2.9-18.9-2.5-27.5,7C90.3,74.3,79,86.6,67.2,99c-1,1.1-3,1.9-4.7,2
c-3.7,0.2-7.4,0.2-11,0.1c-2.8,0-5.5,0-8.3,0c-14.5,0.3-25.9,10.8-26,23.8c-0.2,27.9-0.2,41.1,0,70.6c0.1,11.1,9.8,21.8,20.8,22.8
c4.8,0.4,9.7,0.5,14.4,0.6c3.4,0.1,6.9,0.1,10.3,0.3c1.6,0.1,3.4,0.9,4.4,1.9c10.4,11,22.3,23.6,33.5,36.2c5.3,6,12.2,9.1,19.4,9.1
c2.9,0,5.6-0.5,8.6-1.6c10.4-3.7,15.8-12.5,15.8-24.7c0-21.7,0-39.1,0-58.5v-42.9c0-19.6,0-59.2,0-59.2 M118.4,82.6v155.1l-1.5-1.6
c-2.4-2.5-4.5-4.9-6.7-7.2l-8.3-9c-7.6-8.3-15.3-16.6-23-24.8c-1.4-1.5-3.8-2.2-5.5-2.2c-4.3-0.1-8.7-0.1-13.1-0.1
c-2.3,0-4.3,0-6.5,0l-9.5,0v-65.2h2.4c2.4,0,4.8-0.1,7.2-0.1c6,0,12.2,0.1,18.2,0.1c0.1,0,0.3,0,0.4,0c3,0,5.3-1,7.6-3.6
c9.9-10.9,19.9-21.6,30.2-32.7L118.4,82.6z"/>
<path d="M256.4,160.4c-0.3-3.2-0.6-6.4-0.9-9.6c-0.6-7.2-1.3-14.6-2.3-21.9c-2.3-15.7-6.9-31.6-13.7-47.5c-1.6-3.8-4.8-6.5-8.6-7.5
c-4-1-8.2-0.1-11.6,2.6c-5,4-6.2,9.5-3.4,16.3c8.6,21.3,13,42,13.5,63.4c0.6,24.5-4,48.9-13.7,72.4c-1.6,4-1.8,7.9-0.4,11.2
c1.3,3.1,3.8,5.4,7.4,6.8c1.7,0.7,3.4,1,5,1c5.3,0,9.9-3.4,12.4-9.4c10.2-24.7,15.6-50.8,16.2-77.7L256.4,160.4z"/>
<ellipse cx="140.3" cy="159.4" rx="21.4" ry="36"/>
<path d="M267,275.2c-2.1,0-4.2-0.5-6.2-1.6c-6-3.4-8.1-11.1-4.7-17.1c27.9-48.8,37.8-129.7-2.9-200.3c-3.4-6-1.4-13.6,4.6-17.1
c6-3.4,13.6-1.4,17.1,4.6c45.6,79.2,34.3,170.2,2.9,225.2C275.5,272.9,271.3,275.2,267,275.2z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2 KiB

View file

@ -214,13 +214,6 @@ Rectangle {
movable: false
resizable: false
}
//TableViewColumn {
// role: "personalMute"
// title: "MUTE"
// width: actionButtonWidth
// movable: false
// resizable: false
//}
TableViewColumn {
role: "ignore"
title: "IGNORE"
@ -283,12 +276,19 @@ Rectangle {
// Anchors
anchors.left: parent.left
}
HifiControls.Button {
HifiControls.GlyphButton {
function getGlyph() {
var fileName = "vol_";
if (model["personalMute"]) {
fileName += "x_";
}
fileName += (4.0*(model ? model.avgAudioLevel : 0.0)).toFixed(0);
return hifi.glyphs[fileName];
}
id: avgAudioVolume
visible: isAvgAudio
glyph: getGlyph()
width: 32
height: 32
iconSource: getImage()
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
onClicked: {
@ -298,22 +298,6 @@ Rectangle {
Users["personalMute"](model.sessionId, newValue)
UserActivityLogger["palAction"](newValue ? "personalMute" : "un-personalMute", model.sessionId)
}
HiFiGlyphs {
function getGlyph() {
var fileName = "vol-";
if (model["personalMute"]) {
fileName += "x-";
}
fileName += (4.0*(model ? model.avgAudioLevel : 0.0)).toFixed(0);
return hifi.glyphs[fileName];
}
text: getGlyph()
size: parent.height*1.3
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
color: enabled ? hifi.buttons.textColor[actionButton.color]
: hifi.buttons.disabledTextColor[actionButton.colorScheme]
}
}
// This CheckBox belongs in the columns that contain the stateful action buttons ("Mute" & "Ignore" for now)
// KNOWN BUG with the Checkboxes: When clicking in the center of the sorting header, the checkbox

View file

@ -318,5 +318,15 @@ Item {
readonly property string deg: "\\"
readonly property string px: "|"
readonly property string editPencil: "\ue00d"
readonly property string vol_0: "\ue00e"
readonly property string vol_1: "\ue00f"
readonly property string vol_2: "\ue010"
readonly property string vol_3: "\ue011"
readonly property string vol_4: "\ue012"
readonly property string vol_x_0: "\ue013"
readonly property string vol_x_1: "\ue014"
readonly property string vol_x_2: "\ue015"
readonly property string vol_x_3: "\ue016"
readonly property string vol_x_4: "\ue017"
}
}