summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Bootstrap.qrc2
-rw-r--r--Page.qml22
-rw-r--r--ToolBar.qml17
-rw-r--r--qootstrap.pro4
4 files changed, 44 insertions, 1 deletions
diff --git a/Bootstrap.qrc b/Bootstrap.qrc
index f6b076d..f32ddff 100644
--- a/Bootstrap.qrc
+++ b/Bootstrap.qrc
@@ -2,5 +2,7 @@
<qresource prefix="/Bootstrap">
<file>ApplicationWindow.qml</file>
<file>Label.qml</file>
+ <file>Page.qml</file>
+ <file>ToolBar.qml</file>
</qresource>
</RCC>
diff --git a/Page.qml b/Page.qml
new file mode 100644
index 0000000..5087484
--- /dev/null
+++ b/Page.qml
@@ -0,0 +1,22 @@
+import QtQuick 2.15
+import QtQuick.Templates 2.15
+import Bootstrap 5.3
+
+Page {
+ id: control
+ implicitWidth: Math.max(implicitBackgroundWidth
+ + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding,
+ implicitHeaderWidth,
+ implicitFooterWidth)
+ implicitHeight: Math.max(implicitBackgroundHeight
+ + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding
+ + (implicitHeaderHeight > 0
+ ? implicitHeaderHeight + spacing : 0)
+ + (implicitFooterHeight > 0
+ ? implicitFooterHeight + spacing : 0))
+ background: Rectangle {
+ color: control.Bootstrap.bodyBg
+ }
+}
diff --git a/ToolBar.qml b/ToolBar.qml
new file mode 100644
index 0000000..4834c70
--- /dev/null
+++ b/ToolBar.qml
@@ -0,0 +1,17 @@
+import QtQuick 2.15
+import QtQuick.Templates 2.15
+import Bootstrap 5.3
+
+ToolBar {
+ id: control
+ implicitWidth: Math.max(implicitBackgroundWidth
+ + leftInset + rightInset,
+ contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(implicitBackgroundHeight
+ + topInset + bottomInset,
+ contentHeight + topPadding + bottomPadding)
+ background: Rectangle {
+ implicitHeight: 40
+ color: control.Bootstrap.bodyBg
+ }
+}
diff --git a/qootstrap.pro b/qootstrap.pro
index 3af6b2e..5864277 100644
--- a/qootstrap.pro
+++ b/qootstrap.pro
@@ -11,7 +11,9 @@ import.path = $$[QT_INSTALL_QML]/$$QML_IMPORT_NAME
style.files = \
ApplicationWindow.qml \
- Label.qml
+ Label.qml \
+ Page.qml \
+ ToolBar.qml
style.path = $$[QT_INSTALL_QML]/QtQuick/Controls.2/$$QML_IMPORT_NAME
HEADERS += $${QML_IMPORT_NAME}.hxx