summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatasof Wirapraja <anata@darapsa.co.id>2021-06-24 15:01:24 +0700
committerAnatasof Wirapraja <anata@darapsa.co.id>2021-06-24 15:01:24 +0700
commitdd2d9dc91ad779f0fb46191c4ea25da94de1a36d (patch)
tree34e85b0acf2dadf95ed21cea62d5f942cf2e7a64
parent5cc92d57e6082649b1eb1a02ee48e3517aa383c0 (diff)
Add `ListWithIconForm` component
-rw-r--r--components/ListWithIconForm.ui.qml43
-rw-r--r--qml.qrc1
2 files changed, 44 insertions, 0 deletions
diff --git a/components/ListWithIconForm.ui.qml b/components/ListWithIconForm.ui.qml
new file mode 100644
index 0000000..c86a443
--- /dev/null
+++ b/components/ListWithIconForm.ui.qml
@@ -0,0 +1,43 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.15
+
+Item {
+ width: 360
+ height: 48
+ Layout.minimumWidth: 360
+ Layout.minimumHeight: 48
+
+ Row {
+ id: row
+ anchors.fill: parent
+ spacing: 8
+ padding: 0
+
+ Label {
+ id: listLabel
+ text: qsTr("List label with icon")
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ font.letterSpacing: 0.15
+ font.weight: Font.Medium
+ anchors.leftMargin: 16
+ font.pointSize: 16
+ }
+
+ ToolButton {
+ id: listButton
+ width: 24
+ height: 24
+ text: qsTr("List Tool Button")
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ padding: 0
+ display: AbstractButton.IconOnly
+ highlighted: false
+ anchors.rightMargin: 16
+ icon.name: "addIcon"
+ icon.source: "../icons/add-24px.svg"
+ }
+ }
+}
diff --git a/qml.qrc b/qml.qrc
index a4617f1..37ba40d 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -26,5 +26,6 @@
<file>icons/user-24px.svg</file>
<file>pages/Home.qml</file>
<file>pages/HomeForm.ui.qml</file>
+ <file>components/ListWithIconForm.ui.qml</file>
</qresource>
</RCC>