Make the titlebar more modular

This commit is contained in:
Sander Ferdinand
2018-04-21 21:59:31 +02:00
parent 47f9a1765a
commit 4d56ed9e27
2 changed files with 84 additions and 42 deletions

View File

@@ -1261,7 +1261,7 @@ ApplicationWindow {
PropertyChanges { target: appWindow; width: (screenWidth < 930 || isAndroid || isIOS)? screenWidth : 930; }
PropertyChanges { target: appWindow; height: maxWindowHeight; }
PropertyChanges { target: resizeArea; visible: true }
PropertyChanges { target: titleBar; maximizeButtonVisible: false }
PropertyChanges { target: titleBar; showMaximizeButton: false }
// PropertyChanges { target: frameArea; blocked: true }
PropertyChanges { target: titleBar; visible: false }
PropertyChanges { target: titleBar; y: 0 }
@@ -1277,7 +1277,7 @@ ApplicationWindow {
PropertyChanges { target: appWindow; width: (screenWidth < 969 || isAndroid || isIOS)? screenWidth : 969 } //rightPanelExpanded ? 1269 : 1269 - 300;
PropertyChanges { target: appWindow; height: maxWindowHeight; }
PropertyChanges { target: resizeArea; visible: true }
PropertyChanges { target: titleBar; maximizeButtonVisible: true }
PropertyChanges { target: titleBar; showMaximizeButton: true }
// PropertyChanges { target: frameArea; blocked: true }
PropertyChanges { target: titleBar; visible: true }
// PropertyChanges { target: titleBar; y: 0 }
@@ -1596,11 +1596,20 @@ ApplicationWindow {
TitleBar {
id: titleBar
anchors.left: parent.left
anchors.right: parent.right
x: 0
y: 0
customDecorations: persistentSettings.customDecorations
anchors.left: parent.left
anchors.right: parent.right
showMinimizeButton: true
showMaximizeButton: true
showWhatIsButton: false
showMoneroLogo: true
onCloseClicked: appWindow.close();
onMaximizeClicked: {
appWindow.visibility = appWindow.visibility !== Window.FullScreen ? Window.FullScreen :
Window.Windowed
}
onMinimizeClicked: appWindow.visibility = Window.Minimized
onGoToBasicVersion: {
if (yes) {
// basicPanel.currentView = middlePanel.currentView
@@ -1629,15 +1638,6 @@ ApplicationWindow {
}
}
}
Rectangle {
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.left: parent.left
height:1
color: "#2F2F2F"
z: 2
}
}
// new ToolTip