From ac5d77d7ab74e9f8f5a3aca785f2d865a168e486 Mon Sep 17 00:00:00 2001 From: marcin Date: Fri, 22 Aug 2014 11:03:10 +0200 Subject: [PATCH] blocked title bar in wizard --- components/TitleBar.qml | 4 ++-- main.qml | 36 +++++++++++++++--------------------- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/components/TitleBar.qml b/components/TitleBar.qml index 3cd0d8ed..2ff59230 100644 --- a/components/TitleBar.qml +++ b/components/TitleBar.qml @@ -7,7 +7,7 @@ Rectangle { color: "#000000" y: -height property int mouseX: 0 - property string walletName: "Donations" + property string title: "Monero - Donations" property bool containsMouse: false property alias maximizeButtonVisible: maximizeButton.visible property alias basicButtonVisible: goToBasicVersionButton.visible @@ -19,7 +19,7 @@ Rectangle { font.pixelSize: 15 font.letterSpacing: -1 color: "#FFFFFF" - text: qsTr("Monero - %1").arg(titleBar.walletName) + text: titleBar.title } Behavior on y { diff --git a/main.qml b/main.qml index 93eaf162..25e569bb 100644 --- a/main.qml +++ b/main.qml @@ -111,8 +111,11 @@ ApplicationWindow { PropertyChanges { target: appWindow; width: 930; } PropertyChanges { target: appWindow; height: 595; } PropertyChanges { target: resizeArea; visible: false } - }, - State { + PropertyChanges { target: titleBar; maximizeButtonVisible: false } + PropertyChanges { target: frameArea; blocked: true } + PropertyChanges { target: titleBar; y: 0 } + PropertyChanges { target: titleBar; title: "Program setup wizard" } + }, State { name: "normal" PropertyChanges { target: leftPanel; visible: true } PropertyChanges { target: rightPanel; visible: true } @@ -122,6 +125,10 @@ ApplicationWindow { PropertyChanges { target: appWindow; width: rightPanelExpanded ? 1269 : 1269 - 300; } PropertyChanges { target: appWindow; height: 800; } PropertyChanges { target: resizeArea; visible: true } + PropertyChanges { target: titleBar; maximizeButtonVisible: true } + PropertyChanges { target: frameArea; blocked: false } + PropertyChanges { target: titleBar; y: -titleBar.height } + PropertyChanges { target: titleBar; title: "Monero - Donations" } } ] @@ -204,6 +211,11 @@ ApplicationWindow { properties: "blocked" value: true } + PropertyAction { + target: resizeArea + properties: "visible" + value: false + } NumberAnimation { target: appWindow properties: "height" @@ -258,7 +270,7 @@ ApplicationWindow { value: false } PropertyAction { - targets: [leftPanel, middlePanel, rightPanel] + targets: [leftPanel, middlePanel, rightPanel, resizeArea] properties: "visible" value: true } @@ -336,24 +348,6 @@ ApplicationWindow { } } -// MouseArea { -// anchors.top: parent.top -// anchors.bottom: parent.bottom -// anchors.right: parent.right -// anchors.topMargin: 30 -// anchors.bottomMargin: 3 -// cursorShape: Qt.SizeHorCursor -// width: 3 -// property int previousX: 0 -// onPressed: previousX = mouseX -// onPositionChanged: { -// var diff = previousX - mouseX -// if(middlePanel.width - diff > 655) -// appWindow.width -= diff -// else appWindow.width = parent.maxWidth -// } -// } - TitleBar { id: titleBar anchors.left: parent.left