From b60c4f33a12d22ea03564d6fe3e83fa2aaf7e046 Mon Sep 17 00:00:00 2001 From: Juraj Oravec Date: Sun, 16 Oct 2022 17:00:45 +0200 Subject: [PATCH] QML 7: Convert to use ColumnLayout Signed-off-by: Juraj Oravec --- qml/extensions/qml_tutorial_7/main.qml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/qml/extensions/qml_tutorial_7/main.qml b/qml/extensions/qml_tutorial_7/main.qml index 3817c9c..50b1b86 100644 --- a/qml/extensions/qml_tutorial_7/main.qml +++ b/qml/extensions/qml_tutorial_7/main.qml @@ -1,5 +1,6 @@ import org.kde.falkon 1.0 as Falkon import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.0 import QtQuick 2.3 Falkon.PluginInterface { @@ -25,18 +26,18 @@ Falkon.PluginInterface { shortcut: 'Ctrl+Shift+Alt+S' Pane { - Image { - source: 'qrc:/icons/other/startpage.svg' - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.right: parent.right - } + ColumnLayout { + anchors.fill: parent + Image { + Layout.alignment: Qt.AlignHCenter + source: 'qrc:/icons/other/startpage.svg' + } - Button { - text: i18n('Hello Qml Plugin') - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom + Button { + Layout.fillWidth: true + Layout.alignment: Qt.AlignBottom + text: i18n('Hello Qml Plugin') + } } } }