From 2fc603b85ec2f38e61f9a8769e4ce664903f707a Mon Sep 17 00:00:00 2001 From: RebeccaStankus Date: Thu, 15 Aug 2019 15:35:41 -0700 Subject: [PATCH] Replacing button label characters with images --- .../resources/images/clap_Icon.svg | 30 +++++++++++++ .../resources/images/emote_Icon.svg | 29 +++++++++++++ .../resources/images/happy_Icon.svg | 15 +++++++ .../resources/images/iconBackground.svg | 6 +++ .../resources/images/iconStroke.svg | 7 ++++ .../resources/images/point_Icon.svg | 12 ++++++ .../resources/images/raiseHand_Icon.svg | 18 ++++++++ .../resources/images/sad_Icon.svg | 15 +++++++ .../ui/qml/SimplifiedEmoteIndicator.qml | 42 ++++++++----------- 9 files changed, 149 insertions(+), 25 deletions(-) create mode 100644 scripts/simplifiedUI/simplifiedEmote/resources/images/clap_Icon.svg create mode 100644 scripts/simplifiedUI/simplifiedEmote/resources/images/emote_Icon.svg create mode 100644 scripts/simplifiedUI/simplifiedEmote/resources/images/happy_Icon.svg create mode 100644 scripts/simplifiedUI/simplifiedEmote/resources/images/iconBackground.svg create mode 100644 scripts/simplifiedUI/simplifiedEmote/resources/images/iconStroke.svg create mode 100644 scripts/simplifiedUI/simplifiedEmote/resources/images/point_Icon.svg create mode 100644 scripts/simplifiedUI/simplifiedEmote/resources/images/raiseHand_Icon.svg create mode 100644 scripts/simplifiedUI/simplifiedEmote/resources/images/sad_Icon.svg diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/images/clap_Icon.svg b/scripts/simplifiedUI/simplifiedEmote/resources/images/clap_Icon.svg new file mode 100644 index 0000000000..07e2e51d98 --- /dev/null +++ b/scripts/simplifiedUI/simplifiedEmote/resources/images/clap_Icon.svg @@ -0,0 +1,30 @@ + + + + + diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/images/emote_Icon.svg b/scripts/simplifiedUI/simplifiedEmote/resources/images/emote_Icon.svg new file mode 100644 index 0000000000..6088a0380c --- /dev/null +++ b/scripts/simplifiedUI/simplifiedEmote/resources/images/emote_Icon.svg @@ -0,0 +1,29 @@ + + + + + diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/images/happy_Icon.svg b/scripts/simplifiedUI/simplifiedEmote/resources/images/happy_Icon.svg new file mode 100644 index 0000000000..43f3395af7 --- /dev/null +++ b/scripts/simplifiedUI/simplifiedEmote/resources/images/happy_Icon.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/images/iconBackground.svg b/scripts/simplifiedUI/simplifiedEmote/resources/images/iconBackground.svg new file mode 100644 index 0000000000..390694fa3e --- /dev/null +++ b/scripts/simplifiedUI/simplifiedEmote/resources/images/iconBackground.svg @@ -0,0 +1,6 @@ + + + + + diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/images/iconStroke.svg b/scripts/simplifiedUI/simplifiedEmote/resources/images/iconStroke.svg new file mode 100644 index 0000000000..1e4cbd025f --- /dev/null +++ b/scripts/simplifiedUI/simplifiedEmote/resources/images/iconStroke.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/images/point_Icon.svg b/scripts/simplifiedUI/simplifiedEmote/resources/images/point_Icon.svg new file mode 100644 index 0000000000..532048553a --- /dev/null +++ b/scripts/simplifiedUI/simplifiedEmote/resources/images/point_Icon.svg @@ -0,0 +1,12 @@ + + + + + diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/images/raiseHand_Icon.svg b/scripts/simplifiedUI/simplifiedEmote/resources/images/raiseHand_Icon.svg new file mode 100644 index 0000000000..4ae4540067 --- /dev/null +++ b/scripts/simplifiedUI/simplifiedEmote/resources/images/raiseHand_Icon.svg @@ -0,0 +1,18 @@ + + + + + diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/images/sad_Icon.svg b/scripts/simplifiedUI/simplifiedEmote/resources/images/sad_Icon.svg new file mode 100644 index 0000000000..f3fd63aaf0 --- /dev/null +++ b/scripts/simplifiedUI/simplifiedEmote/resources/images/sad_Icon.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/scripts/simplifiedUI/simplifiedEmote/ui/qml/SimplifiedEmoteIndicator.qml b/scripts/simplifiedUI/simplifiedEmote/ui/qml/SimplifiedEmoteIndicator.qml index f20ab5df2a..b07e0cfafa 100644 --- a/scripts/simplifiedUI/simplifiedEmote/ui/qml/SimplifiedEmoteIndicator.qml +++ b/scripts/simplifiedUI/simplifiedEmote/ui/qml/SimplifiedEmoteIndicator.qml @@ -53,16 +53,13 @@ Rectangle { height: parent.height width: root.originalWidth - HifiStylesUit.GraphikRegular { + Image { id: emoteIndicator - text: "😊" + width: 30 + height: 30 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenterOffset: -2 - anchors.verticalCenterOffset: -2 - horizontalAlignment: Text.AlignHCenter - size: 26 - color: simplifiedUI.colors.white + source: "../../resources/images/emote_Icon.svg" } MouseArea { @@ -93,12 +90,12 @@ Rectangle { id: emoteButtonsRepeater model: ListModel { id: buttonsModel - ListElement { text: "Z"; method: "positive" } - ListElement { text: "C"; method: "negative" } - ListElement { text: "V"; method: "raiseHand" } - ListElement { text: "B"; method: "applaud" } - ListElement { text: "N"; method: "point" } - ListElement { text: "😊"; method: "toggleEmojiApp" } + ListElement { imageURL: "../../resources/images/happy_Icon.svg"; method: "positive" } + ListElement { imageURL: "../../resources/images/sad_Icon.svg"; method: "negative" } + ListElement { imageURL: "../../resources/images/raiseHand_Icon.svg"; method: "raiseHand" } + ListElement { imageURL: "../../resources/images/clap_Icon.svg"; method: "applaud" } + ListElement { imageURL: "../../resources/images/point_Icon.svg"; method: "point" } + ListElement { imageURL: "../../resources/images/emote_Icon.svg"; method: "toggleEmojiApp" } } Rectangle { @@ -107,21 +104,16 @@ Rectangle { // For the below to work, the This Rectangle's second child must be the `MouseArea` color: children[1].containsMouse ? "#CCCCCC" : simplifiedUI.colors.white - HifiStylesUit.GraphikRegular { - text: model.text - // Gotta special-case the below for the emoji button, or else it looks off-center. - anchors.fill: text === "😊" ? undefined : parent - anchors.horizontalCenter: text === "😊" ? parent.horizontalCenter : undefined - anchors.verticalCenter: text === "😊" ? parent.verticalCenter : undefined - anchors.horizontalCenterOffset: text === "😊" ? -2 : undefined - anchors.verticalCenterOffset: text === "😊" ? -2 : undefined - horizontalAlignment: Text.AlignHCenter - size: 26 - color: simplifiedUI.colors.text.black + Image { + width: 30 + height: 30 + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + source: model.imageURL } MouseArea { - anchors.fill: parent + anchors.margins: 3 hoverEnabled: true onClicked: { Tablet.playSound(TabletEnums.ButtonClick);