Changeset View
Changeset View
Standalone View
Standalone View
src/contents/ui/room-settings/RoomStickerPackItemDelegate.qml
| /* | /* | ||||
| * This file is part of kazv. | * This file is part of kazv. | ||||
| * SPDX-FileCopyrightText: 2024 tusooa <tusooa@kazv.moe> | * SPDX-FileCopyrightText: 2024 tusooa <tusooa@kazv.moe> | ||||
| * SPDX-License-Identifier: AGPL-3.0-or-later | * SPDX-License-Identifier: AGPL-3.0-or-later | ||||
| */ | */ | ||||
| import QtQuick | import QtQuick | ||||
| import QtQuick.Layouts | import QtQuick.Layouts | ||||
| import QtQuick.Controls | import QtQuick.Controls | ||||
| import org.kde.kirigami as Kirigami | import org.kde.kirigami as Kirigami | ||||
| import org.kde.kirigamiaddons.delegates 1.0 as KAD | |||||
| import moe.kazv.mxc.kazv as MK | import moe.kazv.mxc.kazv as MK | ||||
| import '..' as Kazv | import '..' as Kazv | ||||
| import '.' as RoomSettings | import '.' as RoomSettings | ||||
| import '../matrix-helpers.js' as Helpers | import '../matrix-helpers.js' as Helpers | ||||
| Kirigami.SwipeListItem { | Kirigami.SwipeListItem { | ||||
| id: upper | id: upper | ||||
| property var stickerPack | property var stickerPack | ||||
| property var stickerRoomsEvent | property var stickerRoomsEvent | ||||
| contentItem: Label { | |||||
| text: stickerPack.packName || stickerPack.stateKey | text: stickerPack.packName || stickerPack.stateKey | ||||
| contentItem: KAD.SubtitleContentItem { | |||||
| itemDelegate: upper | |||||
| subtitle: stickerPack.packName ? stickerPack.stateKey : '' | |||||
| } | } | ||||
| actions: [ | actions: [ | ||||
| Kirigami.Action { | Kirigami.Action { | ||||
| objectName: 'usePackAction' | objectName: 'usePackAction' | ||||
| text: l10n.get('room-sticker-packs-use-action') | text: l10n.get('room-sticker-packs-use-action') | ||||
| checkable: true | checkable: true | ||||
| checked: upper.getIsUsingPack() | checked: upper.getIsUsingPack() | ||||
| ▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines | |||||