diff --git a/ui/shared/status/StatusCategoryButton.qml b/ui/shared/status/StatusCategoryButton.qml deleted file mode 100644 index fb124ffb67..0000000000 --- a/ui/shared/status/StatusCategoryButton.qml +++ /dev/null @@ -1,57 +0,0 @@ -import QtQuick 2.13 -import QtGraphicalEffects 1.0 - -import utils 1.0 -import "../../shared/panels" - -Rectangle { - property bool active: false - property var changeCategory: function () {} - property url source: Style.svg("emojiCategories/recent") - - id: categoryButton - width: 40 - height: 40 - color: Style.current.transparent - - SVGImage { - width: 20 - height: 20 - fillMode: Image.PreserveAspectFit - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - source: categoryButton.source - - ColorOverlay { - anchors.fill: parent - source: parent - color: categoryButton.active ? Style.current.primary : Style.current.transparent - } - - Rectangle { - visible: categoryButton.active - width: parent.width - height: 2 - radius: 1 - color: Style.current.primary - anchors.bottom: parent.bottom - anchors.bottomMargin: -Style.current.smallPadding - } - } - - MouseArea { - cursorShape: Qt.PointingHandCursor - anchors.fill: parent - onClicked: function () { - categoryButton.changeCategory() - } - } -} - - - -/*##^## -Designer { - D{i:0;formeditorColor:"#ffffff";height:440;width:360} -} -##^##*/ diff --git a/ui/shared/status/StatusEmojiPopup.qml b/ui/shared/status/StatusEmojiPopup.qml index 315bb7011f..1e2785fe1d 100644 --- a/ui/shared/status/StatusEmojiPopup.qml +++ b/ui/shared/status/StatusEmojiPopup.qml @@ -3,8 +3,10 @@ import QtQuick.Controls 2.13 import QtQuick.Layouts 1.3 import QtGraphicalEffects 1.0 +import StatusQ.Controls 0.1 + import utils 1.0 -import "../../shared" + import "../../shared/panels" import "../../shared/controls" @@ -339,10 +341,10 @@ Popup { Repeater { model: EmojiJSON.emojiCategories - StatusCategoryButton { - source: Style.svg(`emojiCategories/${modelData}`) - active: index === scrollView.activeCategory - changeCategory: function () { + StatusTabBarIconButton { + icon.name: modelData + highlighted: index === scrollView.activeCategory + onClicked: { scrollView.activeCategory = index scrollView.scrollToCategory(index) } diff --git a/ui/shared/status/StatusGifPopup.qml b/ui/shared/status/StatusGifPopup.qml index e27b64e931..789357cc33 100644 --- a/ui/shared/status/StatusGifPopup.qml +++ b/ui/shared/status/StatusGifPopup.qml @@ -4,7 +4,7 @@ import QtQuick.Layouts 1.3 import QtGraphicalEffects 1.0 import StatusQ.Components 0.1 -import StatusQ.Controls 0.1 as StatusQControls +import StatusQ.Controls 0.1 import utils 1.0 @@ -115,7 +115,7 @@ Popup { } } - StatusQControls.StatusFlatRoundButton { + StatusFlatRoundButton { id: clearBtn implicitWidth: 14 implicitHeight: 14 @@ -126,7 +126,7 @@ Popup { visible: searchBox.text !== "" icon.width: 14 icon.height: 14 - type: StatusQControls.StatusFlatRoundButton.Type.Tertiary + type: StatusFlatRoundButton.Type.Tertiary color: "transparent" onClicked: toggleCategory(previousCategory) } @@ -170,26 +170,29 @@ Popup { rightPadding: Style.current.smallPadding / 2 spacing: 0 - StatusCategoryButton { - source: Style.svg("gifCategories/trending") - active: StatusGifPopup.Category.Trending === popup.currentCategory - changeCategory: function () { + + StatusTabBarIconButton { + icon.name: "flash" + highlighted: StatusGifPopup.Category.Trending === popup.currentCategory + onClicked: { toggleCategory(StatusGifPopup.Category.Trending) } enabled: appSettings.isTenorWarningAccepted } - StatusCategoryButton { - source: Style.svg("gifCategories/recent") - active: StatusGifPopup.Category.Recent === popup.currentCategory - changeCategory: function () { + + StatusTabBarIconButton { + icon.name: "time" + highlighted: StatusGifPopup.Category.Recent === popup.currentCategory + onClicked: { toggleCategory(StatusGifPopup.Category.Recent) } enabled: appSettings.isTenorWarningAccepted } - StatusCategoryButton { - source: Style.svg("gifCategories/favorite") - active: StatusGifPopup.Category.Favorite === popup.currentCategory - changeCategory: function () { + + StatusTabBarIconButton { + icon.name: "favourite" + highlighted: StatusGifPopup.Category.Favorite === popup.currentCategory + onClicked: { toggleCategory(StatusGifPopup.Category.Favorite) } enabled: appSettings.isTenorWarningAccepted @@ -249,7 +252,7 @@ Popup { color: Style.current.secondaryText } - StatusQControls.StatusButton { + StatusButton { id: removeBtn anchors.horizontalCenter: parent.horizontalCenter text: qsTr("Enable") @@ -285,7 +288,7 @@ Popup { color: Style.current.secondaryText } - StatusQControls.StatusButton { + StatusButton { id: retryBtn anchors.top: emptyText.bottom anchors.topMargin: Style.current.padding diff --git a/ui/shared/status/emojiList.js b/ui/shared/status/emojiList.js index 4ca1a651c2..7235e560ed 100644 --- a/ui/shared/status/emojiList.js +++ b/ui/shared/status/emojiList.js @@ -1,10 +1,10 @@ var emojiCategories = [ - "recent", - "smileys", - "nature", - "food", + "time", + "smileys-and-people", + "animals-and-nature", + "food-and-drinks", "activity", - "travel", + "travel-and-places", "objects", "symbols", "flags", diff --git a/ui/shared/status/qmldir b/ui/shared/status/qmldir index 8c339366e8..e01d49b4e9 100644 --- a/ui/shared/status/qmldir +++ b/ui/shared/status/qmldir @@ -1,6 +1,5 @@ StatusChatCommandPopup 1.0 StatusChatCommandPopup.qml StatusChatInput 1.0 StatusChatInput.qml -StatusCategoryButton 1.0 StatusCategoryButton.qml StatusEmojiPopup 1.0 StatusEmojiPopup.qml StatusEmojiSection 1.0 StatusEmojiSection.qml StatusGifPopup 1.0 StatusGifPopup.qml