From f996fb5965dc7b89cfe4d6f76e046e9cc9d83326 Mon Sep 17 00:00:00 2001 From: talksik Date: Thu, 17 Apr 2025 08:22:47 -0700 Subject: [PATCH] feat: add pane component --- AppPane.qml | 22 ++++++++++++++++++++++ CMakeLists.txt | 1 + 2 files changed, 23 insertions(+) create mode 100644 AppPane.qml diff --git a/AppPane.qml b/AppPane.qml new file mode 100644 index 0000000..b7b70cb --- /dev/null +++ b/AppPane.qml @@ -0,0 +1,22 @@ +import QtQuick +import QtQuick.Controls.impl +import QtQuick.Templates as T + +T.Pane { + id: control + + implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, + contentWidth + leftPadding + rightPadding) + implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, + contentHeight + topPadding + bottomPadding) + + padding: 12 + + background: Rectangle { + anchors.fill: parent + color: Theme.card + radius: Theme.radius + border.color: Theme.softBorder + border.width: 1 + } +} diff --git a/CMakeLists.txt b/CMakeLists.txt index b7c0cde..1d51776 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ set(plain_qml_files AppLink.qml AppWarning.qml AppMenu.qml + AppPane.qml ) set(qml_singletons Fonts.qml