D26354: Introduce ActionRow widget

Carson Black noreply at phabricator.kde.org
Wed Jan 1 21:49:45 GMT 2020


cblack created this revision.
cblack added reviewers: VDG, Kirigami.
Herald added a project: Kirigami.
Herald added a subscriber: plasma-devel.
cblack requested review of this revision.

REVISION SUMMARY
  ActionRows are row widgets with associated actions. Left and right actions are triggered by swipes,
  and center actions are triggered with an interaction.

TEST PLAN
    import QtQuick 2.12
    import QtQuick.Controls 2.12
    import QtQuick.Window 2.12
    import org.kde.kirigami 2.12
    
    Window {
        visible: true
        width: 640
        height: 480
        ListView {
            anchors.fill: parent
    
            model: 10
            delegate: ActionRow {
                width: parent.width
                leftAction: Action {
                    text: "Copy"
                    onTriggered: {
                        print("Copy triggered")
                    }
                }
                centerAction: Action {
                    onTriggered: {
                        print("Center triggered")
                    }
                }
    
                rightAction: Action {
                    text: "Delete"
                    SwipeAction.foregroundColor: "white"
                    SwipeAction.backgroundColor: "#bf0039"
                    SwipeAction.isDelete: true
                    icon.name: "edit-delete"
                    onTriggered: {
                        print("Delete triggered")
                    }
                }
            }
        }
    
        title: qsTr("Hello World")
    }

REPOSITORY
  R169 Kirigami

BRANCH
  actionrow (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D26354

AFFECTED FILES
  src/CMakeLists.txt
  src/controls/ActionRow.qml
  src/kirigamiplugin.cpp
  src/swipeaction.cpp
  src/swipeaction.h

To: cblack, #vdg, #kirigami
Cc: plasma-devel, fbampaloukas, GB_2, domson, dkardarakos, ngraham, apol, ahiemstra, davidedmundson, mart, hein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200101/52757091/attachment-0001.html>


More information about the Plasma-devel mailing list