fix(Chat/Stickers): Recent stickers icon is missing
It has been changed footer layout from Item to row. The colour of the Add button has been changed to match the rest of the style. The recent tab control has been changed to be consistent with other popups like gifts or emojis and the used component directly controls the different themes. Fixes #5458
This commit is contained in:
parent
2e2b958e37
commit
0ee91a1d1f
|
@ -196,22 +196,22 @@ Popup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Row {
|
||||||
id: footerContent
|
id: footerContent
|
||||||
Layout.leftMargin: 8
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 40 - 8 * 2
|
leftPadding: Style.current.padding / 2
|
||||||
Layout.topMargin: 8
|
rightPadding: Style.current.padding / 2
|
||||||
Layout.rightMargin: 8
|
spacing: Style.current.padding / 2
|
||||||
Layout.bottomMargin: 8
|
|
||||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
|
||||||
|
|
||||||
StatusQControls.StatusFlatRoundButton {
|
StatusQControls.StatusFlatRoundButton {
|
||||||
id: btnAddStickerPack
|
id: btnAddStickerPack
|
||||||
implicitWidth: 24
|
|
||||||
implicitHeight: 24
|
implicitHeight: 24
|
||||||
type: StatusQControls.StatusRoundButton.Type.Secondary
|
implicitWidth: 24
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: Style.current.padding / 2
|
||||||
icon.name: "add"
|
icon.name: "add"
|
||||||
|
type: StatusQControls.StatusFlatRoundButton.Type.Tertiary
|
||||||
|
color: "transparent"
|
||||||
state: root.stickerPacksLoaded ? "default" : "pending"
|
state: root.stickerPacksLoaded ? "default" : "pending"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
stickersContainer.visible = false
|
stickersContainer.visible = false
|
||||||
|
@ -219,32 +219,25 @@ Popup {
|
||||||
footerContent.visible = false
|
footerContent.visible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StatusStickerPackIconWithIndicator {
|
|
||||||
|
StatusQControls.StatusTabBarIconButton {
|
||||||
id: btnHistory
|
id: btnHistory
|
||||||
width: 24
|
icon.name: "time"
|
||||||
height: 24
|
highlighted: true
|
||||||
selected: true
|
|
||||||
useIconInsteadOfImage: true
|
|
||||||
source: Style.svg("history")
|
|
||||||
anchors.left: btnAddStickerPack.right
|
|
||||||
anchors.leftMargin: Style.current.padding
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
btnHistory.selected = true
|
highlighted = true
|
||||||
stickerPackListView.selectedPackId = -1
|
stickerPackListView.selectedPackId = -1
|
||||||
stickerGrid.model = recentStickers
|
stickerGrid.model = recentStickers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ScrollView {
|
ScrollView {
|
||||||
anchors.top: parent.top
|
id: installedStickersSV
|
||||||
anchors.left: btnHistory.right
|
anchors.bottom: parent.bottom
|
||||||
anchors.leftMargin: Style.current.padding
|
|
||||||
anchors.right: parent.right
|
|
||||||
height: 32
|
height: 32
|
||||||
clip: true
|
clip: true
|
||||||
id: installedStickersSV
|
|
||||||
ScrollBar.vertical.policy: ScrollBar.AlwaysOff
|
ScrollBar.vertical.policy: ScrollBar.AlwaysOff
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: stickersRowLayout
|
id: stickersRowLayout
|
||||||
spacing: Style.current.padding
|
spacing: Style.current.padding
|
||||||
|
@ -263,7 +256,7 @@ Popup {
|
||||||
Layout.preferredHeight: height
|
Layout.preferredHeight: height
|
||||||
Layout.preferredWidth: width
|
Layout.preferredWidth: width
|
||||||
onClicked: {
|
onClicked: {
|
||||||
btnHistory.selected = false
|
btnHistory.highlighted = false
|
||||||
stickerPackListView.selectedPackId = packId
|
stickerPackListView.selectedPackId = packId
|
||||||
stickerGrid.model = stickers
|
stickerGrid.model = stickers
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue