TitleBar: add close wallet button

This commit is contained in:
selsta 2019-09-16 23:59:54 +02:00
parent 2b82a472ae
commit 4905341999
8 changed files with 14 additions and 74 deletions

View File

@ -171,44 +171,6 @@ Rectangle {
color: "#ff9323"
themeTransition: false
}
Rectangle {
height: (logoutImage.height + 8)
width: (logoutImage.width + 8)
color: "transparent"
anchors.right: parent.right
anchors.rightMargin: 8
anchors.top: parent.top
anchors.topMargin: 30
Image {
id: logoutImage
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
height: 16
width: 13
source: "qrc:///images/logout.png"
}
ColorOverlay {
anchors.fill: logoutImage
source: logoutImage
visible: !MoneroComponents.Style.blackTheme
color: "#000000"
}
MouseArea{
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
middlePanel.addressBookView.clearFields();
middlePanel.transferView.clearFields();
middlePanel.receiveView.clearFields();
appWindow.showWizard();
}
}
}
}
Item {

View File

@ -51,7 +51,6 @@ QtObject {
property string titleBarBackgroundBorderColor: blackTheme ? _b_titleBarBackgroundBorderColor : _w_titleBarBackgroundBorderColor
property string titleBarLogoSource: blackTheme ? _b_titleBarLogoSource : _w_titleBarLogoSource
property string titleBarMinimizeSource: blackTheme ? _b_titleBarMinimizeSource : _w_titleBarMinimizeSource
property string titleBarExpandSource: blackTheme ? _b_titleBarExpandSource : _w_titleBarExpandSource
property string titleBarFullscreenSource: blackTheme ? _b_titleBarFullscreenSource : _w_titleBarFullscreenSource
property string titleBarCloseSource: blackTheme ? _b_titleBarCloseSource : _w_titleBarCloseSource
property string titleBarButtonHoverColor: blackTheme ? _b_titleBarButtonHoverColor : _w_titleBarButtonHoverColor
@ -108,7 +107,6 @@ QtObject {
property string _b_titleBarBackgroundBorderColor: "#2f2f2f"
property string _b_titleBarLogoSource: "qrc:///images/titlebarLogo.png"
property string _b_titleBarMinimizeSource: "qrc:///images/minimize.svg"
property string _b_titleBarExpandSource: "qrc:///images/sidebar.svg"
property string _b_titleBarFullscreenSource: "qrc:///images/fullscreen.svg"
property string _b_titleBarCloseSource: "qrc:///images/close.svg"
property string _b_titleBarButtonHoverColor: "#10FFFFFF"
@ -165,7 +163,6 @@ QtObject {
property string _w_titleBarBackgroundBorderColor: "#DEDEDE"
property string _w_titleBarLogoSource: "qrc:///images/themes/white/titlebarLogo.png"
property string _w_titleBarMinimizeSource: "qrc:///images/themes/white/minimize.svg"
property string _w_titleBarExpandSource: "qrc:///images/themes/white/expand.svg"
property string _w_titleBarFullscreenSource: "qrc:///images/themes/white/fullscreen.svg"
property string _w_titleBarCloseSource: "qrc:///images/themes/white/close.svg"
property string _w_titleBarButtonHoverColor: "#11000000"

View File

@ -38,7 +38,6 @@ import "effects/" as MoneroEffects
Rectangle {
id: root
property int mouseX: 0
property bool basicButtonVisible: false
property bool customDecorations: persistentSettings.customDecorations
property bool showMinimizeButton: true
property bool showMaximizeButton: true
@ -57,18 +56,18 @@ Rectangle {
signal maximizeClicked
signal minimizeClicked
signal languageClicked
signal goToBasicVersion(bool yes)
signal closeWalletClicked
state: "default"
states: [
State {
name: "default";
PropertyChanges { target: btnSidebarCollapse; visible: true}
PropertyChanges { target: btnCloseWallet; visible: true}
PropertyChanges { target: btnLanguageToggle; visible: true}
}, State {
// show only theme switcher and window controls
name: "essentials";
PropertyChanges { target: btnSidebarCollapse; visible: false}
PropertyChanges { target: btnCloseWallet; visible: false}
PropertyChanges { target: btnLanguageToggle; visible: false}
}
]
@ -94,22 +93,20 @@ Rectangle {
// collapse sidebar
Rectangle {
id: btnSidebarCollapse
visible: root.basicButtonVisible
id: btnCloseWallet
color: "transparent"
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
MoneroEffects.ImageMask {
Text {
text: FontAwesome.signOutAlt
font.family: FontAwesome.fontFamilySolid
font.pixelSize: 16
color: MoneroComponents.Style.defaultFontColor
font.styleName: "Solid"
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
height: 14
width: 14
image: MoneroComponents.Style.titleBarExpandSource
color: MoneroComponents.Style.defaultFontColor
fontAwesomeFallbackIcon: FontAwesome.cube
fontAwesomeFallbackSize: 16
fontAwesomeFallbackOpacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.9
opacity: 0.75
}
@ -119,7 +116,7 @@ Rectangle {
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: root.goToBasicVersion(leftPanel.visible)
onClicked: root.closeWalletClicked(leftPanel.visible)
}
}

View File

@ -607,6 +607,7 @@ Object {
property string shower : "\uf2cc"
property string signIn : "\uf090"
property string signLanguage : "\uf2a7"
property string signOutAlt : "\uf2f5"
property string signOut : "\uf08b"
property string signal : "\uf012"
property string signing : "\uf2a7"

View File

@ -1,6 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
<g fill="none" fill-rule="evenodd" stroke="#FFF" stroke-width="1.636" opacity="1">
<rect width="16.364" height="16.364" x=".818" y=".818" rx="1.636"/>
<path fill="#FFF" d="M6.182 17.182V.818H1.64a.822.822 0 0 0-.822.822v14.72c0 .454.368.822.822.822h4.542z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 379 B

View File

@ -1,6 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
<g fill="none" fill-rule="evenodd" opacity="1">
<path fill="none" d="M-11-11h36v36h-36z" opacity="1"/>
<path stroke="#000" stroke-linecap="round" stroke-width="1.556" d="M13 13L1.686 1.686M1 7.222V1h6.222"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 328 B

View File

@ -1580,7 +1580,6 @@ ApplicationWindow {
name: "normal"
PropertyChanges { target: leftPanel; visible: true }
PropertyChanges { target: middlePanel; visible: true }
PropertyChanges { target: titleBar; basicButtonVisible: true }
PropertyChanges { target: wizard; visible: false }
PropertyChanges { target: resizeArea; visible: true }
PropertyChanges { target: titleBar; state: "default" }
@ -1739,11 +1738,9 @@ ApplicationWindow {
anchors.right: parent.right
onCloseClicked: appWindow.close();
onLanguageClicked: appWindow.toggleLanguageView();
onCloseWalletClicked: appWindow.showWizard();
onMaximizeClicked: appWindow.visibility = appWindow.visibility !== Window.Maximized ? Window.Maximized : Window.Windowed
onMinimizeClicked: appWindow.visibility = Window.Minimized
onGoToBasicVersion: {
//nop
}
}
MoneroMerchant.MerchantTitlebar {

View File

@ -237,7 +237,6 @@
<file>images/middlePanelShadow.png</file>
<file>images/themes/white/titlebarLogo@2x.png</file>
<file>images/themes/white/titlebarLogo.png</file>
<file>images/sidebar.svg</file>
<file>images/fullscreen.svg</file>
<file>images/close.svg</file>
<file>images/minimize.svg</file>
@ -245,7 +244,6 @@
<file>images/themes/white/fullscreen.svg</file>
<file>images/themes/white/minimize.svg</file>
<file>images/themes/white/question.svg</file>
<file>images/themes/white/expand.svg</file>
<file>components/effects/ColorTransition.qml</file>
<file>components/effects/GradientBackground.qml</file>
<file>images/check-white.svg</file>