Merge pull request #16088 from zfox23/clipPTT

BUGZ-1327: Fix PTT icon when PTTing and clipping
This commit is contained in:
Zach Fox 2019-08-22 14:02:08 -07:00 committed by GitHub
commit fb95d1b2d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View file

@ -33,6 +33,7 @@ Rectangle {
readonly property string unmutedIcon: "images/mic-unmute-i.svg"
readonly property string mutedIcon: "images/mic-mute-i.svg"
readonly property string pushToTalkIcon: "images/mic-ptt-i.svg"
readonly property string pushToTalkClippingIcon: "images/mic-ptt-clip-i.svg"
readonly property string pushToTalkMutedIcon: "images/mic-ptt-mute-i.svg"
readonly property string clippingIcon: "images/mic-clip-i.svg"
readonly property string gatedIcon: "images/mic-gate-i.svg"
@ -107,7 +108,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
anchors.rightMargin: 2
width: pushToTalk ? 16 : (muted ? 20 : 16)
width: pushToTalk ? (clipping && pushingToTalk ? 4 : 16) : (muted ? 20 : 16)
height: 22
Item {
@ -115,7 +116,7 @@ Rectangle {
Image {
id: image
visible: false
source: (pushToTalk) ? pushToTalkIcon : muted ? mutedIcon :
source: pushToTalk ? (clipping && pushingToTalk ? pushToTalkClippingIcon : pushToTalkIcon) : muted ? mutedIcon :
clipping ? clippingIcon : gated ? gatedIcon : unmutedIcon
anchors.fill: parent
}
@ -170,8 +171,7 @@ Rectangle {
Image {
id: maskImage
visible: false
source: (pushToTalk) ? pushToTalkIcon : muted ? mutedIcon :
clipping ? clippingIcon : gated ? gatedIcon : unmutedIcon
source: image.source
anchors.top: parent.top
anchors.left: parent.left
width: parent.width

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.6, 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 3.3 19.6" style="enable-background:new 0 0 3.3 19.6;" xml:space="preserve">
<path d="M1.6,16.3C0.7,16.3,0,17.1,0,18c0,0.9,0.7,1.6,1.6,1.6c0.9,0,1.6-0.7,1.6-1.6C3.3,17.1,2.5,16.3,1.6,16.3z M1.5,14.6
c0.5,0,0.9-0.1,1.2-0.4c0.3-0.3,0.5-0.8,0.5-1.2V9.8v-5V1.7c0-0.9-0.6-1.6-1.5-1.7C1.3,0,0.9,0.1,0.5,0.4C0.2,0.7,0,1.2,0,1.6v3.1v5
v3.1C0,13.8,0.6,14.5,1.5,14.6z"/>
</svg>

After

Width:  |  Height:  |  Size: 652 B