Compare commits

..

10 Commits

Author SHA1 Message Date
luigi1111
b59de2fb0e Merge pull request #1651
09c0aac Linking hidapi for OSX builds (skftn)
2018-10-14 14:52:02 -05:00
Sander Ferdinand
09c0aac7ab Linking hidapi for OSX builds 2018-10-14 21:47:58 +02:00
luigi1111
72b71e6a4f Merge pull request #1650
ba8d291 Link to libhidapi rather than pcsclite (bjacquin)
2018-10-14 14:44:41 -05:00
luigi1111
7fa55b49fe Merge pull request #1649
f17c407 Add border to generated QR codes (glv2)
2018-10-14 14:43:15 -05:00
Bertrand Jacquin
ba8d2913be Link to libhidapi rather than pcsclite 2018-10-14 16:36:22 +02:00
Guillaume LE VAILLANT
f17c407100 Add border to generated QR codes 2018-10-14 16:31:45 +02:00
luigi1111
7a3855700e Merge pull request #1646
d6ef609 Linking crypto32 and libhidapi for Windows builds (skftn)
2018-10-13 13:43:36 -05:00
luigi1111
ca7c0e0c55 Merge pull request #1640
3f3fd67 Updating outdated icu files (BigslimVdub)
2018-10-13 13:42:44 -05:00
Sander Ferdinand
d6ef609236 Linking crypto32 and libhidapi for Windows builds 2018-10-13 19:45:27 +02:00
BigslimVdub
3f3fd67f14 Updating outdated icu files 2018-10-12 18:08:14 +02:00
416 changed files with 53051 additions and 122622 deletions

2
.gitignore vendored
View File

@@ -11,5 +11,3 @@ moc_*
*.xcodeproj
monero-wallet-gui_plugin_import.cpp
monero-wallet-gui_qml_plugin_import.cpp
*.qmlc
*.jsc

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2019, The Monero Project
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
@@ -26,16 +26,12 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.2
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
import moneroComponents.Wallet 1.0
import moneroComponents.NetworkType 1.0
import moneroComponents.Clipboard 1.0
import FontAwesome 1.0
import "components" as MoneroComponents
import "components/effects/" as MoneroEffects
import "components"
Rectangle {
id: panel
@@ -45,16 +41,13 @@ Rectangle {
property alias unlockedBalanceLabelVisible: unlockedBalanceLabel.visible
property alias balanceLabelText: balanceLabel.text
property alias balanceText: balanceText.text
property alias balanceTextFiat: balanceTextFiat.text
property alias unlockedBalanceTextFiat: unlockedBalanceTextFiat.text
property alias networkStatus : networkStatus
property alias progressBar : progressBar
property alias daemonProgressBar : daemonProgressBar
property alias minutesToUnlockTxt: unlockedBalanceLabel.text
property int titleBarHeight: 50
property string copyValue: ""
Clipboard { id: clipboard }
signal dashboardClicked()
signal historyClicked()
signal transferClicked()
signal receiveClicked()
@@ -64,15 +57,14 @@ Rectangle {
signal addressBookClicked()
signal miningClicked()
signal signClicked()
signal merchantClicked()
signal accountClicked()
signal keysClicked()
function selectItem(pos) {
menuColumn.previousButton.checked = false
if(pos === "History") menuColumn.previousButton = historyButton
if(pos === "Dashboard") menuColumn.previousButton = dashboardButton
else if(pos === "History") menuColumn.previousButton = historyButton
else if(pos === "Transfer") menuColumn.previousButton = transferButton
else if(pos === "Receive") menuColumn.previousButton = receiveButton
else if(pos === "Merchant") menuColumn.previousButton = merchantButton
else if(pos === "AddressBook") menuColumn.previousButton = addressBookButton
else if(pos === "Mining") menuColumn.previousButton = miningButton
else if(pos === "TxKey") menuColumn.previousButton = txkeyButton
@@ -80,7 +72,8 @@ Rectangle {
else if(pos === "Sign") menuColumn.previousButton = signButton
else if(pos === "Settings") menuColumn.previousButton = settingsButton
else if(pos === "Advanced") menuColumn.previousButton = advancedButton
else if(pos === "Account") menuColumn.previousButton = accountButton
else if(pos === "Keys") menuColumn.previousButton = keysButton
menuColumn.previousButton.checked = true
}
@@ -89,18 +82,13 @@ Rectangle {
anchors.bottom: parent.bottom
anchors.top: parent.top
MoneroEffects.GradientBackground {
anchors.fill: parent
fallBackColor: MoneroComponents.Style.middlePanelBackgroundColor
initialStartColor: MoneroComponents.Style.leftPanelBackgroundGradientStart
initialStopColor: MoneroComponents.Style.leftPanelBackgroundGradientStop
blackColorStart: MoneroComponents.Style._b_leftPanelBackgroundGradientStart
blackColorStop: MoneroComponents.Style._b_leftPanelBackgroundGradientStop
whiteColorStart: MoneroComponents.Style._w_leftPanelBackgroundGradientStart
whiteColorStop: MoneroComponents.Style._w_leftPanelBackgroundGradientStop
posStart: 0.6
start: Qt.point(0, 0)
end: Qt.point(height, width)
Image {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
height: panel.height
source: "images/leftPanelBg.jpg"
z: 1
}
// card with monero logo
@@ -108,44 +96,30 @@ Rectangle {
visible: true
z: 2
id: column1
height: 210
height: 200
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: (persistentSettings.customDecorations)? 50 : 0
RowLayout {
visible: true
Item {
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 20
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter
height: 490
width: 260
height: 490 * scaleRatio
width: 259 * scaleRatio
Image {
id: card
visible: !isOpenGL || MoneroComponents.Style.blackTheme
width: 260
height: 170
width: 259; height: 170
fillMode: Image.PreserveAspectFit
source: "qrc:///images/card-background.png"
source: "images/card-background.png"
}
DropShadow {
visible: isOpenGL && !MoneroComponents.Style.blackTheme
anchors.fill: card
horizontalOffset: 3
verticalOffset: 3
radius: 10.0
samples: 15
color: "#3B000000"
source: card
cached: true
}
MoneroComponents.TextPlain {
Text {
id: testnetLabel
visible: persistentSettings.nettype != NetworkType.MAINNET
text: (persistentSettings.nettype == NetworkType.TESTNET ? qsTr("Testnet") : qsTr("Stagenet")) + translationManager.emptyString
@@ -156,10 +130,9 @@ Rectangle {
font.bold: true
font.pixelSize: 12
color: "#f33434"
themeTransition: false
}
MoneroComponents.TextPlain {
Text {
id: viewOnlyLabel
visible: viewOnly
text: qsTr("View Only") + translationManager.emptyString
@@ -170,58 +143,6 @@ Rectangle {
font.pixelSize: 12
font.bold: true
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: 25
Image {
id: logoutImage
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
height: 16
width: 13
source: "qrc:///images/logout.png"
}
MouseArea{
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
middlePanel.addressBookView.clearFields();
middlePanel.transferView.clearFields();
middlePanel.receiveView.clearFields();
appWindow.showWizard();
}
}
}
MoneroComponents.Label {
fontSize: 20
text: "¥"
color: "white"
visible: persistentSettings.fiatPriceEnabled
anchors.right: parent.right
anchors.rightMargin: 45
anchors.top: parent.top
anchors.topMargin: 28
themeTransition: false
MouseArea{
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
persistentSettings.fiatPriceToggle = !persistentSettings.fiatPriceToggle
}
}
}
}
@@ -231,13 +152,12 @@ Rectangle {
anchors.topMargin: 20
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter
height: 490
width: 50
height: 490 * scaleRatio
width: 50 * scaleRatio
MoneroComponents.TextPlain {
visible: !(persistentSettings.fiatPriceToggle && persistentSettings.fiatPriceEnabled)
Text {
visible: !isMobile
id: balanceText
themeTransition: false
anchors.left: parent.left
anchors.leftMargin: 20
anchors.top: parent.top
@@ -247,9 +167,6 @@ Rectangle {
text: "N/A"
// dynamically adjust text size
font.pixelSize: {
if (persistentSettings.hideBalance) {
return 20;
}
var digits = text.split('.')[0].length
var defaultSize = 22;
if(digits > 2) {
@@ -257,59 +174,11 @@ Rectangle {
}
return defaultSize;
}
MouseArea {
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: {
parent.color = MoneroComponents.Style.orange
}
onExited: {
parent.color = MoneroComponents.Style.white
}
onClicked: {
console.log("Copied to clipboard");
clipboard.setText(parent.text);
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
}
}
}
MoneroComponents.TextPlain {
visible: !balanceText.visible
id: balanceTextFiat
themeTransition: false
anchors.left: parent.left
anchors.leftMargin: 20
anchors.top: parent.top
anchors.topMargin: 76
font.family: "Arial"
color: "#FFFFFF"
text: "N/A"
font.pixelSize: balanceText.font.pixelSize
MouseArea {
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: {
parent.color = MoneroComponents.Style.orange
}
onExited: {
parent.color = MoneroComponents.Style.white
}
onClicked: {
console.log("Copied to clipboard");
clipboard.setText(parent.text);
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
}
}
}
MoneroComponents.TextPlain {
Text {
id: unlockedBalanceText
visible: !(persistentSettings.fiatPriceToggle && persistentSettings.fiatPriceEnabled)
themeTransition: false
visible: true
anchors.left: parent.left
anchors.leftMargin: 20
anchors.top: parent.top
@@ -319,9 +188,6 @@ Rectangle {
text: "N/A"
// dynamically adjust text size
font.pixelSize: {
if (persistentSettings.hideBalance) {
return 20;
}
var digits = text.split('.')[0].length
var defaultSize = 20;
if(digits > 3) {
@@ -329,87 +195,47 @@ Rectangle {
}
return defaultSize;
}
MouseArea {
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: {
parent.color = MoneroComponents.Style.orange
}
onExited: {
parent.color = MoneroComponents.Style.white
}
onClicked: {
console.log("Copied to clipboard");
clipboard.setText(parent.text);
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
}
}
}
MoneroComponents.TextPlain {
id: unlockedBalanceTextFiat
themeTransition: false
visible: !unlockedBalanceText.visible
anchors.left: parent.left
anchors.leftMargin: 20
anchors.top: parent.top
anchors.topMargin: 126
font.family: "Arial"
color: "#FFFFFF"
text: "N/A"
font.pixelSize: unlockedBalanceText.font.pixelSize
MouseArea {
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: {
parent.color = MoneroComponents.Style.orange
}
onExited: {
parent.color = MoneroComponents.Style.white
}
onClicked: {
console.log("Copied to clipboard");
clipboard.setText(parent.text);
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
}
}
}
MoneroComponents.Label {
Label {
id: unlockedBalanceLabel
visible: true
text: qsTr("Unlocked balance") + translationManager.emptyString
color: "white"
fontSize: 14
anchors.left: parent.left
anchors.leftMargin: 20
anchors.top: parent.top
anchors.topMargin: 110
themeTransition: false
}
MoneroComponents.Label {
Label {
visible: !isMobile
id: balanceLabel
text: qsTr("Balance") + translationManager.emptyString
color: "white"
fontSize: 14
anchors.left: parent.left
anchors.leftMargin: 20
anchors.top: parent.top
anchors.topMargin: 60
elide: Text.ElideRight
textWidth: 238
themeTransition: false
}
Item { //separator
anchors.left: parent.left
anchors.right: parent.right
height: 1
}
/* Disable twitter/news panel
Image {
anchors.left: parent.left
anchors.verticalCenter: logo.verticalCenter
anchors.leftMargin: 19
source: appWindow.rightPanelExpanded ? "images/expandRightPanel.png" :
"images/collapseRightPanel.png"
}
MouseArea {
anchors.fill: parent
onClicked: appWindow.rightPanelExpanded = !appWindow.rightPanelExpanded
}
*/
}
}
}
@@ -421,17 +247,21 @@ Rectangle {
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.top: (isMobile)? parent.top : column1.bottom
anchors.topMargin: (isMobile)? 0 : 32
color: "transparent"
Flickable {
id:flicker
contentHeight: menuColumn.height
anchors.top: parent.top
anchors.bottom: networkStatus.top
width: parent.width
contentHeight: (progressBar.visible)? menuColumn.height + separator.height +
networkStatus.height + progressBar.height + daemonProgressBar.height :
menuColumn.height + separator.height + networkStatus.height
anchors.fill: parent
clip: true
Column {
id: menuColumn
anchors.left: parent.left
anchors.right: parent.right
@@ -439,37 +269,45 @@ Rectangle {
clip: true
property var previousButton: transferButton
// top border
MoneroComponents.MenuButtonDivider {
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
}
// ------------- Dashboard tab ---------------
// ------------- Account tab ---------------
MoneroComponents.MenuButton {
id: accountButton
/*
MenuButton {
id: dashboardButton
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Account") + translationManager.emptyString
symbol: qsTr("T") + translationManager.emptyString
dotColor: "#44AAFF"
text: qsTr("Dashboard") + translationManager.emptyString
symbol: qsTr("D") + translationManager.emptyString
dotColor: "#FFE00A"
checked: true
onClicked: {
parent.previousButton.checked = false
parent.previousButton = accountButton
panel.accountClicked()
parent.previousButton = dashboardButton
panel.dashboardClicked()
}
}
MoneroComponents.MenuButtonDivider {
visible: accountButton.present
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: dashboardButton.checked || transferButton.checked ? "#1C1C1C" : "#313131"
height: 1
}
*/
// top border
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- Transfer tab ---------------
MoneroComponents.MenuButton {
MenuButton {
id: transferButton
anchors.left: parent.left
anchors.right: parent.right
@@ -483,16 +321,18 @@ Rectangle {
}
}
MoneroComponents.MenuButtonDivider {
Rectangle {
visible: transferButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- AddressBook tab ---------------
MoneroComponents.MenuButton {
MenuButton {
id: addressBookButton
anchors.left: parent.left
anchors.right: parent.right
@@ -507,15 +347,17 @@ Rectangle {
}
}
MoneroComponents.MenuButtonDivider {
Rectangle {
visible: addressBookButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- Receive tab ---------------
MoneroComponents.MenuButton {
MenuButton {
id: receiveButton
anchors.left: parent.left
anchors.right: parent.right
@@ -528,46 +370,22 @@ Rectangle {
panel.receiveClicked()
}
}
MoneroComponents.MenuButtonDivider {
Rectangle {
visible: receiveButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
}
// ------------- Merchant tab ---------------
MoneroComponents.MenuButton {
id: merchantButton
visible: appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Merchant") + translationManager.emptyString
symbol: qsTr("U") + translationManager.emptyString
dotColor: "#FF4F41"
under: receiveButton
onClicked: {
parent.previousButton.checked = false
parent.previousButton = merchantButton
panel.merchantClicked()
}
}
MoneroComponents.MenuButtonDivider {
visible: merchantButton.present && appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- History tab ---------------
MoneroComponents.MenuButton {
MenuButton {
id: historyButton
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Transactions") + translationManager.emptyString
text: qsTr("History") + translationManager.emptyString
symbol: qsTr("H") + translationManager.emptyString
dotColor: "#6B0072"
onClicked: {
@@ -576,18 +394,18 @@ Rectangle {
panel.historyClicked()
}
}
MoneroComponents.MenuButtonDivider {
Rectangle {
visible: historyButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- Advanced tab ---------------
MoneroComponents.MenuButton {
MenuButton {
id: advancedButton
visible: appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Advanced") + translationManager.emptyString
@@ -598,18 +416,19 @@ Rectangle {
parent.previousButton = advancedButton
}
}
MoneroComponents.MenuButtonDivider {
visible: advancedButton.present && appWindow.walletMode >= 2
Rectangle {
visible: advancedButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- Mining tab ---------------
MoneroComponents.MenuButton {
MenuButton {
id: miningButton
visible: !isAndroid && !isIOS && appWindow.walletMode >= 2
visible: !isAndroid && !isIOS
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Mining") + translationManager.emptyString
@@ -623,17 +442,17 @@ Rectangle {
}
}
MoneroComponents.MenuButtonDivider {
visible: miningButton.present && appWindow.walletMode >= 2
Rectangle {
visible: miningButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: miningButton.checked || settingsButton.checked ? "#1C1C1C" : "#313131"
height: 1
}
// ------------- TxKey tab ---------------
MoneroComponents.MenuButton {
MenuButton {
id: txkeyButton
visible: appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Prove/check") + translationManager.emptyString
@@ -646,18 +465,17 @@ Rectangle {
panel.txkeyClicked()
}
}
MoneroComponents.MenuButtonDivider {
visible: txkeyButton.present && appWindow.walletMode >= 2
Rectangle {
visible: txkeyButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- Shared RingDB tab ---------------
MoneroComponents.MenuButton {
MenuButton {
id: sharedringdbButton
visible: appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Shared RingDB") + translationManager.emptyString
@@ -670,18 +488,19 @@ Rectangle {
panel.sharedringdbClicked()
}
}
MoneroComponents.MenuButtonDivider {
visible: sharedringdbButton.present && appWindow.walletMode >= 2
Rectangle {
visible: sharedringdbButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- Sign/verify tab ---------------
MoneroComponents.MenuButton {
MenuButton {
id: signButton
visible: appWindow.walletMode >= 2
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Sign/verify") + translationManager.emptyString
@@ -694,16 +513,16 @@ Rectangle {
panel.signClicked()
}
}
MoneroComponents.MenuButtonDivider {
visible: signButton.present && appWindow.walletMode >= 2
Rectangle {
visible: signButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- Settings tab ---------------
MoneroComponents.MenuButton {
MenuButton {
id: settingsButton
anchors.left: parent.left
anchors.right: parent.right
@@ -716,12 +535,36 @@ Rectangle {
panel.settingsClicked()
}
}
MoneroComponents.MenuButtonDivider {
Rectangle {
visible: settingsButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
// ------------- Sign/verify tab ---------------
MenuButton {
id: keysButton
anchors.left: parent.left
anchors.right: parent.right
text: qsTr("Seed & Keys") + translationManager.emptyString
symbol: qsTr("Y") + translationManager.emptyString
dotColor: "#FFD781"
under: settingsButton
onClicked: {
parent.previousButton.checked = false
parent.previousButton = keysButton
panel.keysClicked()
}
}
Rectangle {
visible: settingsButton.present
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
color: "#313131"
height: 1
}
} // Column
@@ -735,39 +578,50 @@ Rectangle {
anchors.leftMargin: 0
anchors.rightMargin: 0
anchors.bottom: networkStatus.top;
height: 10
height: 10 * scaleRatio
color: "transparent"
}
MoneroComponents.NetworkStatusItem {
NetworkStatusItem {
id: networkStatus
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 5
anchors.leftMargin: 0
anchors.rightMargin: 0
anchors.bottom: (progressBar.visible)? progressBar.top : parent.bottom;
connected: Wallet.ConnectionStatus_Disconnected
height: 48
height: 48 * scaleRatio
}
MoneroComponents.ProgressBar {
ProgressBar {
id: progressBar
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: daemonProgressBar.top
height: 48
syncType: qsTr("Wallet") + translationManager.emptyString
height: 48 * scaleRatio
syncType: qsTr("Wallet")
visible: networkStatus.connected
}
MoneroComponents.ProgressBar {
ProgressBar {
id: daemonProgressBar
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
syncType: qsTr("Daemon") + translationManager.emptyString
syncType: qsTr("Daemon")
visible: networkStatus.connected
height: 62
height: 62 * scaleRatio
}
}
} // menuRect
// indicate disabled state
// Desaturate {
// anchors.fill: parent
// source: parent
// desaturation: panel.enabled ? 0.0 : 1.0
// }
}

View File

@@ -1,80 +1,33 @@
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <QCoreApplication>
#include <QStandardPaths>
#include <QFileInfo>
#include <QString>
#include <QDir>
#include <QDebug>
#include "Logger.h"
#include "wallet/api/wallet2_api.h"
// default log path by OS (should be writable)
static const QString defaultLogName = "monero-wallet-gui.log";
#if defined(Q_OS_IOS)
//AppDataLocation = "<APPROOT>/Library/Application Support"
static const QString default_name = "monero-wallet-gui.log";
#if defined(Q_OS_ANDROID) || defined(Q_OS_IOS)
static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).at(0);
static const QString appFolder = "monero-wallet-gui";
#elif defined(Q_OS_WIN)
//AppDataLocation = "C:/Users/<USER>/AppData/Roaming/<APPNAME>"
static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).at(0);
static const QString appFolder = "monero-wallet-gui";
#elif defined(Q_OS_ANDROID)
//AppDataLocation = "<USER>/<APPNAME>/files"
static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).at(1);
static const QString appFolder = "";
static const QString osPath = QCoreApplication::applicationDirPath();
#elif defined(Q_OS_MAC)
//HomeLocation = "~"
static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0);
static const QString appFolder = "Library/Logs";
static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0) + "/Library/Logs";
#else // linux + bsd
//HomeLocation = "~"
static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0);
static const QString appFolder = ".bitmonero";
#endif
// return the absolute path of the logfile and ensure path folder exists
// return the absolute path of the logfile
const QString getLogPath(const QString logPath)
{
const QFileInfo fi(logPath);
if(!logPath.isEmpty() && !fi.isDir())
return fi.absoluteFilePath();
else {
QDir appDir(osPath + "/" + appFolder);
if(!appDir.exists())
if(!appDir.mkpath("."))
qWarning() << "Logger: Cannot create log directory " + appDir.path();
return appDir.path() + "/" + defaultLogName;
}
else
return osPath + "/" + default_name;
}

View File

@@ -1,31 +1,3 @@
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef LOGGER_H
#define LOGGER_H

View File

@@ -1,31 +1,3 @@
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "MainApp.h"
#include <QCloseEvent>
@@ -38,6 +10,5 @@ bool MainApp::event (QEvent *event)
return true;
}
// Pass unhandled events to base class
return QApplication::event(event);
return false;
}

View File

@@ -1,31 +1,3 @@
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef MAINAPP_H
#define MAINAPP_H
#include <QApplication>

View File

@@ -28,8 +28,9 @@
import QtQml 2.0
import QtQuick 2.9
import QtQuick.Controls 2.0
import QtQuick 2.2
// QtQuick.Controls 2.0 isn't stable enough yet. Needs more testing.
//import QtQuick.Controls 2.0
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
@@ -37,9 +38,6 @@ import moneroComponents.Wallet 1.0
import "./pages"
import "./pages/settings"
import "./pages/merchant"
import "./components" as MoneroComponents
import "./components/effects/" as MoneroEffects
Rectangle {
id: root
@@ -51,13 +49,13 @@ Rectangle {
property string balanceText
property string unlockedBalanceLabelText: qsTr("Unlocked Balance") + translationManager.emptyString
property string unlockedBalanceText
property int minHeight: (appWindow.height > 800) ? appWindow.height : 800
property int minHeight: (appWindow.height > 800) ? appWindow.height : 800 * scaleRatio
property alias contentHeight: mainFlickable.contentHeight
property alias flickable: mainFlickable
// property int headerHeight: header.height
property Transfer transferView: Transfer { }
property Receive receiveView: Receive { }
property Merchant merchantView: Merchant { }
property TxKey txkeyView: TxKey { }
property SharedRingDB sharedringdbView: SharedRingDB { }
property History historyView: History { }
@@ -66,7 +64,7 @@ Rectangle {
property Mining miningView: Mining { }
property AddressBook addressBookView: AddressBook { }
property Keys keysView: Keys { }
property Account accountView: Account { }
signal paymentClicked(string address, string paymentId, string amount, int mixinCount, int priority, string description)
signal sweepUnmixableClicked()
@@ -74,25 +72,12 @@ Rectangle {
signal getProofClicked(string txid, string address, string message);
signal checkProofClicked(string txid, string address, string message, string signature);
Rectangle {
// grey background on merchantView
visible: currentView === merchantView
color: MoneroComponents.Style.moneroGrey
anchors.fill: parent
}
MoneroEffects.GradientBackground {
visible: currentView !== merchantView
anchors.fill: parent
fallBackColor: MoneroComponents.Style.middlePanelBackgroundColor
initialStartColor: MoneroComponents.Style.middlePanelBackgroundGradientStart
initialStopColor: MoneroComponents.Style.middlePanelBackgroundGradientStop
blackColorStart: MoneroComponents.Style._b_middlePanelBackgroundGradientStart
blackColorStop: MoneroComponents.Style._b_middlePanelBackgroundGradientStop
whiteColorStart: MoneroComponents.Style._w_middlePanelBackgroundGradientStart
whiteColorStop: MoneroComponents.Style._w_middlePanelBackgroundGradientStop
start: Qt.point(0, 0)
end: Qt.point(height, width)
Image {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
source: "../images/middlePanelBg.jpg"
}
onCurrentViewChanged: {
@@ -123,65 +108,60 @@ Rectangle {
states: [
State {
name: "Dashboard"
PropertyChanges { }
}, State {
name: "History"
PropertyChanges { target: root; currentView: historyView }
PropertyChanges { target: mainFlickable; contentHeight: historyView.contentHeight + 80}
PropertyChanges { target: historyView; model: appWindow.currentWallet ? appWindow.currentWallet.historyModel : null }
PropertyChanges { target: mainFlickable; contentHeight: historyView.tableHeight + 220 * scaleRatio }
}, State {
name: "Transfer"
PropertyChanges { target: root; currentView: transferView }
PropertyChanges { target: mainFlickable; contentHeight: transferView.transferHeight1 + transferView.transferHeight2 + 80 }
PropertyChanges { target: mainFlickable; contentHeight: 1000 * scaleRatio }
}, State {
name: "Receive"
PropertyChanges { target: root; currentView: receiveView }
PropertyChanges { target: mainFlickable; contentHeight: receiveView.receiveHeight + 80 }
name: "Receive"
PropertyChanges { target: root; currentView: receiveView }
PropertyChanges { target: mainFlickable; contentHeight: receiveView.receiveHeight + 100 }
}, State {
name: "Merchant"
PropertyChanges { target: root; currentView: merchantView }
PropertyChanges { target: mainFlickable; contentHeight: merchantView.merchantHeight + 80 }
name: "TxKey"
PropertyChanges { target: root; currentView: txkeyView }
PropertyChanges { target: mainFlickable; contentHeight: 1200 * scaleRatio }
}, State {
name: "TxKey"
PropertyChanges { target: root; currentView: txkeyView }
PropertyChanges { target: mainFlickable; contentHeight: txkeyView.txkeyHeight + 80 }
}, State {
name: "SharedRingDB"
PropertyChanges { target: root; currentView: sharedringdbView }
PropertyChanges { target: mainFlickable; contentHeight: sharedringdbView.panelHeight + 80 }
name: "SharedRingDB"
PropertyChanges { target: root; currentView: sharedringdbView }
PropertyChanges { target: mainFlickable; contentHeight: sharedringdbView.panelHeight + 100 }
}, State {
name: "AddressBook"
PropertyChanges { target: root; currentView: addressBookView }
PropertyChanges { target: mainFlickable; contentHeight: addressBookView.addressbookHeight + 80 }
PropertyChanges { target: root; currentView: addressBookView }
PropertyChanges { target: mainFlickable; contentHeight: minHeight }
}, State {
name: "Sign"
PropertyChanges { target: root; currentView: signView }
PropertyChanges { target: mainFlickable; contentHeight: signView.signHeight + 80 }
PropertyChanges { target: root; currentView: signView }
PropertyChanges { target: mainFlickable; contentHeight: 1200 * scaleRatio }
}, State {
name: "Settings"
PropertyChanges { target: root; currentView: settingsView }
PropertyChanges { target: mainFlickable; contentHeight: settingsView.settingsHeight }
PropertyChanges { target: root; currentView: settingsView }
PropertyChanges { target: mainFlickable; contentHeight: settingsView.settingsHeight }
}, State {
name: "Mining"
PropertyChanges { target: root; currentView: miningView }
PropertyChanges { target: mainFlickable; contentHeight: miningView.miningHeight + 80 }
PropertyChanges { target: mainFlickable; contentHeight: minHeight }
}, State {
name: "Keys"
PropertyChanges { target: root; currentView: keysView }
PropertyChanges { target: mainFlickable; contentHeight: keysView.keysHeight + 80}
}, State {
name: "Account"
PropertyChanges { target: root; currentView: accountView }
PropertyChanges { target: mainFlickable; contentHeight: accountView.accountHeight + 80 }
}
PropertyChanges { target: mainFlickable; contentHeight: minHeight + 200 * scaleRatio }
}
]
// color stripe at the top
Row {
id: styledRow
visible: currentView !== merchantView
height: 4
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
z: parent.z + 1
Rectangle { height: 4; width: parent.width / 5; color: "#FFE00A" }
Rectangle { height: 4; width: parent.width / 5; color: "#6B0072" }
@@ -192,13 +172,7 @@ Rectangle {
ColumnLayout {
anchors.fill: parent
anchors.margins: {
if(currentView === merchantView || currentView === historyView)
return 0;
return 20;
}
anchors.margins: 18
anchors.topMargin: appWindow.persistentSettings.customDecorations ? 50 : 0
spacing: 0
@@ -208,20 +182,14 @@ Rectangle {
Layout.fillHeight: true
clip: true
ScrollBar.vertical: ScrollBar {
parent: mainFlickable.parent
anchors.left: parent.right
anchors.leftMargin: 3
anchors.top: parent.top
anchors.topMargin: 4
anchors.bottom: parent.bottom
anchors.bottomMargin: persistentSettings.customDecorations ? 4 : 0
}
onFlickingChanged: {
releaseFocus();
}
// Disabled scrollbars, gives crash on startup on windows
// ScrollIndicator.vertical: ScrollIndicator { }
// ScrollBar.vertical: ScrollBar { } // uncomment to test
// Views container
StackView {
id: stackView
@@ -256,28 +224,11 @@ Rectangle {
// border
Rectangle {
id: borderLeft
visible: middlePanel.state !== "Merchant"
anchors.top: styledRow.bottom
anchors.bottom: parent.bottom
anchors.left: parent.left
width: 1
color: MoneroComponents.Style.appWindowBorderColor
MoneroEffects.ColorTransition {
targetObj: parent
blackColor: MoneroComponents.Style._b_appWindowBorderColor
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
}
}
// border shadow
Image {
source: "qrc:///images/middlePanelShadow.png"
width: 12
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: borderLeft.right
color: "#313131"
}
/* connect "payment" click */

View File

@@ -1,6 +1,6 @@
# Monero GUI
Copyright (c) 2014-2019, The Monero Project
Copyright (c) 2014-2018, The Monero Project
## Development resources
@@ -9,7 +9,6 @@ Copyright (c) 2014-2019, The Monero Project
- Mail: [dev@getmonero.org](mailto:dev@getmonero.org)
- Github: [https://github.com/monero-project/monero-gui](https://github.com/monero-project/monero-gui)
- IRC: [#monero-dev on Freenode](irc://chat.freenode.net/#monero-dev)
- Translation platform (Pootle): [translate.getmonero.org](https://translate.getmonero.org)
## Vulnerability response
@@ -56,13 +55,6 @@ There are also several mining pools that kindly donate a portion of their fees,
See [LICENSE](LICENSE).
## Translations
Do you speak a second language and would like to help translate the Monero GUI? Check out Pootle, our localization platform, at [translate.getmonero.org](https://translate.getmonero.org/projects/monero-gui/). Choose the language and suggest a translation for a string or review an existing one. The Localization Workgroup made [a guide with step-by-step instructions](https://github.com/monero-ecosystem/monero-translations/blob/master/pootle.md) for Pootle.
&nbsp;
If you need help/support or any info you can contact the localization workgroup on the IRC channel #monero-translations (relayed on matrix/riot and MatterMost) or by email at translate[at]getmonero[dot]org. For more info about the Localization workgroup: [github.com/monero-ecosystem/monero-translations](https://github.com/monero-ecosystem/monero-translations)
## Installing the Monero GUI from a package
Packages are available for
@@ -83,27 +75,19 @@ Packaging for your favorite distribution would be a welcome contribution!
- For Debian distributions (Debian, Ubuntu, Mint, Tails...)
`sudo apt install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev`
`sudo apt install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev`
- For Gentoo
`sudo emerge app-arch/xz-utils app-doc/doxygen dev-cpp/gtest dev-libs/boost dev-libs/expat dev-libs/openssl dev-util/cmake media-gfx/graphviz net-dns/unbound net-libs/ldns net-libs/miniupnpc net-libs/zeromq sys-libs/libunwind dev-libs/libsodium dev-libs/hidapi`
- For Fedora
`sudo dnf install make automake cmake gcc-c++ boost-devel miniupnpc-devel graphviz doxygen unbound-devel libunwind-devel pkgconfig openssl-devel libcurl-devel hidapi-devel libusb-devel`
`sudo emerge app-arch/xz-utils app-doc/doxygen dev-cpp/gtest dev-libs/boost dev-libs/expat dev-libs/openssl dev-util/cmake media-gfx/graphviz net-dns/unbound net-libs/ldns net-libs/miniupnpc net-libs/zeromq sys-libs/libunwind dev-libs/libsodium`
2. Install Qt:
*Note*: Qt 5.9.7 is the minimum version required to build the GUI. This makes **some** distributions (mostly based on debian, like Ubuntu 16.x or Linux Mint 18.x) obsolete due to their repositories containing an older Qt version.
The recommended way is to install 5.9.7 from the [official Qt installer](https://www.qt.io/download-qt-installer) or [compiling it yourself](https://wiki.qt.io/Install_Qt_5_on_Ubuntu). This ensures you have the correct version. Higher versions *can* work but as it differs from our production build target, slight differences may occur.
The following instructions will fetch Qt from your distribution's repositories instead. Take note of what version it installs. Your mileage may vary.
*Note*: Qt 5.7 is the minimum version required to build the GUI. This makes **some** distributions (mostly based on debian, like Ubuntu 16.x or Linux Mint 18.x) obsolete. You can still build the GUI if you install an [official Qt release](https://wiki.qt.io/Install_Qt_5_on_Ubuntu), but this is not officially supported.
- For Ubuntu 17.10+
`sudo apt install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev`
`sudo apt install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools`
- For Gentoo
@@ -143,7 +127,7 @@ The executable can be found in the build/release/bin folder.
3. Install [monero](https://github.com/monero-project/monero) dependencies:
`brew install boost`
`brew install boost --c++11`
`brew install openssl` - to install openssl headers
@@ -157,7 +141,7 @@ The executable can be found in the build/release/bin folder.
4. Install Qt:
`brew install qt5` (or download QT 5.9.7+ from [qt.io](https://www.qt.io/download-open-source/))
`brew install qt5` (or download QT 5.8+ from [qt.io](https://www.qt.io/download-open-source/))
If you have an older version of Qt installed via homebrew, you can force it to use 5.x like so:
@@ -165,7 +149,7 @@ The executable can be found in the build/release/bin folder.
5. Add the Qt bin directory to your path
Example: `export PATH=$PATH:$HOME/Qt/5.9.7/clang_64/bin`
Example: `export PATH=$PATH:$HOME/Qt/5.8/clang_64/bin`
This is the directory where Qt 5.x is installed on **your** system
@@ -185,7 +169,7 @@ The executable can be found in the `build/release/bin` folder.
**Note:** Workaround for "ERROR: Xcode not set up properly"
Edit `$HOME/Qt/5.9.7/clang_64/mkspecs/features/mac/default_pre.prf`
Edit `$HOME/Qt/5.8/clang_64/mkspecs/features/mac/default_pre.prf`
replace
`isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))`
@@ -207,15 +191,9 @@ The Monero GUI on Windows is 64 bits only; 32-bit Windows GUI builds are not off
3. Install MSYS2 packages for Monero dependencies; the needed 64-bit packages have `x86_64` in their names
```
pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb
pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi
```
Optional : To build the flag `WITH_SCANNER`
```
pacman -S mingw-w64-x86_64-zbar
```
You find more details about those dependencies in the [Monero documentation](https://github.com/monero-project/monero). Note that that there is no more need to compile Boost from source; like everything else, you can install it now with a MSYS2 package.
4. Install Qt5
@@ -242,11 +220,9 @@ The Monero GUI on Windows is 64 bits only; 32-bit Windows GUI builds are not off
```
cd monero-gui
source ./build.sh release-static
./build.sh
cd build
make deploy
```
**Note:** The use of `source` above is a dirty workaround for a suspected bug in the current QT version 5.11.2-3 available in the MSYS2 packaging system, see https://github.com/monero-project/monero-gui/issues/1559 for more info.
The executable can be found in the `.\release\bin` directory.

View File

@@ -1,21 +1,21 @@
// Copyright (c) 2014-2019, The Monero Project
//
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
@@ -26,11 +26,16 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef MIME_H
#define MIME_H
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QtGraphicalEffects 1.0
#include <QApplication>
import "tabs"
import "components"
void registerXdgMime(QApplication &app);
#endif // MIME_H
Rectangle {
id: root
width: 330
color: "#FFFFFF"
}

View File

@@ -1,31 +1,3 @@
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "TranslationManager.h"
#include <QApplication>

View File

@@ -1,31 +1,3 @@
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef TRANSLATIONMANAGER_H
#define TRANSLATIONMANAGER_H

View File

@@ -1,7 +1,6 @@
#!/bin/bash
BUILD_TYPE=$1
BUILD_TREZOR=${BUILD_TREZOR-true}
source ./utils.sh
platform=$(get_platform)
# default build type
@@ -73,7 +72,6 @@ if [[ $platform == *bsd* ]]; then
fi
# build libwallet
export BUILD_TREZOR
./get_libwallet_api.sh $BUILD_TYPE
# build zxcvbn

View File

@@ -38,7 +38,3 @@ void clipboardAdapter::setText(const QString &text) {
m_pClipboard->setText(text, QClipboard::Clipboard);
m_pClipboard->setText(text, QClipboard::Selection);
}
QString clipboardAdapter::text() const {
return m_pClipboard->text();
}

View File

@@ -1,21 +1,21 @@
// Copyright (c) 2014-2019, The Monero Project
//
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
@@ -39,7 +39,6 @@ class clipboardAdapter : public QObject
public:
explicit clipboardAdapter(QObject *parent = 0);
Q_INVOKABLE void setText(const QString &text);
Q_INVOKABLE QString text() const;
private:
QClipboard *m_pClipboard;

View File

@@ -0,0 +1,171 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import moneroComponents.Clipboard 1.0
ListView {
id: listView
clip: true
boundsBehavior: ListView.StopAtBounds
footer: Rectangle {
height: 127
width: listView.width
color: "transparent"
Text {
anchors.centerIn: parent
font.family: "Arial"
font.pixelSize: 14
color: "#808080"
text: qsTr("No more results") + translationManager.emptyString
}
}
property var previousItem
delegate: Rectangle {
id: delegate
height: 64
width: listView.width
color: "transparent"
z: listView.count - index
function collapseDropdown() { dropdown.expanded = false }
Text {
id: descriptionText
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 12
width: text.length ? (descriptionArea.containsMouse ? 139 : 139) : 0
font.family: "Arial"
font.bold: true
font.pixelSize: 19
color: "#ffffff"
elide: Text.ElideRight
text: description
MouseArea {
id: descriptionArea
anchors.fill: parent
hoverEnabled: true
}
}
TextEdit {
id: addressText
selectByMouse: true
anchors.bottom: descriptionText.bottom
anchors.left: descriptionText.right
anchors.right: dropdown.left
anchors.leftMargin: description.length > 0 ? 12 : 0
anchors.rightMargin: 40
font.family: "Arial"
font.pixelSize: 16
color: "#ffffff"
text: address
readOnly: true
}
Text {
id: paymentLabel
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.bottomMargin: 12
width: 139
font.family: "Arial"
font.pixelSize: 12
color: "#ffffff"
text: qsTr("Payment ID:") + translationManager.emptyString
}
TextEdit {
selectByMouse: true;
anchors.bottom: paymentLabel.bottom
anchors.left: paymentLabel.right
anchors.leftMargin: 12
anchors.rightMargin: 12
anchors.right: dropdown.left
readOnly: true
font.family: "Arial"
font.pixelSize: 13
color: "#545454"
text: paymentId
}
ListModel {
id: dropModel
ListElement { name: "<b>Copy address to clipboard</b>"; icon: "../images/dropdownCopy.png" }
ListElement { name: "<b>Send to this address</b>"; icon: "../images/dropdownSend.png" }
// ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
ListElement { name: "<b>Remove from address book</b>"; icon: "../images/dropdownDel.png" }
}
Clipboard { id: clipboard }
TableDropdown {
id: dropdown
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: 5
dataModel: dropModel
z: 1
onExpandedChanged: {
if(expanded) {
listView.previousItem = delegate
listView.currentIndex = index
}
}
onOptionClicked: {
// Ensure tooltip is closed
appWindow.toolTip.visible = false;
if(option === 0) {
clipboard.setText(address)
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3)
}
else if(option === 1){
console.log("Sending to: ", address +" "+ paymentId);
middlePanel.sendTo(address, paymentId, description);
leftPanel.selectItem(middlePanel.state)
} else if(option === 2){
console.log("Delete: ", rowId);
currentWallet.addressBookModel.deleteRow(rowId);
}
}
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 1
color: "#404040"
}
}
}

View File

@@ -26,29 +26,22 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Layouts 1.1
import FontAwesome 1.0
import "." as MoneroComponents
import "effects/" as MoneroEffects
import "../components" as MoneroComponents
Item {
RowLayout {
id: checkBox
property alias text: label.text
property string checkedIcon: "qrc:///images/check-white.svg"
property string checkedIcon: "../images/checkedIcon-black.png"
property string uncheckedIcon
property int imgWidth: 13
property int imgHeight: 13
property bool checked: false
property alias background: backgroundRect.color
property bool border: true
property int fontSize: 14
property int fontSize: 14 * scaleRatio
property alias fontColor: label.color
property bool iconOnTheLeft: true
signal clicked()
height: 25
width: checkBoxLayout.width
height: 25 * scaleRatio
function toggle(){
checkBox.checked = !checkBox.checked
@@ -56,61 +49,61 @@ Item {
}
RowLayout {
id: checkBoxLayout
layoutDirection: iconOnTheLeft ? Qt.LeftToRight : Qt.RightToLeft
spacing: (!isMobile ? 10 : 8)
Layout.fillWidth: true
Rectangle {
anchors.left: parent.left
width: 25 * scaleRatio
height: checkBox.height - 1
radius: 3
y: 0
color: "transparent"
border.color:
if(checkBox.checked){
return MoneroComponents.Style.inputBorderColorActive;
} else {
return MoneroComponents.Style.inputBorderColorInActive;
}
}
Item {
id: checkMark
height: checkBox.height
width: checkBox.height
Rectangle {
id: backgroundRect
anchors.left: parent.left
width: 25 * scaleRatio
height: checkBox.height - 1
y: 1
color: "transparent"
Rectangle {
id: backgroundRect
visible: checkBox.border
anchors.fill: parent
radius: 3
color: "transparent"
border.color:
if(checkBox.checked){
return MoneroComponents.Style.inputBorderColorActive;
} else {
return MoneroComponents.Style.inputBorderColorInActive;
}
Image {
anchors.centerIn: parent
source: checkBox.checkedIcon
visible: checkBox.checked
}
MoneroEffects.ImageMask {
id: img
visible: checkBox.checked || checkBox.uncheckedIcon != ""
anchors.centerIn: parent
width: checkBox.imgWidth
height: checkBox.imgHeight
color: MoneroComponents.Style.defaultFontColor
fontAwesomeFallbackIcon: FontAwesome.plus
fontAwesomeFallbackSize: 14
image: {
if (checkBox.checked || checkBox.uncheckedIcon == "")
return checkBox.checkedIcon;
return checkBox.uncheckedIcon;
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
toggle()
}
}
}
MoneroComponents.TextPlain {
Text {
id: label
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: checkBox.fontSize
color: MoneroComponents.Style.defaultFontColor
textFormat: Text.RichText
wrapMode: Text.Wrap
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
toggle()
Layout.fillWidth: true
anchors.left: backgroundRect.right
anchors.leftMargin: !isMobile ? 10 : 8
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
toggle()
}
}
}
}
}

View File

@@ -26,24 +26,24 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
import FontAwesome 1.0
import "." 1.0
import "." as MoneroComponents
import "effects/" as MoneroEffects
RowLayout {
id: checkBox
property alias text: label.text
property string checkedIcon: "../images/checkedIcon-black.png"
property string uncheckedIcon
property bool checked: false
property int fontSize: 14
property string background: "backgroundRect.color"
property int fontSize: 14 * scaleRatio
property alias fontColor: label.color
property int textMargin: 8
property int textMargin: 8 * scaleRatio
property bool darkDropIndicator: false
signal clicked()
height: 25
height: 25 * scaleRatio
function toggle(){
checkBox.checked = !checkBox.checked
@@ -57,8 +57,9 @@ RowLayout {
height: label.height
width: (label.width + indicatorRect.width + checkBox.textMargin)
color: "transparent"
anchors.left: parent.left
MoneroComponents.TextPlain {
Text {
id: label
font.family: Style.fontLight.name
font.pixelSize: checkBox.fontSize
@@ -75,29 +76,23 @@ RowLayout {
anchors.left: label.right
anchors.leftMargin: textMargin
color: "transparent"
rotation: checkBox.checked ? 180 : 0
rotation: checkBox.checked ? 180 * scaleRatio : 0
MoneroEffects.ImageMask {
Image {
id: indicatorImage
anchors.centerIn: parent
width: 12
height: 8
image: "qrc:///images/whiteDropIndicator.png"
color: MoneroComponents.Style.defaultFontColor
opacity: MoneroComponents.Style.blackTheme ? 1 : 0.75
fontAwesomeFallbackIcon: FontAwesome.arrowDown
fontAwesomeFallbackSize: 14
MoneroEffects.ColorTransition {
targetObj: indicatorImage
blackColor: "white"
whiteColor: "black"
duration: 500
}
source: "../images/whiteDropIndicator.png"
visible: !darkDropIndicator
}
ColorOverlay {
anchors.fill: indicatorImage
source: indicatorImage
color: "#FF000000"
visible: darkDropIndicator
}
}
MouseArea {
MouseArea{
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
@@ -106,5 +101,7 @@ RowLayout {
}
}
}
}
}

View File

@@ -26,15 +26,14 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.2
import "." as MoneroComponents
import "effects/" as MoneroEffects
import "../components" as MoneroComponents
import "../js/Windows.js" as Windows
import "../js/Utils.js" as Utils
@@ -65,18 +64,10 @@ Window {
width: 480
height: 280
// background
MoneroEffects.GradientBackground {
// background gradient
Image {
anchors.fill: parent
fallBackColor: MoneroComponents.Style.middlePanelBackgroundColor
initialStartColor: MoneroComponents.Style.middlePanelBackgroundGradientStart
initialStopColor: MoneroComponents.Style.middlePanelBackgroundGradientStop
blackColorStart: MoneroComponents.Style._b_middlePanelBackgroundGradientStart
blackColorStop: MoneroComponents.Style._b_middlePanelBackgroundGradientStop
whiteColorStart: MoneroComponents.Style._w_middlePanelBackgroundGradientStart
whiteColorStop: MoneroComponents.Style._w_middlePanelBackgroundGradientStop
start: Qt.point(0, 0)
end: Qt.point(height, width)
source: "../images/middlePanelBg.jpg"
}
// Make window draggable
@@ -92,21 +83,14 @@ Window {
id: mainLayout
anchors.fill: parent
anchors.topMargin: 20
anchors.margins: 35
spacing: 20
anchors.topMargin: 20 * scaleRatio
anchors.margins: 35 * scaleRatio
spacing: 20 * scaleRatio
Item {
Layout.fillHeight: true
RowLayout {
id: content
Layout.fillWidth: true
Rectangle {
anchors.fill: parent
color: "transparent"
border.color: MoneroComponents.Style.inputBorderColorActive
border.width: 1
radius: 4
}
Layout.fillHeight: true
Flickable {
id: flickable
@@ -117,23 +101,31 @@ Window {
textFormat: TextEdit.RichText
selectByMouse: true
selectByKeyboard: true
font.family: MoneroComponents.Style.defaultFontColor
font.pixelSize: 14
anchors.fill: parent
font.family: "Ariel"
font.pixelSize: 14 * scaleRatio
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
selectionColor: MoneroComponents.Style.dimmedFontColor
wrapMode: TextEdit.Wrap
readOnly: true
background: Rectangle {
color: "transparent"
anchors.fill: parent
border.color: Qt.rgba(255, 255, 255, 0.25);
border.width: 1
radius: 4
}
function logCommand(msg){
msg = log_color(msg, MoneroComponents.Style.blackTheme ? "lime" : "#009100");
msg = log_color(msg, "lime");
textArea.append(msg);
}
function logMessage(msg){
msg = msg.trim();
var color = MoneroComponents.Style.defaultFontColor;
var color = "white";
if(msg.toLowerCase().indexOf('error') >= 0){
color = MoneroComponents.Style.errorColor;
color = "red";
} else if (msg.toLowerCase().indexOf('warning') >= 0){
color = MoneroComponents.Style.warningColor;
color = "yellow";
}
// format multi-lines
@@ -164,7 +156,15 @@ Window {
}
}
ScrollBar.vertical: ScrollBar {}
ScrollBar.vertical: ScrollBar {
// TODO: scrollbar always visible is buggy.
// QT 5.9 introduces `policy: ScrollBar.AlwaysOn`
contentItem.opacity: 1
anchors.top: flickable.top
anchors.left: flickable.right
anchors.leftMargin: 10 * scaleRatio
anchors.bottom: flickable.bottom
}
}
}

View File

@@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
@@ -89,14 +89,12 @@ Window {
}
}
MoneroComponents.TextPlain {
text: qsTr("Starting local node in %1 seconds").arg(countDown) + translationManager.emptyString;
Text {
text: qsTr("Starting local node in %1 seconds").arg(countDown);
font.pixelSize: 18
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
themeTransition: false
color: "black"
}
}
@@ -110,7 +108,7 @@ Window {
id: okButton
visible:false
fontSize: 14
text: qsTr("Start daemon (%1)").arg(countDown) + translationManager.emptyString
text: qsTr("Start daemon (%1)").arg(countDown)
KeyNavigation.tab: cancelButton
onClicked: {
timer.stop();
@@ -123,7 +121,7 @@ Window {
MoneroComponents.StandardButton {
id: cancelButton
fontSize: 14
text: qsTr("Use custom settings") + translationManager.emptyString
text: qsTr("Use custom settings")
onClicked: {
timer.stop();

View File

@@ -0,0 +1,252 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import moneroComponents.Clipboard 1.0
ListView {
id: listView
clip: true
boundsBehavior: ListView.StopAtBounds
footer: Rectangle {
height: 127
width: listView.width
color: "#FFFFFF"
Text {
anchors.centerIn: parent
font.family: "Arial"
font.pixelSize: 14
color: "#545454"
text: qsTr("No more results") + translationManager.emptyString
}
}
property var previousItem
delegate: Rectangle {
id: delegate
height: 90
width: listView.width
color: index % 2 ? "#F8F8F8" : "#FFFFFF"
z: listView.count - index
function collapseDropdown() { dropdown.expanded = false }
Row {
id: row1
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 14
Rectangle {
id: dot
width: 14
height: width
radius: width / 2
color: out ? "#FF4F41" : "#36B05B"
}
Item { //separator
width: 12
height: 14
}
Text {
id: descriptionText
width: text.length ? (descriptionArea.containsMouse ? parent.width - x - 12 : 120) : 0
anchors.verticalCenter: dot.verticalCenter
font.family: "Arial"
font.bold: true
font.pixelSize: 19
color: "#444444"
elide: Text.ElideRight
text: description
MouseArea {
id: descriptionArea
anchors.fill: parent
hoverEnabled: true
}
}
Item { //separator
width: descriptionText.width ? 12 : 0
height: 14
visible: !descriptionArea.containsMouse
}
Text {
id: addressText
anchors.verticalCenter: dot.verticalCenter
width: parent.width - x - 12
elide: Text.ElideRight
font.family: "Arial"
font.pixelSize: 14
color: "#545454"
text: address
visible: !descriptionArea.containsMouse
}
}
Row {
anchors.left: parent.left
anchors.top: row1.bottom
anchors.topMargin: 8
spacing: 12
Item { //separator
width: 14
height: 14
}
Column {
anchors.top: parent.top
width: 215
Text {
anchors.left: parent.left
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
text: qsTr("Date") + translationManager.emptyString
}
Row {
anchors.left: parent.left
anchors.right: parent.right
spacing: 33
Text {
font.family: "Arial"
font.pixelSize: 18
color: "#000000"
text: date
}
Text {
font.family: "Arial"
font.pixelSize: 18
color: "#000000"
text: time
}
}
}
Column {
anchors.top: parent.top
width: 148
Text {
anchors.left: parent.left
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
text: qsTr("Balance") + translationManager.emptyString
}
Text {
font.family: "Arial"
font.pixelSize: 18
color: "#000000"
text: balance
}
}
Column {
anchors.top: parent.top
width: 148
Text {
anchors.left: parent.left
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
text: qsTr("Amount") + translationManager.emptyString
}
Row {
spacing: 2
Text {
anchors.bottom: parent.bottom
anchors.bottomMargin: 3
font.family: "Arial"
font.pixelSize: 16
color: out ? "#FF4F41" : "#36B05B"
text: out ? "↓" : "↑"
}
Text {
anchors.bottom: parent.bottom
font.family: "Arial"
font.pixelSize: 18
color: out ? "#FF4F41" : "#36B05B"
text: amount
}
}
}
}
ListModel {
id: dropModel
ListElement { name: "<b>Copy address to clipboard</b>"; icon: "../images/dropdownCopy.png" }
ListElement { name: "<b>Add to address book</b>"; icon: "../images/dropdownAdd.png" }
ListElement { name: "<b>Send to this address</b>"; icon: "../images/dropdownSend.png" }
ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
}
Clipboard { id: clipboard }
TableDropdown {
id: dropdown
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 11
anchors.rightMargin: 5
dataModel: dropModel
z: 1
onExpandedChanged: {
if(expanded) {
listView.previousItem = delegate
listView.currentIndex = index
}
}
onOptionClicked: {
if(option === 0)
clipboard.setText(address)
}
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 1
color: "#DBDBDB"
}
}
}

View File

@@ -26,22 +26,18 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.2
import QtGraphicalEffects 1.0
import QtQuick.Controls.Styles 1.2
import "." as MoneroComponents
import "effects/" as MoneroEffects
import "../components" as MoneroComponents
Item {
id: datePicker
z: parent.z + 1
property bool expanded: false
property date currentDate
property bool showCurrentDate: true
property color backgroundColor : MoneroComponents.Style.appWindowBorderColor
property color backgroundColor : "#404040"
property color errorColor : "red"
property bool error: false
property alias inputLabel: inputLabel
@@ -71,7 +67,7 @@ Item {
height: 22
width: parent.width
MoneroComponents.TextPlain {
Text {
id: inputLabel
anchors.top: parent.top
anchors.topMargin: 2
@@ -81,7 +77,6 @@ Item {
font.bold: false
textFormat: Text.RichText
color: MoneroComponents.Style.defaultFontColor
themeTransition: false
MouseArea {
anchors.fill: parent
@@ -94,7 +89,7 @@ Item {
Item {
id: head
anchors.top: inputLabelRect.bottom
anchors.topMargin: 6
anchors.topMargin: 6 * scaleRatio
anchors.left: parent.left
anchors.right: parent.right
height: 28
@@ -111,14 +106,45 @@ Item {
color: datePicker.backgroundColor
}
RowLayout {
Item {
id: buttonItem
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.margins: 4
width: height
Image {
id: button
anchors.centerIn: parent
source: "../images/whiteDropIndicator.png"
rotation: datePicker.expanded ? 180 : 0
}
MouseArea {
anchors.fill: parent
onClicked: datePicker.expanded = !datePicker.expanded
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
}
}
Rectangle {
id: separator
anchors.verticalCenter: parent.verticalCenter
anchors.right: buttonItem.left
anchors.rightMargin: 4
height: 16
width: 1
color: "#808080"
visible: datePicker.expanded
}
Row {
id: dateInput
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 2
anchors.right: parent.right
property string headerFontColor: MoneroComponents.Style.blackTheme ? "#e6e6e6" : "#333333"
spacing: 0
anchors.leftMargin: 10
function setDate(date) {
var day = date.getDate()
@@ -138,14 +164,12 @@ Item {
TextInput {
id: dayInput
readOnly: true
Layout.preferredWidth: childrenRect.width + 40
width: 22
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: datePicker.error ? errorColor : parent.headerFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectByMouse: true
horizontalAlignment: TextInput.AlignHCenter
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor
maximumLength: 2
horizontalAlignment: TextInput.AlignHCenter
validator: IntValidator{bottom: 01; top: 31;}
KeyNavigation.tab: monthInput
@@ -163,25 +187,22 @@ Item {
}
}
MoneroComponents.TextPlain {
Text {
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor
text: "-"
themeTransition: false
}
TextInput {
id: monthInput
readOnly: true
Layout.preferredWidth: childrenRect.width + 40
width: 22
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: datePicker.error ? errorColor : parent.headerFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectByMouse: true
horizontalAlignment: TextInput.AlignHCenter
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor
maximumLength: 2
horizontalAlignment: TextInput.AlignHCenter
validator: IntValidator{bottom: 01; top: 12;}
KeyNavigation.tab: yearInput
text: {
@@ -198,27 +219,23 @@ Item {
}
}
MoneroComponents.TextPlain {
Text {
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor
text: "-"
themeTransition: false
}
TextInput {
id: yearInput
Layout.preferredWidth: childrenRect.width + 60
width: 44
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
color: datePicker.error ? errorColor : parent.headerFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectByMouse: true
horizontalAlignment: TextInput.AlignHCenter
color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor
maximumLength: 4
horizontalAlignment: TextInput.AlignHCenter
validator: IntValidator{bottom: 1000; top: 9999;}
text: if(datePicker.showCurrentDate) datePicker.currentDate.getFullYear()
onFocusChanged: {
if(focus === false) {
var d = new Date()
@@ -228,36 +245,6 @@ Item {
}
}
}
Rectangle {
Layout.preferredHeight: parent.height
Layout.fillWidth: true
color: "transparent"
Image {
id: button
anchors.right: parent.right
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
source: "qrc:///images/whiteDropIndicator.png"
visible: false
}
ColorOverlay {
source: button
anchors.fill: button
color: MoneroComponents.Style.defaultFontColor
rotation: datePicker.expanded ? 180 : 0
opacity: 1
}
MouseArea {
anchors.fill: parent
onClicked: datePicker.expanded = !datePicker.expanded
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
}
}
}
}
@@ -266,12 +253,12 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: head.bottom
anchors.topMargin: 10
color: MoneroComponents.Style.middlePanelBackgroundColor
color: "#FFFFFF"
border.width: 1
border.color: MoneroComponents.Style.appWindowBorderColor
border.color: "#DBDBDB"
height: datePicker.expanded ? calendar.height + 2 : 0
clip: true
//radius: 4
Behavior on height {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
@@ -283,7 +270,7 @@ Item {
anchors.leftMargin: 1
anchors.rightMargin: 1
anchors.top: parent.top
color: MoneroComponents.Style.appWindowBorderColor
color: "#FFFFFF"
height: 1
}
@@ -293,58 +280,40 @@ Item {
anchors.right: parent.right
anchors.top: parent.top
anchors.margins: 1
anchors.bottomMargin: 10
height: 220
height: 180
frameVisible: false
style: CalendarStyle {
gridVisible: false
background: Rectangle { color: MoneroComponents.Style.middlePanelBackgroundColor }
background: Rectangle { color: "transparent" }
dayDelegate: Item {
z: parent.z + 1
implicitHeight: implicitWidth
implicitWidth: calendar.width / 7
Rectangle {
id: dayRect
anchors.fill: parent
radius: parent.implicitHeight / 2
color: {
if(dayArea.pressed && styleData.visibleMonth)
return MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
return "transparent";
}
color: dayArea.pressed && styleData.visibleMonth ? "#FF6C3B" : "transparent"
}
MoneroComponents.TextPlain {
id: dayText
Text {
anchors.centerIn: parent
font.family: MoneroComponents.Style.fontMonoRegular.name
font.pixelSize: {
if(!styleData.visibleMonth) return 12
return 14
}
font.bold: {
if(dayArea.pressed || styleData.visibleMonth) return true;
return false;
}
font.family: "Arial"
font.pixelSize: 12
font.bold: dayArea.pressed
text: styleData.date.getDate()
themeTransition: false
color: {
if(!styleData.visibleMonth) return MoneroComponents.Style.lightGreyFontColor
if(dayArea.pressed) return MoneroComponents.Style.defaultFontColor
if(styleData.today) return MoneroComponents.Style.orange
return MoneroComponents.Style.defaultFontColor
if(!styleData.visibleMonth) return "#DBDBDB"
if(dayArea.pressed) return "#FFFFFF"
if(styleData.today) return "#FF6C3B"
return "#4A4848"
}
}
MouseArea {
id: dayArea
anchors.fill: parent
hoverEnabled: true
onEntered: dayRect.color = MoneroComponents.Style.blackTheme ? "#20FFFFFF" : "#10000000"
onExited: dayRect.color = "transparent"
cursorShape: Qt.PointingHandCursor
onClicked: {
if(styleData.visibleMonth) {
currentDate = styleData.date
@@ -356,7 +325,7 @@ Item {
else calendar.showPreviousMonth()
}
datePicker.dateChanged();
dateChanged();
}
}
}
@@ -365,13 +334,12 @@ Item {
implicitHeight: 20
implicitWidth: calendar.width / 7
MoneroComponents.TextPlain {
Text {
anchors.centerIn: parent
elide: Text.ElideRight
font.family: MoneroComponents.Style.fontMonoRegular.name
font.pixelSize: 12
color: MoneroComponents.Style.lightGreyFontColor
themeTransition: false
font.family: "Arial"
font.pixelSize: 9
color: "#535353"
text: {
var locale = Qt.locale()
return locale.dayName(styleData.dayOfWeek, Locale.ShortFormat)
@@ -380,44 +348,29 @@ Item {
}
navigationBar: Rectangle {
color: MoneroComponents.Style.middlePanelBackgroundColor
implicitWidth: calendar.width
implicitHeight: 30
MoneroComponents.TextPlain {
Text {
anchors.centerIn: parent
font.family: MoneroComponents.Style.fontMonoRegular.name
font.pixelSize: 14
color: MoneroComponents.Style.dimmedFontColor
themeTransition: false
font.family: "Arial"
font.pixelSize: 12
color: "#4A4646"
text: styleData.title
}
Item {
anchors.left: parent.left
anchors.leftMargin: 4
anchors.top: parent.top
anchors.bottom: parent.bottom
width: height
Image {
id: prevMonthIcon
anchors.centerIn: parent
source: "qrc:///images/prevMonth.png"
visible: false
}
ColorOverlay {
source: prevMonthIcon
anchors.fill: prevMonthIcon
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
source: "../images/prevMonth.png"
}
MouseArea {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: calendar.showPreviousMonth()
}
@@ -425,29 +378,16 @@ Item {
Item {
anchors.right: parent.right
anchors.rightMargin: 4
anchors.top: parent.top
anchors.bottom: parent.bottom
width: height
Image {
id: nextMonthIcon
anchors.centerIn: parent
source: "qrc:///images/prevMonth.png"
visible: false
}
ColorOverlay {
source: nextMonthIcon
anchors.fill: nextMonthIcon
color: MoneroComponents.Style.defaultFontColor
opacity: 0.5
rotation: 180
source: "../images/nextMonth.png"
}
MouseArea {
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked: calendar.showNextMonth()
}

484
components/HistoryTable.qml Normal file
View File

@@ -0,0 +1,484 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import moneroComponents.Clipboard 1.0
import moneroComponents.AddressBookModel 1.0
import "../components" as MoneroComponents
import "../js/TxUtils.js" as TxUtils
ListView {
id: listView
clip: true
boundsBehavior: ListView.StopAtBounds
property var previousItem
property int rowSpacing: 12
property var addressBookModel: null
function buildTxDetailsString(tx_id, paymentId, tx_key,tx_note, destinations, rings) {
var trStart = '<tr><td width="85" style="padding-top:5px"><b>',
trMiddle = '</b></td><td style="padding-left:10px;padding-top:5px;">',
trEnd = "</td></tr>";
return '<table border="0">'
+ (tx_id ? trStart + qsTr("Tx ID:") + trMiddle + tx_id + trEnd : "")
+ (paymentId ? trStart + qsTr("Payment ID:") + trMiddle + paymentId + trEnd : "")
+ (tx_key ? trStart + qsTr("Tx key:") + trMiddle + tx_key + trEnd : "")
+ (tx_note ? trStart + qsTr("Tx note:") + trMiddle + tx_note + trEnd : "")
+ (destinations ? trStart + qsTr("Destinations:") + trMiddle + destinations + trEnd : "")
+ (rings ? trStart + qsTr("Rings:") + trMiddle + rings + trEnd : "")
+ "</table>"
+ translationManager.emptyString;
}
function lookupPaymentID(paymentId) {
if (!addressBookModel)
return ""
var idx = addressBookModel.lookupPaymentID(paymentId)
if (idx < 0)
return ""
idx = addressBookModel.index(idx, 0)
return addressBookModel.data(idx, AddressBookModel.AddressBookDescriptionRole)
}
footer: Rectangle {
height: 127 * scaleRatio
width: listView.width
color: "transparent"
Text {
anchors.centerIn: parent
font.family: "Arial"
font.pixelSize: 14
color: "#545454"
text: qsTr("No more results") + translationManager.emptyString
}
}
delegate: Rectangle {
id: delegate
property bool collapsed: index ? false : true
height: collapsed ? 180 * scaleRatio : 70 * scaleRatio
width: listView.width
color: "transparent"
function collapse(){
delegate.height = 180 * scaleRatio;
}
// borders
Rectangle{
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: "#404040"
}
Rectangle{
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: collapsed ? 2 : 1
color: collapsed ? "#BBBBBB" : "#404040"
}
Rectangle{
anchors.right: parent.right
anchors.bottom: parent.top
anchors.left: parent.left
height: 1
color: "#404040"
}
Rectangle{
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.left: parent.left
height: 1
color: "#404040"
}
Rectangle {
id: row1
anchors.left: parent.left
anchors.leftMargin: 20 * scaleRatio
anchors.right: parent.right
anchors.rightMargin: 20 * scaleRatio
anchors.top: parent.top
anchors.topMargin: 15 * scaleRatio
height: 40 * scaleRatio
color: "transparent"
Image {
id: arrowImage
source: isOut ? "../images/downArrow.png" : "../images/upArrow-green.png"
height: 18 * scaleRatio
width: 12 * scaleRatio
anchors.top: parent.top
anchors.topMargin: 12 * scaleRatio
}
Text {
id: txrxLabel
anchors.left: arrowImage.right
anchors.leftMargin: 18 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 14 * scaleRatio
text: isOut ? "Sent" : "Received"
color: "#808080"
}
Text {
id: amountLabel
anchors.left: arrowImage.right
anchors.leftMargin: 18 * scaleRatio
anchors.top: txrxLabel.bottom
anchors.topMargin: 0 * scaleRatio
font.family: MoneroComponents.Style.fontBold.name
font.pixelSize: 18 * scaleRatio
font.bold: true
text: {
var _amount = amount;
if(_amount === 0){
// *sometimes* amount is 0, while the 'destinations string'
// has the correct amount, so we try to fetch it from that instead.
_amount = TxUtils.destinationsToAmount(destinations);
_amount = (_amount *1);
}
return _amount + " XMR";
}
color: isOut ? "white" : "#2eb358"
}
Rectangle {
anchors.right: parent.right
width: 300 * scaleRatio
height: parent.height
color: "transparent"
Text {
id: dateLabel
anchors.left: parent.left
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
text: date
color: "#808080"
}
Text {
id: timeLabel
anchors.left: dateLabel.right
anchors.leftMargin: 7 * scaleRatio
anchors.top: parent.top
anchors.topMargin: 3 * scaleRatio
font.pixelSize: 12 * scaleRatio
text: time
color: "#808080"
}
Text {
id: toLabel
property string address: ""
color: "#BBBBBB"
anchors.left: parent.left
anchors.top: dateLabel.bottom
anchors.topMargin: 0
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 16 * scaleRatio
text: {
if(isOut){
address = TxUtils.destinationsToAddress(destinations);
if(address){
var truncated = TxUtils.addressTruncate(address);
return "To " + truncated;
} else {
return "Unknown recipient";
}
}
return "";
}
MouseArea{
visible: parent.address !== undefined
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: {
toLabel.color = "white";
}
onExited: {
toLabel.color = "#BBBBBB";
}
onClicked: {
if(parent.address){
console.log("Address copied to clipboard");
clipboard.setText(parent.address);
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3)
}
}
}
}
Rectangle {
height: 24 * scaleRatio
width: 24 * scaleRatio
color: "transparent"
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
Image {
id: dropdownImage
height: 8 * scaleRatio
width: 12 * scaleRatio
source: "../images/whiteDropIndicator.png"
rotation: delegate.collapsed ? 180 : 0
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
MouseArea{
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
delegate.collapsed = !delegate.collapsed;
}
}
}
}
}
Rectangle {
id: row2
anchors.left: parent.left
anchors.leftMargin: 20 * scaleRatio
anchors.right: parent.right
anchors.rightMargin: 20 * scaleRatio
anchors.top: row1.bottom
anchors.topMargin: 15 * scaleRatio
height: 40 * scaleRatio
color: "transparent"
visible: delegate.collapsed
// left column
MoneroComponents.HistoryTableInnerColumn{
anchors.left: parent.left
anchors.leftMargin: 30 * scaleRatio
labelHeader: "Transaction ID"
labelValue: hash.substring(0, 18) + "..."
copyValue: hash
}
// right column
MoneroComponents.HistoryTableInnerColumn{
anchors.right: parent.right
anchors.rightMargin: 100 * scaleRatio
width: 200 * scaleRatio
height: parent.height
color: "transparent"
labelHeader: qsTr("Fee")
labelValue: {
if(!isOut && !fee){
return "-";
} else if(isOut && fee){
return fee + " XMR";
} else {
return "Unknown"
}
}
copyValue: {
if(isOut && fee){ return fee }
else { return "" }
}
}
}
Rectangle {
id: row3
anchors.left: parent.left
anchors.leftMargin: 20 * scaleRatio
anchors.right: parent.right
anchors.rightMargin: 20 * scaleRatio
anchors.top: row2.bottom
anchors.topMargin: 15 * scaleRatio
height: 40 * scaleRatio
color: "transparent"
visible: delegate.collapsed
// left column
MoneroComponents.HistoryTableInnerColumn{
anchors.left: parent.left
anchors.leftMargin: 30 * scaleRatio
labelHeader: qsTr("Blockheight")
labelValue: {
if (!isPending)
if(confirmations < confirmationsRequired)
return blockHeight + " " + qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired);
else
return blockHeight;
if (!isOut)
return qsTr("UNCONFIRMED") + translationManager.emptyString
if (isFailed)
return qsTr("FAILED") + translationManager.emptyString
return qsTr("PENDING") + translationManager.emptyString
}
copyValue: labelValue
}
// right column
MoneroComponents.HistoryTableInnerColumn {
visible: currentWallet.getUserNote(hash)
anchors.right: parent.right
anchors.rightMargin: 80 * scaleRatio
width: 220 * scaleRatio
height: parent.height
color: "transparent"
labelHeader: qsTr("Description")
labelValue: {
var note = currentWallet.getUserNote(hash);
if(note){
if(note.length > 28) {
return note.substring(0, 28) + "...";
} else {
return note;
}
} else {
return "";
}
}
copyValue: {
return currentWallet.getUserNote(hash);
}
}
Rectangle {
id: proofButton
visible: isOut
color: "#404040"
height: 24 * scaleRatio
width: 24 * scaleRatio
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 36
radius: 20 * scaleRatio
MouseArea {
id: proofButtonMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
var address = TxUtils.destinationsToAddress(destinations);
if(address === undefined){
console.log('getProof: Error fetching address')
return;
}
var checked = (TxUtils.checkTxID(hash) && TxUtils.checkAddress(address, appWindow.persistentSettings.nettype));
if(!checked){
console.log('getProof: Error checking TxId and/or address');
}
console.log("getProof: Generate clicked: txid " + hash + ", address " + address);
root.getProofClicked(hash, address, '');
}
onEntered: {
proofButton.color = "#656565";
}
onExited: {
proofButton.color = "#404040";
}
}
Text {
color: MoneroComponents.Style.defaultFontColor
text: "P"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 14 * scaleRatio
}
}
Rectangle {
id: detailsButton
color: "#404040"
height: 24 * scaleRatio
width: 24 * scaleRatio
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 6
radius: 20 * scaleRatio
MouseArea {
id: detailsButtonMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
var tx_key = currentWallet.getTxKey(hash)
var tx_note = currentWallet.getUserNote(hash)
var rings = currentWallet.getRings(hash)
if (rings)
rings = rings.replace(/\|/g, '\n')
informationPopup.title = "Transaction details";
informationPopup.content = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations, rings);
informationPopup.onCloseCallback = null
informationPopup.open();
}
onEntered: {
detailsButton.color = "#656565";
}
onExited: {
detailsButton.color = "#404040";
}
}
Text {
color: MoneroComponents.Style.defaultFontColor
text: "?"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 14 * scaleRatio
}
}
}
}
Clipboard { id: clipboard }
}

View File

@@ -1,21 +1,21 @@
// Copyright (c) 2014-2019, The Monero Project
//
// Copyright (c) 2014-2015, The Monero Project
//
// All rights reserved.
//
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
@@ -26,72 +26,66 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import "../js/Wizard.js" as Wizard
import "../components"
import QtQuick 2.0
import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.2
import moneroComponents.Clipboard 1.0
import moneroComponents.PendingTransaction 1.0
import moneroComponents.Wallet 1.0
import "../components" as MoneroComponents
import QtQuick 2.9
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.0
Rectangle{
Clipboard { id: clipboard }
ColumnLayout {
property string title: ""
property string subtitle: ""
spacing: 4
Layout.maximumWidth: wizardController.wizardSubViewWidth
width: label1.width > label2.width ? label1.width : label2.width
height: label1.height + label2.height
color: "transparent"
TextArea {
text: title
Layout.fillWidth: true
property string copyValue: ""
property alias labelHeader: label1.text
property alias labelValue: label2.text
Text {
id: label1
anchors.left: parent.left
font.family: MoneroComponents.Style.fontRegular.name
color: MoneroComponents.Style.defaultFontColor
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.8
font.pixelSize: {
if(wizardController.layoutScale === 2 ){
return 34;
} else {
return 28;
}
}
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
selectByMouse: true
wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 0
topPadding: 0
bottomPadding: 0
readOnly: true
font.pixelSize: 14 * scaleRatio
text: labelHeader
color: MoneroComponents.Style.dimmedFontColor
}
TextArea {
Layout.fillWidth: true
anchors.horizontalCenter: parent.horizontalCenter
visible: parent.subtitle !== ""
color: MoneroComponents.Style.dimmedFontColor
text: subtitle
Text {
id: label2
anchors.left: parent.left
anchors.top: label1.bottom
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: {
if(wizardController.layoutScale === 2 ){
return 16;
} else {
return 14;
font.pixelSize: 14 * scaleRatio
text: labelValue
color: MoneroComponents.Style.dimmedFontColor
}
// hover effect / copy value
MouseArea {
visible: copyValue !== ""
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: {
label1.color = MoneroComponents.Style.defaultFontColor;
label2.color = MoneroComponents.Style.defaultFontColor;
}
onExited: {
label1.color = MoneroComponents.Style.dimmedFontColor
label2.color = MoneroComponents.Style.dimmedFontColor;
}
onClicked: {
if(copyValue){
console.log("Copied to clipboard");
clipboard.setText(copyValue);
appWindow.showStatusMessage(qsTr("Copied to clipboard"),3)
}
}
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
selectByMouse: true
wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 0
topPadding: 0
readOnly: true
}
}

View File

@@ -0,0 +1,222 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import QtQuick.Layouts 1.1
import moneroComponents.Clipboard 1.0
import moneroComponents.AddressBookModel 1.0
import "../components" as MoneroComponents
ListView {
id: listView
clip: true
boundsBehavior: ListView.StopAtBounds
property var previousItem
property var addressBookModel: null
function buildTxDetailsString(tx_id, paymentId, tx_key,tx_note, destinations, rings) {
var trStart = '<tr><td width="85" style="padding-top:5px"><b>',
trMiddle = '</b></td><td style="padding-left:10px;padding-top:5px;">',
trEnd = "</td></tr>";
return '<table border="0">'
+ (tx_id ? trStart + qsTr("Tx ID:") + trMiddle + tx_id + trEnd : "")
+ (paymentId ? trStart + qsTr("Payment ID:") + trMiddle + paymentId + trEnd : "")
+ (tx_key ? trStart + qsTr("Tx key:") + trMiddle + tx_key + trEnd : "")
+ (tx_note ? trStart + qsTr("Tx note:") + trMiddle + tx_note + trEnd : "")
+ (destinations ? trStart + qsTr("Destinations:") + trMiddle + destinations + trEnd : "")
+ (rings ? trStart + qsTr("Rings:") + trMiddle + rings + trEnd : "")
+ "</table>"
+ translationManager.emptyString;
}
function lookupPaymentID(paymentId) {
if (!addressBookModel)
return ""
var idx = addressBookModel.lookupPaymentID(paymentId)
if (idx < 0)
return ""
idx = addressBookModel.index(idx, 0)
return addressBookModel.data(idx, AddressBookModel.AddressBookDescriptionRole)
}
footer: Rectangle {
height: 127 * scaleRatio
width: listView.width
color: "transparent"
Text {
anchors.centerIn: parent
font.family: "Arial"
font.pixelSize: 14 * scaleRatio
color: "#545454"
text: qsTr("No more results") + translationManager.emptyString
}
}
delegate: Rectangle {
id: delegate
height: tableContent.height + 20 * scaleRatio
width: listView.width
color: "transparent"
Layout.leftMargin: 10 * scaleRatio
z: listView.count - index
function collapseDropdown() { dropdown.expanded = false }
Rectangle{
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: "#404040"
}
Rectangle{
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.top: parent.top
width: 1
color: "#404040"
}
Rectangle{
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.left: parent.left
height: 1
color: "#404040"
}
MouseArea {
anchors.fill: parent
onClicked: {
var tx_key = currentWallet.getTxKey(hash)
var tx_note = currentWallet.getUserNote(hash)
var rings = currentWallet.getRings(hash)
if (rings)
rings = rings.replace(/\|/g, '\n')
informationPopup.title = "Transaction details";
informationPopup.text = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations, rings);
informationPopup.open();
informationPopup.onCloseCallback = null
}
}
Rectangle {
anchors.right: parent.right
anchors.rightMargin: 15 * scaleRatio
anchors.top: parent.top
anchors.topMargin: parent.height/2 - this.height/2
width: 30 * scaleRatio; height: 30 * scaleRatio
radius: 25
color: "#404040"
Image {
width: 20 * scaleRatio
height: 20 * scaleRatio
fillMode: Image.PreserveAspectFit
anchors.centerIn: parent
source: "qrc:///images/nextPage.png"
}
}
ColumnLayout {
id: tableContent
// Date
RowLayout {
Layout.topMargin: 20 * scaleRatio
Layout.leftMargin: 10 * scaleRatio
Text {
font.family: MoneroComponents.Style.fontMedium.name
font.pixelSize: 14 * scaleRatio
color: MoneroComponents.Style.defaultFontColor
text: date
}
Text {
font.family: Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
color: MoneroComponents.Style.dimmedFontColor
text: time
}
// Show confirmations
Text {
visible: confirmations < confirmationsRequired || isPending
Layout.leftMargin: 5 * scaleRatio
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14 * scaleRatio
color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454"
text: {
if (!isPending)
if(confirmations < confirmationsRequired)
return qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired)
if (!isOut)
return qsTr("UNCONFIRMED") + translationManager.emptyString
if (isFailed)
return qsTr("FAILED") + translationManager.emptyString
return qsTr("PENDING") + translationManager.emptyString
}
}
}
// Amount & confirmations
RowLayout {
Layout.leftMargin: 10 * scaleRatio
spacing: 2
Text {
font.family: "Arial"
font.pixelSize: 14 * scaleRatio
color: isOut ? MoneroComponents.Style.defaultFontColor : "#2eb358"
text: isOut ? "↓" : "↑"
}
Text {
id: amountText
font.family: "Arial"
font.pixelSize: 18 * scaleRatio
color: isOut ? MoneroComponents.Style.defaultFontColor : "#2eb358"
text: displayAmount
}
}
}
}
ListModel {
id: dropModel
ListElement { name: "<b>Copy address to clipboard</b>"; icon: "../images/dropdownCopy.png" }
ListElement { name: "<b>Add to address book</b>"; icon: "../images/dropdownAdd.png" }
ListElement { name: "<b>Send to this address</b>"; icon: "../images/dropdownSend.png" }
ListElement { name: "<b>Find similar transactions</b>"; icon: "../images/dropdownSearch.png" }
}
Clipboard { id: clipboard }
}

View File

@@ -26,33 +26,49 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import "../components" as MoneroComponents
import "../components/effects" as MoneroEffects
MoneroEffects.ImageMask {
id: button
z: 666
color: MoneroComponents.Style.defaultFontColor
image: ""
import QtQuick 2.0
Item {
property alias image : buttonImage
property alias imageSource : buttonImage.source
signal clicked(var mouse)
id: button
width: parent.height
height: parent.height
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
Image {
id: buttonImage
source: ""
x : (parent.width - width) / 2
y : (parent.height - height) /2
z: 100
}
MouseArea {
id: buttonArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: {
button.width = button.width + 2
button.height = button.height + 2
onPressed: {
buttonImage.x = buttonImage.x + 2
buttonImage.y = buttonImage.y + 2
}
onReleased: {
buttonImage.x = buttonImage.x - 2
buttonImage.y = buttonImage.y - 2
}
onExited: {
button.width = button.width - 2
button.height = button.height - 2
onClicked: {
parent.clicked(mouse)
}
onClicked: button.clicked(mouse)
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2019, The Monero Project
// Copyright (c) 2014-2015, The Monero Project
//
// All rights reserved.
//
@@ -26,33 +26,22 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Layouts 1.1
import QtGraphicalEffects 1.0
import "." as MoneroComponents
import "./effects/" as MoneroEffects
import "../components" as MoneroComponents
Item {
id: inlineButton
height: parent.height
anchors.top: parent.top
anchors.bottom: parent.bottom
property bool small: false
height: rect.height * scaleRatio
property string shadowPressedColor: "#B32D00"
property string shadowReleasedColor: "#FF4304"
property string pressedColor: "#FF4304"
property string releasedColor: "#FF6C3C"
property string icon: ""
property string textColor: MoneroComponents.Style.inlineButtonTextColor
property int fontSize: small ? 14 : 16
property int rectHeight: small ? 24 : 24
property int rectHMargin: small ? 16 : 22
property string textColor: "#FFFFFF"
property int fontSize: 12 * scaleRatio
property alias text: inlineText.text
property alias fontPixelSize: inlineText.font.pixelSize
property alias fontFamily: inlineText.font.family
property alias buttonColor: rect.color
signal clicked()
function doClick() {
@@ -63,37 +52,23 @@ Item {
Rectangle{
id: rect
color: MoneroComponents.Style.buttonInlineBackgroundColor
height: 24
width: inlineText.text ? (inlineText.width + 16) : inlineButton.icon ? (inlineImage.width + 16) : rect.height
color: MoneroComponents.Style.buttonBackgroundColorDisabled
border.color: "black"
height: 28 * scaleRatio
width: inlineText.width + 22 * scaleRatio
radius: 4
anchors.verticalCenter: parent.verticalCenter
anchors.top: parent.top
anchors.right: parent.right
anchors.rightMargin: 4
MoneroComponents.TextPlain {
Text {
id: inlineText
font.family: MoneroComponents.Style.fontBold.name
font.bold: true
font.pixelSize: inlineButton.fontSize
color: inlineButton.textColor
font.pixelSize: 16 * scaleRatio
color: "black"
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
themeTransition: false
MoneroEffects.ColorTransition {
targetObj: inlineText
blackColor: MoneroComponents.Style._b_inlineButtonTextColor
whiteColor: MoneroComponents.Style._w_inlineButtonTextColor
}
}
Image {
id: inlineImage
visible: inlineButton.icon !== ""
anchors.centerIn: parent
source: inlineButton.icon
}
MouseArea {
@@ -103,28 +78,16 @@ Item {
anchors.fill: parent
onClicked: doClick()
onEntered: {
rect.color = buttonColor ? buttonColor : "#707070";
rect.color = "#707070";
rect.opacity = 0.8;
}
onExited: {
rect.opacity = 1.0;
rect.color = buttonColor ? buttonColor : "#808080";
rect.color = "#808080";
}
}
}
DropShadow {
visible: !MoneroComponents.Style.blackTheme
anchors.fill: rect
horizontalOffset: 2
verticalOffset: 2
radius: 7.0
samples: 10
color: "#1B000000"
cached: true
source: rect
}
Keys.onSpacePressed: doClick()
Keys.onReturnPressed: doClick()
}

View File

@@ -27,19 +27,19 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick.Controls 2.0
import QtQuick 2.9
import QtQuick 2.7
import "../components" as MoneroComponents
TextField {
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 18
font.pixelSize: 18 * scaleRatio
font.bold: true
horizontalAlignment: TextInput.AlignLeft
selectByMouse: true
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
background: Rectangle {
color: "transparent"

View File

@@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
@@ -49,7 +49,8 @@ Item {
inactiveOverlay.visible = true
leftPanel.enabled = false
middlePanel.enabled = false
titleBar.state = "essentials"
titleBar.enabled = false
show()
root.visible = true;
input.focus = true;
input.text = "";
@@ -59,7 +60,7 @@ Item {
inactiveOverlay.visible = false
leftPanel.enabled = true
middlePanel.enabled = true
titleBar.state = "default"
titleBar.enabled = true
root.visible = false;
}
@@ -74,13 +75,14 @@ Item {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: 400
Layout.maximumWidth: 400 * scaleRatio
Label {
id: label
anchors.left: parent.left
Layout.fillWidth: true
font.pixelSize: 16
font.pixelSize: 16 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
@@ -91,23 +93,24 @@ Item {
focus: true
Layout.topMargin: 6
Layout.fillWidth: true
anchors.left: parent.left
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24
font.pixelSize: 24 * scaleRatio
KeyNavigation.tab: okButton
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
background: Rectangle {
radius: 2
border.color: MoneroComponents.Style.inputBorderColorActive
border.color: Qt.rgba(255, 255, 255, 0.35)
border.width: 1
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
color: "black"
}
Keys.onReturnPressed: {
@@ -123,7 +126,7 @@ Item {
// Ok/Cancel buttons
RowLayout {
id: buttons
spacing: 16
spacing: 16 * scaleRatio
Layout.topMargin: 16
Layout.alignment: Qt.AlignRight
@@ -144,7 +147,7 @@ Item {
small: true
width: 120
fontSize: 14
text: qsTr("Ok") + translationManager.emptyString
text: qsTr("Ok")
KeyNavigation.tab: cancelButton
onClicked: {
root.close()

View File

@@ -27,13 +27,13 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick.Controls 2.0
import QtQuick 2.9
import QtQuick 2.7
import "../js/TxUtils.js" as TxUtils
import "../components" as MoneroComponents
TextArea {
property int fontSize: 18
property int fontSize: 18 * scaleRatio
property bool fontBold: false
property string fontColor: MoneroComponents.Style.defaultFontColor
@@ -48,17 +48,14 @@ TextArea {
font.bold: fontBold
horizontalAlignment: TextInput.AlignLeft
selectByMouse: mouseSelection
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
property int minimumHeight: 100
height: contentHeight > minimumHeight ? contentHeight : minimumHeight
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
onTextChanged: {
if(addressValidation){
// js replacement for `RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }`
textArea.text = textArea.text.replace(/[^a-z0-9.@\-]/gi,'');
var address_ok = TxUtils.checkAddress(textArea.text, appWindow.persistentSettings.nettype) || TxUtils.isValidOpenAliasAddress(textArea.text);
textArea.text = textArea.text.replace(/[^a-z0-9.@]/gi,'');
var address_ok = TxUtils.checkAddress(textArea.text, appWindow.persistentSettings.nettype);
if(!address_ok) error = true;
else error = false;
TextArea.cursorPosition = textArea.text.length;

View File

@@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.5
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
@@ -35,26 +35,24 @@ Item {
id: item
property alias text: label.text
property alias color: label.color
property int textFormat: Text.PlainText
property alias textFormat: label.textFormat
property string tipText: ""
property int fontSize: 16
property int fontSize: 16 * scaleRatio
property bool fontBold: false
property string fontColor: MoneroComponents.Style.defaultFontColor
property string fontFamily: ""
property alias wrapMode: label.wrapMode
property alias horizontalAlignment: label.horizontalAlignment
property alias elide: label.elide
property alias textWidth: label.width
property alias themeTransition: label.themeTransition
property alias hoveredLink: label.hoveredLink
signal linkActivated()
height: label.height
width: label.width
Layout.topMargin: 10
height: label.height * scaleRatio
width: label.width * scaleRatio
Layout.topMargin: 10 * scaleRatio
MoneroComponents.TextPlain {
Text {
id: label
anchors.bottom: parent.bottom
anchors.bottomMargin: 2
anchors.bottomMargin: 2 * scaleRatio
anchors.left: parent.left
font.family: {
if(fontFamily){
@@ -67,6 +65,5 @@ Item {
font.bold: fontBold
color: fontColor
onLinkActivated: item.linkActivated()
textFormat: parent.textFormat
}
}

View File

@@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
@@ -37,14 +37,14 @@ Rectangle {
property alias text: labelButtonText.text
id: labelButton
color: MoneroComponents.Style.buttonBackgroundColorDisabled
color: "#808080"
radius: 3
height: 20
width: labelButtonText.width + 14
anchors.right: copyButton.left
anchors.rightMargin: 6
MoneroComponents.TextPlain {
Text {
id: labelButtonText
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
@@ -52,7 +52,7 @@ Rectangle {
font.pixelSize: 12
font.bold: true
text: ""
color: MoneroComponents.Style.inlineButtonTextColor
color: "black"
}
MouseArea {
@@ -61,11 +61,11 @@ Rectangle {
hoverEnabled: true
onClicked: labelButton.clicked()
onEntered: {
labelButton.color = MoneroComponents.Style.buttonBackgroundColorDisabledHover;
labelButton.color = "#707070";
labelButtonText.opacity = 0.8;
}
onExited: {
labelButton.color = MoneroComponents.Style.buttonBackgroundColorDisabled;
labelButton.color = "#808080";
labelButtonText.opacity = 1.0;
}
}

View File

@@ -26,16 +26,13 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import "../components" as MoneroComponents
import "../components/effects/" as MoneroEffects
Label {
id: item
fontSize: 18
anchors.left: parent.left
anchors.right: parent.right
fontSize: 18 * scaleRatio
Rectangle {
anchors.top: item.bottom
@@ -43,12 +40,13 @@ Label {
anchors.left: parent.left
anchors.right: parent.right
height: 2
color: MoneroComponents.Style.appWindowBorderColor
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
}
MoneroEffects.ColorTransition {
targetObj: parent
blackColor: MoneroComponents.Style._b_appWindowBorderColor
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
}
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}

View File

@@ -1,170 +0,0 @@
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import "../components" as MoneroComponents
import QtQuick 2.9
import QtQuick.XmlListModel 2.0
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.0
Drawer {
id: sideBar
// @TODO: Qt 5.10 introduces `opened` built-in for Drawer
property bool isOpened: false
onClosed: {
isOpened = false;
}
onOpened: {
isOpened = true;
}
width: 240
height: parent.height - (persistentSettings.customDecorations ? 50 : 0)
y: titleBar.height
background: Rectangle {
color: "#0d0d0d"
width: parent.width
}
Rectangle {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
color: "red"
ListView {
clip: true
Layout.fillHeight: true
Layout.fillWidth: true
boundsBehavior: Flickable.StopAtBounds
width: sideBar.width
height: sideBar.height
model: langModel
delegate: Rectangle {
id: item
color: "transparent"
width: sideBar.width
height: 32
MoneroComponents.TextPlain {
anchors.left: parent.left
anchors.leftMargin: 16
font.bold: true
font.pixelSize: 14
color: MoneroComponents.Style.defaultFontColor
text: display_name
anchors.verticalCenter: parent.verticalCenter
}
Rectangle {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
height: 1
}
// button gradient while checked
Image {
anchors.fill: parent
source: "qrc:///images/menuButtonGradient.png"
opacity: 0.65
visible: true
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
var locale_spl = locale.split("_");
// reload active translations
console.log(locale_spl[0]);
translationManager.setLanguage(locale_spl[0]);
// set wizard language settings
wizard.language_locale = locale;
wizard.language_wallet = wallet_language;
wizard.language_language = display_name + " (" + locale_spl[1] + ") ";
sideBar.close()
}
hoverEnabled: true
onEntered: {
// item.color = "#26FFFFFF"
parent.opacity = 1
}
onExited: {
// item.color = "transparent"
parent.opacity = 0.65
}
}
}
}
ScrollIndicator.vertical: ScrollIndicator {
// @TODO: QT 5.9 introduces `policy: ScrollBar.AlwaysOn`
active: true
contentItem.opacity: 0.7
onActiveChanged: {
if (!active) {
active = true;
}
}
}
}
}
//Flags model
XmlListModel {
id: langModel
source: "/lang/languages.xml"
query: "/languages/language"
XmlRole { name: "display_name"; query: "@display_name/string()" }
XmlRole { name: "locale"; query: "@locale/string()" }
XmlRole { name: "wallet_language"; query: "@wallet_language/string()" }
XmlRole { name: "flag"; query: "@flag/string()" }
// TODO: XmlListModel is read only, we should store current language somewhere else
// and set current language accordingly
XmlRole { name: "isCurrent"; query: "@enabled/string()" }
onStatusChanged: {
if(status === XmlListModel.Ready){
console.log("languages available: ",count);
}
}
}
}

View File

@@ -26,25 +26,22 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtGraphicalEffects 1.0
import QtQuick 2.0
import "../components" as MoneroComponents
Item {
id: item
property alias input: input
property alias text: input.text
property alias placeholderText: placeholderLabel.text
property bool placeholderCenter: false
property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name
property bool placeholderFontBold: false
property int placeholderFontSize: 18
property int placeholderFontSize: 18 * scaleRatio
property string placeholderColor: MoneroComponents.Style.defaultFontColor
property real placeholderOpacity: 0.35
property alias acceptableInput: input.acceptableInput
property alias validator: input.validator
property alias readOnly : input.readOnly
property alias cursorPosition: input.cursorPosition
@@ -56,16 +53,14 @@ Item {
property bool borderDisabled: false
property string borderColor: {
if(error && input.text !== ""){
return MoneroComponents.Style.inputBorderColorInvalid;
} else if(input.activeFocus){
if(input.activeFocus){
return MoneroComponents.Style.inputBorderColorActive;
} else {
return MoneroComponents.Style.inputBorderColorInActive;
}
}
property int fontSize: 18
property int fontSize: 18 * scaleRatio
property bool fontBold: false
property alias fontColor: input.color
property bool error: false
@@ -74,19 +69,19 @@ Item {
property alias labelTextFormat: inputLabel.textFormat
property string backgroundColor: "transparent"
property string tipText: ""
property int labelFontSize: 16
property int labelFontSize: 16 * scaleRatio
property bool labelFontBold: false
property alias labelWrapMode: inputLabel.wrapMode
property alias labelHorizontalAlignment: inputLabel.horizontalAlignment
property bool showingHeader: inputLabel.text !== "" || copyButton
property int inputHeight: 42
property int inputHeight: 42 * scaleRatio
signal labelLinkActivated(); // input label, rich text <a> signal
signal editingFinished();
signal accepted();
signal textUpdated();
height: showingHeader ? (inputLabel.height + inputItem.height + 2) : 42
height: showingHeader ? (inputLabel.height + inputItem.height + 2) * scaleRatio : 42 * scaleRatio
onTextUpdated: {
// check to remove placeholder text when there is content
@@ -107,11 +102,12 @@ Item {
}
}
MoneroComponents.TextPlain {
Text {
id: inputLabel
anchors.top: parent.top
anchors.left: parent.left
font.family: MoneroComponents.Style.fontRegular.name
anchors.topMargin: 2 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: labelFontSize
font.bold: labelFontBold
textFormat: Text.RichText
@@ -127,7 +123,7 @@ Item {
MoneroComponents.LabelButton {
id: copyButtonId
text: qsTr("Copy") + translationManager.emptyString
text: qsTr("Copy")
anchors.right: parent.right
onClicked: {
if (input.text.length > 0) {
@@ -141,13 +137,13 @@ Item {
Item{
id: inputItem
height: inputHeight
height: inputHeight * scaleRatio
anchors.top: showingHeader ? inputLabel.bottom : parent.top
anchors.topMargin: showingHeader ? 12 : 2
anchors.topMargin: showingHeader ? 12 * scaleRatio : 2 * scaleRatio
width: parent.width
clip: true
MoneroComponents.TextPlain {
Text {
id: placeholderLabel
visible: input.text ? false : true
anchors.verticalCenter: parent.verticalCenter
@@ -157,14 +153,14 @@ Item {
if(placeholderCenter){
return undefined;
}
else if(inlineIcon.visible){ return 50; }
else { return 10; }
else if(inlineIcon.visible){ return 50 * scaleRatio; }
else { return 10 * scaleRatio; }
}
opacity: item.placeholderOpacity
color: item.placeholderColor
font.family: item.placeholderFontFamily
font.pixelSize: placeholderFontSize
font.pixelSize: placeholderFontSize * scaleRatio
font.bold: item.placeholderFontBold
text: ""
z: 3
@@ -172,7 +168,7 @@ Item {
Rectangle {
anchors.fill: parent
anchors.topMargin: 1
anchors.topMargin: 1 * scaleRatio
color: "transparent"
}
@@ -187,34 +183,36 @@ Item {
Image {
id: inlineIcon
width: 26
height: 26
width: 26 * scaleRatio
height: 26 * scaleRatio
anchors.top: parent.top
anchors.topMargin: 8
anchors.topMargin: 8 * scaleRatio
anchors.left: parent.left
anchors.leftMargin: 12
source: "qrc:///images/moneroIcon-28x28.png"
anchors.leftMargin: 12 * scaleRatio
source: "../images/moneroIcon-28x28.png"
visible: false
}
MoneroComponents.Input {
id: input
anchors.fill: parent
anchors.leftMargin: inlineIcon.visible ? 44 : 0
anchors.leftMargin: inlineIcon.visible ? 44 * scaleRatio : 0
font.pixelSize: item.fontSize
font.bold: item.fontBold
onEditingFinished: item.editingFinished()
onAccepted: item.accepted();
onTextChanged: item.textUpdated()
topPadding: 10
bottomPadding: 10
topPadding: 10 * scaleRatio
bottomPadding: 10 * scaleRatio
}
MoneroComponents.InlineButton {
id: inlineButtonId
visible: item.inlineButtonText ? true : false
anchors.right: parent.right
anchors.rightMargin: 8
anchors.rightMargin: 8 * scaleRatio
anchors.top: parent.top
anchors.topMargin: 6 * scaleRatio
}
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2019, The Monero Project
// Copyright (c) 2014-2015, The Monero Project
//
// All rights reserved.
//
@@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
@@ -35,22 +35,17 @@ ColumnLayout {
id: item
Layout.fillWidth: true
Layout.preferredHeight: childrenRect.height
property alias text: input.text
property alias labelText: inputLabel.text
property alias labelButtonText: labelButton.text
property alias placeholderText: placeholderLabel.text
property int inputPaddingLeft: 10
property int inputPaddingRight: 10
property int inputPaddingTop: 10
property int inputPaddingBottom: 10
property int inputRadius: 4
property bool placeholderCenter: false
property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name
property bool placeholderFontBold: false
property int placeholderFontSize: 18
property int placeholderFontSize: 18 * scaleRatio
property string placeholderColor: MoneroComponents.Style.defaultFontColor
property real placeholderOpacity: 0.35
@@ -69,28 +64,21 @@ ColumnLayout {
property string labelFontColor: MoneroComponents.Style.defaultFontColor
property bool labelFontBold: false
property int labelFontSize: 16
property int labelFontSize: 16 * scaleRatio
property bool labelButtonVisible: false
property string fontColor: MoneroComponents.Style.defaultFontColor
property string fontColor: "white"
property bool fontBold: false
property int fontSize: 16
property int fontSize: 16 * scaleRatio
property bool mouseSelection: true
property alias readOnly: input.readOnly
property bool copyButton: false
property bool pasteButton: false
property var onPaste: function(clipboardText) {
item.text = clipboardText;
}
property bool showingHeader: labelText != "" || copyButton || pasteButton
property bool showingHeader: true
property var wrapMode: Text.NoWrap
property alias addressValidation: input.addressValidation
property string backgroundColor: "" // mock
property alias inlineButton: inlineButtonId
property bool inlineButtonVisible: false
signal labelButtonClicked();
signal inputLabelLinkActivated();
signal editingFinished();
@@ -100,10 +88,10 @@ ColumnLayout {
id: inputLabelRect
color: "transparent"
Layout.fillWidth: true
height: (inputLabel.height + 10)
height: (inputLabel.height + 10) * scaleRatio
visible: showingHeader ? true : false
MoneroComponents.TextPlain {
Text {
id: inputLabel
anchors.top: parent.top
anchors.left: parent.left
@@ -121,35 +109,25 @@ ColumnLayout {
}
}
RowLayout {
anchors.right: parent.right
spacing: 16
MoneroComponents.LabelButton {
id: labelButton
onClicked: labelButtonClicked()
visible: labelButtonVisible
}
MoneroComponents.LabelButton {
id: labelButton
onClicked: labelButtonClicked()
visible: labelButtonVisible
}
MoneroComponents.LabelButton {
id: copyButtonId
visible: copyButton && input.text !== ""
text: qsTr("Copy") + translationManager.emptyString
onClicked: {
if (input.text.length > 0) {
console.log("Copied to clipboard");
clipboard.setText(input.text);
appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3);
}
MoneroComponents.LabelButton {
id: copyButtonId
visible: copyButton && input.text !== ""
text: qsTr("Copy")
anchors.right: labelButton.visible ? inputLabel.right : parent.right
anchors.rightMargin: labelButton.visible? 4 : 0
onClicked: {
if (input.text.length > 0) {
console.log("Copied to clipboard");
clipboard.setText(input.text);
appWindow.showStatusMessage(qsTr("Copied to clipboard"), 3);
}
}
MoneroComponents.LabelButton {
id: pasteButtonId
onClicked: item.onPaste(clipboard.text())
text: qsTr("Paste") + translationManager.emptyString
visible: pasteButton
}
}
}
@@ -157,13 +135,10 @@ ColumnLayout {
id: input
readOnly: false
addressValidation: false
anchors.top: item.showingHeader ? inputLabelRect.bottom : item.top
Layout.fillWidth: true
leftPadding: item.inputPaddingLeft
rightPadding: item.inputPaddingRight
topPadding: item.inputPaddingTop
bottomPadding: item.inputPaddingBottom
topPadding: item.showingHeader ? 10 * scaleRatio : 0
bottomPadding: 10 * scaleRatio
wrapMode: item.wrapMode
fontSize: item.fontSize
fontBold: item.fontBold
@@ -172,12 +147,12 @@ ColumnLayout {
onEditingFinished: item.editingFinished()
error: item.error
MoneroComponents.TextPlain {
Text {
id: placeholderLabel
visible: input.text ? false : true
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10
anchors.leftMargin: 10 * scaleRatio
opacity: item.placeholderOpacity
color: item.placeholderColor
font.family: item.placeholderFontFamily
@@ -191,16 +166,9 @@ ColumnLayout {
color: "transparent"
border.width: 1
border.color: item.borderColor
radius: item.inputRadius
radius: 4
anchors.fill: parent
visible: !item.borderDisabled
}
MoneroComponents.InlineButton {
id: inlineButtonId
visible: (inlineButtonId.text || inlineButtonId.icon) && inlineButtonVisible ? true : false
anchors.right: parent.right
anchors.rightMargin: 8
}
}
}

View File

@@ -26,11 +26,9 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtGraphicalEffects 1.0
import QtQuick 2.5
import "../components" as MoneroComponents
import "effects/" as MoneroEffects
Rectangle {
id: button
@@ -48,11 +46,12 @@ Rectangle {
clicked();
}
function getOffset() {
var offset = 0
var item = button
while (item.under) {
offset += 20
offset += 20 * scaleRatio
item = item.under
}
return offset
@@ -60,93 +59,77 @@ Rectangle {
color: "transparent"
property bool present: !under || under.checked || checked || under.numSelectedChildren > 0
height: present ? ((appWindow.height >= 800) ? 44 : 38 ) : 0
height: present ? ((appWindow.height >= 800) ? 44 * scaleRatio : 38 * scaleRatio ) : 0
LinearGradient {
visible: isOpenGL && button.checked
// button gradient while checked
Image {
height: parent.height
width: 260
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: -20
anchors.leftMargin: parent.getOffset()
start: Qt.point(width, 0)
end: Qt.point(0, 0)
gradient: Gradient {
GradientStop { position: 0.0; color: MoneroComponents.Style.menuButtonGradientStart }
GradientStop { position: 1.0; color: MoneroComponents.Style.menuButtonGradientStop }
}
}
// fallback hover effect when opengl is not available
Rectangle {
visible: !isOpenGL && button.checked
anchors.fill: parent
color: MoneroComponents.Style.menuButtonFallbackBackgroundColor
source: "../images/menuButtonGradient.png"
visible: button.checked
}
// button decorations that are subject to leftMargin offsets
Rectangle {
anchors.left: parent.left
anchors.leftMargin: parent.getOffset() + 20
anchors.leftMargin: parent.getOffset() + 20 * scaleRatio
height: parent.height
width: button.checked ? 20: 10
color: "transparent"
color: "#00000000"
// dot if unchecked
Rectangle {
id: dot
anchors.centerIn: parent
width: button.checked ? 20 : 8
height: button.checked ? 20 : 8
radius: button.checked ? 20 : 4
width: button.checked ? 20 * scaleRatio : 8 * scaleRatio
height: button.checked ? 20 * scaleRatio : 8 * scaleRatio
radius: button.checked ? 20 * scaleRatio : 4 * scaleRatio
color: button.dotColor
// arrow if checked
Image {
anchors.centerIn: parent
anchors.left: parent.left
source: MoneroComponents.Style.menuButtonImageDotArrowSource
source: "../images/arrow-right-medium-white.png"
visible: button.checked
}
}
// button text
MoneroComponents.TextPlain {
Text {
id: label
color: MoneroComponents.Style.menuButtonTextColor
themeTransitionBlackColor: MoneroComponents.Style._b_menuButtonTextColor
themeTransitionWhiteColor: MoneroComponents.Style._w_menuButtonTextColor
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.right
anchors.leftMargin: 8
anchors.leftMargin: 8 * scaleRatio
font.family: MoneroComponents.Style.fontMedium.name
font.bold: true
font.pixelSize: 14
font.pixelSize: 16 * scaleRatio
color: "#FFFFFF"
}
}
// menu button right arrow
MoneroEffects.ImageMask {
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: parent.getOffset()
anchors.right: parent.right
anchors.rightMargin: 20
height: 14
width: 8
image: MoneroComponents.Style.menuButtonImageRightSource
color: button.checked ? MoneroComponents.Style.menuButtonImageRightColorActive : MoneroComponents.Style.menuButtonImageRightColor
opacity: button.checked ? 0.8 : 0.25
anchors.rightMargin: 20 * scaleRatio
anchors.leftMargin: parent.getOffset()
source: "../images/right.png"
opacity: button.checked ? 1.0 : 0.4
}
MoneroComponents.TextPlain {
Text {
id: symbolText
anchors.right: parent.right
anchors.rightMargin: 44
anchors.rightMargin: 44 * scaleRatio
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 12
font.pixelSize: 12 * scaleRatio
font.bold: true
color: button.checked || buttonArea.containsMouse ? MoneroComponents.Style.menuButtonTextColor : dot.color
color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color
visible: appWindow.ctrlPressed
themeTransition: false
}
MouseArea {

View File

@@ -1,15 +0,0 @@
import QtQuick 2.9
import "." as MoneroComponents
import "effects/" as MoneroEffects
Rectangle {
color: MoneroComponents.Style.appWindowBorderColor
height: 1
MoneroEffects.ColorTransition {
targetObj: parent
blackColor: MoneroComponents.Style._b_appWindowBorderColor
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
}
}

View File

@@ -1,4 +1,4 @@
import QtQuick 2.9
import QtQuick 2.2
import QtGraphicalEffects 1.0
import QtQuick.Layouts 1.1
@@ -11,17 +11,17 @@ Rectangle {
anchors.leftMargin: 1
anchors.rightMargin: 1
Layout.fillWidth: true
Layout.preferredHeight: 64
Layout.preferredHeight: 64 * scaleRatio
color: "#FFFFFF"
Image {
id: logo
visible: appWindow.width > 460
visible: appWindow.width > 460 * scaleRatio
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: -5
anchors.left: parent.left
anchors.leftMargin: 50
source: "qrc:///images/moneroLogo2.png"
anchors.leftMargin: 50 * scaleRatio
source: "../images/moneroLogo2.png"
}
Image {
@@ -29,24 +29,24 @@ Rectangle {
visible: !logo.visible
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 40
source: "qrc:///images/moneroIcon.png"
anchors.leftMargin: 40 * scaleRatio
source: "../images/moneroIcon.png"
}
Grid {
anchors.verticalCenter: parent.verticalCenter
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: 10
width: 256
anchors.topMargin: 10 * scaleRatio
width: 256 * scaleRatio
columns: 3
MoneroComponents.TextPlain {
Text {
id: balanceLabel
width: 116
height: 20
width: 116 * scaleRatio
height: 20 * scaleRatio
font.family: "Arial"
font.pixelSize: 12
font.pixelSize: 12 * scaleRatio
font.letterSpacing: -1
elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft
@@ -55,12 +55,12 @@ Rectangle {
text: leftPanel.balanceLabelText + ":"
}
MoneroComponents.TextPlain {
Text {
id: balanceText
width: 110
height: 20
width: 110 * scaleRatio
height: 20 * scaleRatio
font.family: "Arial"
font.pixelSize: 18
font.pixelSize: 18 * scaleRatio
font.letterSpacing: -1
elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft
@@ -70,21 +70,21 @@ Rectangle {
}
Item {
height: 20
width: 20
height: 20 * scaleRatio
width: 20 * scaleRatio
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
source: "qrc:///images/lockIcon.png"
source: "../images/lockIcon.png"
}
}
MoneroComponents.TextPlain {
width: 116
height: 20
Text {
width: 116 * scaleRatio
height: 20 * scaleRatio
font.family: "Arial"
font.pixelSize: 12
font.pixelSize: 12 * scaleRatio
font.letterSpacing: -1
elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft
@@ -93,12 +93,12 @@ Rectangle {
text: qsTr("Unlocked Balance:")
}
MoneroComponents.TextPlain {
Text {
id: availableBalanceText
width: 110
height: 20
width: 110 * scaleRatio
height: 20 * scaleRatio
font.family: "Arial"
font.pixelSize: 14
font.pixelSize: 14 * scaleRatio
font.letterSpacing: -1
elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft

View File

@@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Layouts 1.1
import moneroComponents.Wallet 1.0
@@ -41,29 +41,25 @@ Rectangle {
if (status == Wallet.ConnectionStatus_Connected) {
if(!appWindow.daemonSynced)
return qsTr("Synchronizing")
if(persistentSettings.useRemoteNode)
if(appWindow.remoteNodeConnected)
return qsTr("Remote node")
return appWindow.isMining ? qsTr("Connected") + " + " + qsTr("Mining"): qsTr("Connected")
return qsTr("Connected")
}
if (status == Wallet.ConnectionStatus_WrongVersion)
return qsTr("Wrong version")
if (status == Wallet.ConnectionStatus_Disconnected){
if(appWindow.walletMode <= 1){
return qsTr("Searching node") + translationManager.emptyString;
}
if (status == Wallet.ConnectionStatus_Disconnected)
return qsTr("Disconnected")
}
return qsTr("Invalid connection status")
}
RowLayout {
Layout.preferredHeight: 40
Layout.preferredHeight: 40 * scaleRatio
Item {
id: iconItem
width: 40
height: 40
anchors.top: parent.top
width: 40 * scaleRatio
height: 40 * scaleRatio
opacity: {
if(item.connected == Wallet.ConnectionStatus_Connected){
return 1
@@ -74,76 +70,50 @@ Rectangle {
Image {
anchors.top: parent.top
anchors.topMargin: !appWindow.isMining ? 6 : 4
anchors.topMargin: 6
anchors.right: parent.right
anchors.rightMargin: !appWindow.isMining ? 11 : 0
anchors.rightMargin: 11
source: {
if(appWindow.isMining) {
return "qrc:///images/miningxmr.png"
} else if(item.connected == Wallet.ConnectionStatus_Connected) {
return "qrc:///images/lightning.png"
if(item.connected == Wallet.ConnectionStatus_Connected){
return "../images/lightning.png"
} else {
return "qrc:///images/lightning-white.png"
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
if(!appWindow.isMining) {
middlePanel.settingsView.settingsStateViewState = "Node";
appWindow.showPageRequest("Settings");
} else {
appWindow.showPageRequest("Mining")
}
return "../images/lightning-white.png"
}
}
}
}
Item {
height: 40
width: 260
anchors.top: parent.top
anchors.left: iconItem.right
height: 40 * scaleRatio
width: 260 * scaleRatio
MoneroComponents.TextPlain {
Text {
id: statusText
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 0
font.family: MoneroComponents.Style.fontMedium.name
font.bold: true
font.pixelSize: 13
color: MoneroComponents.Style.dimmedFontColor
opacity: MoneroComponents.Style.blackTheme ? 0.65 : 0.5
font.pixelSize: 13 * scaleRatio
color: "white"
opacity: 0.5
text: qsTr("Network status") + translationManager.emptyString
themeTransition: false
}
MoneroComponents.TextPlain {
Text {
id: statusTextVal
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 14
font.family: MoneroComponents.Style.fontMedium.name
font.pixelSize: 20
color: MoneroComponents.Style.defaultFontColor
font.pixelSize: 20 * scaleRatio
color: "white"
text: getConnectionStatusString(item.connected) + translationManager.emptyString
opacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.7
themeTransition: false
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
if(!appWindow.isMining) {
middlePanel.settingsView.settingsStateViewState = "Node";
appWindow.showPageRequest("Settings");
} else {
appWindow.showPageRequest("Mining")
}
}
}
}
}
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2019, The Monero Project
// Copyright (c) 2017, The Monero Project
//
// All rights reserved.
//
@@ -26,13 +26,12 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.0
import FontAwesome 1.0
import "../components" as MoneroComponents
@@ -41,7 +40,6 @@ Item {
visible: false
z: parent.z + 2
property bool isHidden: true
property alias password: passwordInput1.text
// same signals as Dialog has
@@ -50,13 +48,11 @@ Item {
signal closeCallback()
function open() {
isHidden = true
passwordInput1.echoMode = TextInput.Password;
passwordInput2.echoMode = TextInput.Password;
inactiveOverlay.visible = true
leftPanel.enabled = false
middlePanel.enabled = false
titleBar.state = "essentials"
titleBar.enabled = false
show();
root.visible = true;
passwordInput1.text = "";
passwordInput2.text = "";
@@ -67,39 +63,43 @@ Item {
inactiveOverlay.visible = false
leftPanel.enabled = true
middlePanel.enabled = true
titleBar.state = "default"
titleBar.enabled = true
root.visible = false;
closeCallback();
}
function toggleIsHidden() {
passwordInput1.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
passwordInput2.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
isHidden = !isHidden;
}
// TODO: implement without hardcoding sizes
width: 480
height: 360
// Make window draggable
MouseArea {
anchors.fill: parent
property point lastMousePos: Qt.point(0, 0)
onPressed: { lastMousePos = Qt.point(mouseX, mouseY); }
onMouseXChanged: root.x += (mouseX - lastMousePos.x)
onMouseYChanged: root.y += (mouseY - lastMousePos.y)
}
ColumnLayout {
z: inactiveOverlay.z + 1
id: mainLayout
spacing: 10
anchors { fill: parent; margins: 35 }
anchors { fill: parent; margins: 35 * scaleRatio }
ColumnLayout {
id: column
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: 400
Layout.maximumWidth: 400 * scaleRatio
Label {
text: qsTr("Please enter new password") + translationManager.emptyString
text: qsTr("Please enter new password")
anchors.left: parent.left
Layout.fillWidth: true
font.pixelSize: 16
font.pixelSize: 16 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
@@ -109,51 +109,31 @@ Item {
id : passwordInput1
Layout.topMargin: 6
Layout.fillWidth: true
anchors.left: parent.left
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24
font.pixelSize: 24 * scaleRatio
echoMode: TextInput.Password
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
KeyNavigation.tab: passwordInput2
background: Rectangle {
radius: 2
border.color: MoneroComponents.Style.inputBorderColorInActive
border.color: Qt.rgba(255, 255, 255, 0.35)
border.width: 1
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
color: "black"
MoneroComponents.Label {
fontSize: 20
text: isHidden ? FontAwesome.eye : FontAwesome.eyeSlash
opacity: 0.7
fontFamily: FontAwesome.fontFamily
anchors.right: parent.right
anchors.rightMargin: 15
Image {
width: 12
height: 16
source: "../images/lockIcon.png"
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: {
toggleIsHidden()
}
onEntered: {
parent.opacity = 0.9
parent.fontSize = 24
}
onExited: {
parent.opacity = 0.7
parent.fontSize = 20
}
}
anchors.right: parent.right
anchors.rightMargin: 20
}
}
@@ -173,10 +153,11 @@ Item {
}
Label {
text: qsTr("Please confirm new password") + translationManager.emptyString
text: qsTr("Please confirm new password")
anchors.left: parent.left
Layout.fillWidth: true
font.pixelSize: 16
font.pixelSize: 16 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
@@ -186,51 +167,31 @@ Item {
id : passwordInput2
Layout.topMargin: 6
Layout.fillWidth: true
anchors.left: parent.left
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24
font.pixelSize: 24 * scaleRatio
echoMode: TextInput.Password
KeyNavigation.tab: okButton
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
background: Rectangle {
radius: 2
border.color: MoneroComponents.Style.inputBorderColorInActive
border.color: Qt.rgba(255, 255, 255, 0.35)
border.width: 1
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
color: "black"
MoneroComponents.Label {
fontSize: 20
text: isHidden ? FontAwesome.eye : FontAwesome.eyeSlash
opacity: 0.7
fontFamily: FontAwesome.fontFamily
anchors.right: parent.right
anchors.rightMargin: 15
Image {
width: 12
height: 16
source: "../images/lockIcon.png"
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: {
toggleIsHidden()
}
onEntered: {
parent.opacity = 0.9
parent.fontSize = 24
}
onExited: {
parent.opacity = 0.7
parent.fontSize = 20
}
}
anchors.right: parent.right
anchors.rightMargin: 20
}
}
@@ -258,7 +219,7 @@ Item {
// Ok/Cancel buttons
RowLayout {
id: buttons
spacing: 16
spacing: 16 * scaleRatio
Layout.topMargin: 16
Layout.alignment: Qt.AlignRight
@@ -273,7 +234,7 @@ Item {
}
MoneroComponents.StandardButton {
id: okButton
text: qsTr("Continue") + translationManager.emptyString
text: qsTr("Continue")
KeyNavigation.tab: cancelButton
enabled: passwordInput1.text === passwordInput2.text
onClicked: {

View File

@@ -26,17 +26,16 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Controls 1.4
import moneroComponents.Wallet 1.0
import "." as MoneroComponents
Item {
id: item
property string message: ""
property bool active: false
height: 180
width: 320
height: 120
width: 240
property int margin: 15
x: parent.width - width - margin
y: parent.height - height * scale.yScale - margin * scale.yScale
@@ -52,12 +51,11 @@ Item {
backgroundVisible: false
textFormat: TextEdit.AutoText
anchors.fill: parent
font.family: MoneroComponents.Style.fontRegular.name
font.family: "Arial"
font.pixelSize: 12
textMargin: 20
textColor: "white"
text: item.message
wrapMode: Text.WrapAnywhere
}
}
@@ -72,7 +70,7 @@ Item {
Timer {
id: hider
interval: 30000; running: false; repeat: false
interval: 12000; running: false; repeat: false
onTriggered: { item.active = false }
}

View File

@@ -1,321 +0,0 @@
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.0
import FontAwesome 1.0
import "../components" as MoneroComponents
Item {
id: root
visible: false
z: parent.z + 2
property bool isHidden: true
property alias passphrase: passphaseInput1.text
property string walletName
property string errorText
// same signals as Dialog has
signal accepted()
signal rejected()
signal closeCallback()
function open(walletName, errorText) {
isHidden = true
passphaseInput1.echoMode = TextInput.Password;
passphaseInput2.echoMode = TextInput.Password;
inactiveOverlay.visible = true
root.walletName = walletName ? walletName : ""
root.errorText = errorText ? errorText : "";
leftPanel.enabled = false
middlePanel.enabled = false
titleBar.state = "essentials"
root.visible = true;
passphaseInput1.text = "";
passphaseInput2.text = "";
passphaseInput1.focus = true
}
function close() {
inactiveOverlay.visible = false
leftPanel.enabled = true
middlePanel.enabled = true
titleBar.state = "default"
root.visible = false;
closeCallback();
}
function toggleIsHidden() {
passphaseInput1.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
passphaseInput2.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
isHidden = !isHidden;
}
function showError(errorText) {
open(root.walletName, errorText);
}
// TODO: implement without hardcoding sizes
width: 480
height: 360
ColumnLayout {
z: inactiveOverlay.z + 1
id: mainLayout
spacing: 10
anchors { fill: parent; margins: 35 }
ColumnLayout {
id: column
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: 400
Label {
text: (root.walletName.length > 0 ? qsTr("Please enter wallet device passphrase for: ") + root.walletName : qsTr("Please enter wallet device passphrase")) + translationManager.emptyString
Layout.fillWidth: true
font.pixelSize: 16
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
}
Label {
text: qsTr("Warning: passphrase entry on host is a security risk as it can be captured by malware. It is advised to prefer device-based passphrase entry.") + translationManager.emptyString
Layout.fillWidth: true
wrapMode: Text.Wrap
font.pixelSize: 14
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.warningColor
}
Label {
text: root.errorText
visible: root.errorText
color: MoneroComponents.Style.errorColor
font.pixelSize: 16
font.family: MoneroComponents.Style.fontLight.name
Layout.fillWidth: true
wrapMode: Text.Wrap
}
TextField {
id : passphaseInput1
Layout.topMargin: 6
Layout.fillWidth: true
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24
echoMode: TextInput.Password
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
KeyNavigation.tab: passphaseInput2
background: Rectangle {
radius: 2
border.color: MoneroComponents.Style.inputBorderColorInActive
border.width: 1
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
MoneroComponents.Label {
fontSize: 20
text: isHidden ? FontAwesome.eye : FontAwesome.eyeSlash
opacity: 0.7
fontFamily: FontAwesome.fontFamily
anchors.right: parent.right
anchors.rightMargin: 15
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: {
toggleIsHidden()
}
onEntered: {
parent.opacity = 0.9
parent.fontSize = 24
}
onExited: {
parent.opacity = 0.7
parent.fontSize = 20
}
}
}
}
Keys.onEscapePressed: {
root.close()
root.rejected()
}
}
// padding
Rectangle {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
height: 10
opacity: 0
color: "transparent"
}
Label {
text: qsTr("Please re-enter") + translationManager.emptyString
Layout.fillWidth: true
font.pixelSize: 16
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
}
TextField {
id : passphaseInput2
Layout.topMargin: 6
Layout.fillWidth: true
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24
echoMode: TextInput.Password
KeyNavigation.tab: okButton
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
background: Rectangle {
radius: 2
border.color: MoneroComponents.Style.inputBorderColorInActive
border.width: 1
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
MoneroComponents.Label {
fontSize: 20
text: isHidden ? FontAwesome.eye : FontAwesome.eyeSlash
opacity: 0.7
fontFamily: FontAwesome.fontFamily
anchors.right: parent.right
anchors.rightMargin: 15
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: {
toggleIsHidden()
}
onEntered: {
parent.opacity = 0.9
parent.fontSize = 24
}
onExited: {
parent.opacity = 0.7
parent.fontSize = 20
}
}
}
}
Keys.onReturnPressed: {
if (passphaseInput1.text === passphaseInput2.text) {
root.close()
root.accepted()
}
}
Keys.onEscapePressed: {
root.close()
root.rejected()
}
}
// padding
Rectangle {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
height: 10
opacity: 0
color: "black"
}
// Ok/Cancel buttons
RowLayout {
id: buttons
spacing: 16
Layout.topMargin: 16
Layout.alignment: Qt.AlignRight
MoneroComponents.StandardButton {
id: cancelButton
text: qsTr("Cancel") + translationManager.emptyString
KeyNavigation.tab: passphaseInput1
onClicked: {
root.close()
root.rejected()
}
}
MoneroComponents.StandardButton {
id: okButton
text: qsTr("Continue") + translationManager.emptyString
KeyNavigation.tab: cancelButton
enabled: passphaseInput1.text === passphaseInput2.text
onClicked: {
root.close()
root.accepted()
}
}
}
}
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2019, The Monero Project
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
@@ -26,65 +26,46 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.0
import FontAwesome 1.0
import "." as MoneroComponents
import "effects/" as MoneroEffects
import "../js/Utils.js" as Utils
import "../components" as MoneroComponents
Item {
id: root
visible: false
z: parent.z + 2
property bool isHidden: true
property alias password: passwordInput.text
property string walletName
property string errorText
property bool shiftIsPressed: false
property bool isCapsLocksActive: false
property bool backspaceIsPressed: false
// same signals as Dialog has
signal accepted()
signal rejected()
signal closeCallback()
function open(walletName, errorText) {
isHidden = true
passwordInput.echoMode = TextInput.Password
passwordInput.text = ""
passwordInput.forceActiveFocus();
function open(walletName) {
inactiveOverlay.visible = true // draw appwindow inactive
root.walletName = walletName ? walletName : ""
errorTextLabel.text = errorText ? errorText : "";
leftPanel.enabled = false
middlePanel.enabled = false
titleBar.state = "essentials"
titleBar.enabled = false
show()
root.visible = true;
appWindow.hideBalanceForced = true;
appWindow.updateBalance();
}
function showError(errorText) {
open(root.walletName, errorText);
passwordInput.forceActiveFocus();
passwordInput.text = ""
}
function close() {
inactiveOverlay.visible = false
leftPanel.enabled = true
middlePanel.enabled = true
titleBar.state = "default"
titleBar.enabled = true
root.visible = false;
appWindow.hideBalanceForced = false;
appWindow.updateBalance();
closeCallback();
}
@@ -92,103 +73,57 @@ Item {
z: inactiveOverlay.z + 1
id: mainLayout
spacing: 10
anchors { fill: parent; margins: 35 }
anchors { fill: parent; margins: 35 * scaleRatio }
ColumnLayout {
id: column
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
Layout.maximumWidth: 400
Layout.maximumWidth: 400 * scaleRatio
Label {
text: (root.walletName.length > 0 ? qsTr("Please enter wallet password for: ") + root.walletName : qsTr("Please enter wallet password")) + translationManager.emptyString
text: root.walletName.length > 0 ? qsTr("Please enter wallet password for: ") + root.walletName : qsTr("Please enter wallet password")
anchors.left: parent.left
Layout.fillWidth: true
font.pixelSize: 16
font.pixelSize: 16 * scaleRatio
font.family: MoneroComponents.Style.fontLight.name
color: MoneroComponents.Style.defaultFontColor
}
Label {
id: errorTextLabel
visible: root.errorText || text !== ""
color: MoneroComponents.Style.errorColor
font.pixelSize: 16
font.family: MoneroComponents.Style.fontLight.name
Layout.fillWidth: true
wrapMode: Text.Wrap
}
TextField {
id : passwordInput
Layout.topMargin: 6
Layout.fillWidth: true
anchors.left: parent.left
horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
font.family: MoneroComponents.Style.fontLight.name
font.pixelSize: 24
font.pixelSize: 24 * scaleRatio
echoMode: TextInput.Password
KeyNavigation.tab: okButton
bottomPadding: 10
leftPadding: 10
topPadding: 10
color: MoneroComponents.Style.defaultFontColor
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
onTextChanged: {
var letter = text[passwordInput.text.length - 1];
isCapsLocksActive = Utils.isUpperLock(shiftIsPressed, letter);
if(isCapsLocksActive && !backspaceIsPressed){
errorTextLabel.text = qsTr("CAPSLOCKS IS ON.") + translationManager.emptyString;
}
else{
errorTextLabel.text = "";
}
}
selectionColor: MoneroComponents.Style.dimmedFontColor
selectedTextColor: MoneroComponents.Style.defaultFontColor
background: Rectangle {
radius: 2
color: MoneroComponents.Style.blackTheme ? "black" : "#A9FFFFFF"
border.color: MoneroComponents.Style.inputBorderColorInActive
border.color: Qt.rgba(255, 255, 255, 0.35)
border.width: 1
color: "black"
MoneroEffects.ColorTransition {
targetObj: parent
blackColor: "black"
whiteColor: "#A9FFFFFF"
}
MoneroComponents.Label {
fontSize: 20
text: isHidden ? FontAwesome.eye : FontAwesome.eyeSlash
opacity: 0.7
fontFamily: FontAwesome.fontFamily
anchors.right: parent.right
anchors.rightMargin: 15
Image {
width: 12
height: 16
source: "../images/lockIcon.png"
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: 1
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onClicked: {
passwordInput.echoMode = isHidden ? TextInput.Normal : TextInput.Password;
isHidden = !isHidden;
}
onEntered: {
parent.opacity = 0.9
parent.fontSize = 24
}
onExited: {
parent.opacity = 0.7
parent.fontSize = 20
}
}
anchors.right: parent.right
anchors.rightMargin: 20
}
}
@@ -196,40 +131,26 @@ Item {
Keys.onReturnPressed: {
root.close()
root.accepted()
}
Keys.onEscapePressed: {
root.close()
root.rejected()
}
Keys.onPressed: {
if(event.key === Qt.Key_Shift){
shiftIsPressed = true;
}
if(event.key === Qt.Key_Backspace){
backspaceIsPressed = true;
}
}
Keys.onReleased: {
if(event.key === Qt.Key_Shift){
shiftIsPressed = false;
}
if(event.key === Qt.Key_Backspace){
backspaceIsPressed =false;
}
}
}
// Ok/Cancel buttons
RowLayout {
id: buttons
spacing: 16
spacing: 16 * scaleRatio
Layout.topMargin: 16
Layout.alignment: Qt.AlignRight
MoneroComponents.StandardButton {
id: cancelButton
small: true
text: root.walletName.length > 0 ? qsTr("Change wallet") + translationManager.emptyString : qsTr("Cancel") + translationManager.emptyString
text: qsTr("Cancel") + translationManager.emptyString
KeyNavigation.tab: passwordInput
onClicked: {
root.close()
@@ -240,7 +161,7 @@ Item {
MoneroComponents.StandardButton {
id: okButton
small: true
text: qsTr("Continue") + translationManager.emptyString
text: qsTr("Continue")
KeyNavigation.tab: cancelButton
onClicked: {
root.close()

153
components/PrivacyLevel.qml Normal file
View File

@@ -0,0 +1,153 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @TODO: Remove component after wizard redesign
import QtQuick 2.0
Item {
id: item
property int fillLevel: 0
height: 70
clip: true
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
height: 24
//radius: 4
color: "#DBDBDB"
}
Rectangle {
id: bar
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 1
height: 24
//radius: 4
color: "#FFFFFF"
Rectangle {
id: fillRect
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.margins: 4
//radius: 2
width: row.x
color: "#FF6C3C"
Timer {
interval: 500
running: true
repeat: false
onTriggered: fillRect.loaded = true
}
property bool loaded: false
Behavior on width {
enabled: fillRect.loaded
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
}
MouseArea {
anchors.fill: parent
function positionBar() {
var xDiff = 999999
var index = -1
for(var i = 0; i < 14; ++i) {
var tmp = Math.abs(row.positions[i].currentX + row.x - mouseX)
if(tmp < xDiff) {
xDiff = tmp
index = i
}
}
if(index !== -1) {
fillRect.width = Qt.binding(function(){ return row.positions[index].currentX + row.x })
item.fillLevel = index
}
}
onClicked: positionBar()
onMouseXChanged: positionBar()
}
}
Row {
id: row
anchors.right: bar.right
anchors.rightMargin: 8
anchors.top: bar.bottom
anchors.topMargin: -1
property var positions: new Array()
Row {
id: row2
spacing: bar.width / 14
Repeater {
model: 4
delegate: TickDelegate {
id: delegateItem2
currentX: x + row2.x
currentIndex: index
mainTick: currentIndex === 0
Component.onCompleted: {
row.positions[currentIndex] = delegateItem2
}
}
}
}
Row {
id: row1
spacing: bar.width / 14
Repeater {
model: 10
delegate: TickDelegate {
id: delegateItem1
currentX: x + row1.x
currentIndex: index + 4
mainTick: currentIndex === 13
Component.onCompleted: {
row.positions[currentIndex] = delegateItem1
}
}
}
}
}
}

View File

@@ -0,0 +1,193 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// @TODO: Remove component after wizard redesign
import QtQuick 2.0
Item {
id: item
property alias interactive: mouseArea.enabled
property alias background: bar.color
property int fillLevel: 0
height: 40
clip: true
onFillLevelChanged: {
if (!interactive) {
//print("fillLevel: " + fillLevel)
fillRect.width = row.positions[fillLevel].currentX + row.x
}
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
height: 24
//radius: 4
color: "#DBDBDB"
}
Rectangle {
id: bar
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 1
height: 24
//radius: 4
color: "#FFFFFF"
Rectangle {
id: fillRect
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.margins: 4
//radius: 2
width: row.x
color: "#FF6C3C"
Timer {
interval: 500
running: true
repeat: false
onTriggered: fillRect.loaded = true
}
property bool loaded: false
Behavior on width {
enabled: fillRect.loaded
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
}
Text {
anchors.verticalCenter: parent.verticalCenter
font.family: "Arial"
font.pixelSize: 15
color: "#000000"
x: row.x + (row.positions[0] !== undefined ? row.positions[0].currentX - 3 : 0) - width
text: qsTr("Low") + translationManager.emptyString
}
Text {
anchors.verticalCenter: parent.verticalCenter
font.family: "Arial"
font.pixelSize: 15
color: "#000000"
x: row.x + (row.positions[4] !== undefined ? row.positions[4].currentX - 3 : 0) - width
text: qsTr("Medium") + translationManager.emptyString
}
Text {
anchors.verticalCenter: parent.verticalCenter
font.family: "Arial"
font.pixelSize: 15
color: "#000000"
x: row.x + (row.positions[13] !== undefined ? row.positions[13].currentX - 3 : 0) - width
text: qsTr("High") + translationManager.emptyString
}
MouseArea {
id: mouseArea
anchors.fill: parent
function positionBar() {
var xDiff = 999999
var index = -1
for(var i = 0; i < 14; ++i) {
var tmp = Math.abs(row.positions[i].currentX + row.x - mouseX)
if(tmp < xDiff) {
xDiff = tmp
index = i
}
}
if(index !== -1) {
fillRect.width = Qt.binding(function(){ return row.positions[index].currentX + row.x })
item.fillLevel = index
print ("fillLevel: " + item.fillLevel)
}
}
onClicked: positionBar()
onMouseXChanged: positionBar()
}
}
Row {
id: row
anchors.right: bar.right
anchors.rightMargin: 8
anchors.top: bar.bottom
anchors.topMargin: 5
property var positions: []
Row {
id: row2
spacing: ((bar.width - 8) / 2.23) / 4
Repeater {
model: 4
delegate: Rectangle {
id: delegateItem2
property int currentX: x + row2.x
height: 8
width: 1
color: "#DBDBDB"
Component.onCompleted: {
row.positions[index] = delegateItem2
}
}
}
}
Row {
id: row1
spacing: ((bar.width - 8) / 2.23) / 10
Repeater {
model: 10
delegate: Rectangle {
id: delegateItem1
property int currentX: x + row1.x
height: index === 4 ? 8 : 4
width: 1
color: "#DBDBDB"
Component.onCompleted: {
row.positions[index + 4] = delegateItem1
}
}
}
}
}
}

View File

@@ -26,23 +26,21 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Window 2.1
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
Rectangle {
id: root
color: MoneroComponents.Style.blackTheme ? "white" : "transparent"
color: "white"
visible: false
z: 11
z:11
property alias messageText: messageTitle.text
property alias heightProgressText : heightProgress.text
width: 200
height: 100
width: 200 * scaleRatio
height: 100 * scaleRatio
opacity: 0.7
function show() {
@@ -60,40 +58,34 @@ Rectangle {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 30
anchors.rightMargin: 30
spacing: 12
anchors.leftMargin: 30 * scaleRatio
anchors.rightMargin: 30 * scaleRatio
BusyIndicator {
running: parent.visible
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
}
MoneroComponents.TextPlain {
Text {
id: messageTitle
text: "Please wait..."
font {
pixelSize: 22
pixelSize: 22 * scaleRatio
}
horizontalAlignment: Text.AlignHCenter
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
Layout.fillWidth: true
themeTransition: false
color: "black"
}
MoneroComponents.TextPlain {
Text {
id: heightProgress
font {
pixelSize: 18
pixelSize: 18 * scaleRatio
}
horizontalAlignment: Text.AlignHCenter
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
Layout.fillWidth: true
themeTransition: false
color: "black"
}
}
}

View File

@@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import moneroComponents.Wallet 1.0
import "../components" as MoneroComponents
@@ -46,71 +46,53 @@ Rectangle {
fillLevel = progressLevel
if(typeof statusTxt != "undefined" && statusTxt != "") {
progressText.text = statusTxt;
progressTextValue.text = "";
} else {
progressText.text = syncText;
progressTextValue.text = remaining.toFixed(0);
progressText.text = syncText + remaining.toFixed(0);
}
}
}
Item {
anchors.top: item.top
anchors.topMargin: 10
anchors.leftMargin: 15
anchors.rightMargin: 15
anchors.topMargin: 10 * scaleRatio
anchors.leftMargin: 15 * scaleRatio
anchors.rightMargin: 15 * scaleRatio
anchors.fill: parent
MoneroComponents.TextPlain {
Text {
id: progressText
anchors.top: parent.top
anchors.topMargin: 6
font.family: MoneroComponents.Style.fontMedium.name
font.pixelSize: 13
font.bold: MoneroComponents.Style.progressBarProgressTextBold
color: MoneroComponents.Style.defaultFontColor
font.pixelSize: 13 * scaleRatio
font.bold: true
color: "white"
text: qsTr("Synchronizing %1").arg(syncType) + translationManager.emptyString
height: 18
height: 18 * scaleRatio
}
MoneroComponents.TextPlain {
Text {
id: progressTextValue
anchors.top: parent.top
anchors.topMargin: 6
anchors.right: parent.right
font.family: MoneroComponents.Style.fontMedium.name
font.pixelSize: 13
font.bold: MoneroComponents.Style.progressBarProgressTextBold
color: MoneroComponents.Style.defaultFontColor
height:18
font.pixelSize: 13 * scaleRatio
font.bold: true
color: "white"
height:18 * scaleRatio
}
Rectangle {
id: bar
anchors.left: parent.left
anchors.right: parent.right
anchors.top: progressText.bottom
anchors.topMargin: 4
height: 8
radius: 8
color: MoneroComponents.Style.progressBarBackgroundColor
states: [
State {
name: "black";
when: MoneroComponents.Style.blackTheme
PropertyChanges { target: bar; color: MoneroComponents.Style._b_progressBarBackgroundColor}
}, State {
name: "white";
when: !MoneroComponents.Style.blackTheme
PropertyChanges { target: bar; color: MoneroComponents.Style._w_progressBarBackgroundColor}
}
]
transitions: Transition {
enabled: appWindow.themeTransition
ColorAnimation { properties: "color"; easing.type: Easing.InOutQuad; duration: 300 }
}
height: 8 * scaleRatio
radius: 8 * scaleRatio
color: "#333333" // progressbar bg
Rectangle {
id: fillRect
@@ -118,9 +100,10 @@ Rectangle {
anchors.bottom: parent.bottom
anchors.left: parent.left
height: bar.height
property int maxWidth: bar.width
property int maxWidth: bar.width * scaleRatio
width: (maxWidth * fillLevel) / 100
radius: 8
// could change color based on progressbar status; if(item.fillLevel < 99 )
color: "#FA6800"
}
@@ -128,9 +111,12 @@ Rectangle {
color:"#333"
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.leftMargin: 8
anchors.leftMargin: 8 * scaleRatio
}
}
}
}

View File

@@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtMultimedia 5.4
import QtQuick.Dialogs 1.2
import moneroComponents.QRCodeScanner 1.0

View File

@@ -26,23 +26,22 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
Item {
RowLayout {
id: radioButton
property alias text: label.text
property bool checked: false
property int fontSize: 14
property int fontSize: 14 * scaleRatio
property alias fontColor: label.color
signal clicked()
height: 26
width: layout.width
height: 26 * scaleRatio
// legacy properties
property var checkedColor: MoneroComponents.Style.blackTheme ? "white" : "#666666"
property var borderColor: checked ? MoneroComponents.Style.inputBorderColorActive : MoneroComponents.Style.inputBorderColorInActive
property var checkedColor: "white"
property var borderColor: checked ? Qt.rgba(1, 1, 1, 0.35) : Qt.rgba(1, 1, 1, 0.25)
function toggle(){
radioButton.checked = !radioButton.checked
@@ -50,14 +49,15 @@ Item {
}
RowLayout {
id: layout
Layout.fillWidth: true
Rectangle {
id: button
anchors.left: parent.left
y: 0
color: "transparent"
border.color: borderColor
height: radioButton.height
width: radioButton.height
height: radioButton.height
radius: radioButton.height
Rectangle {
@@ -65,28 +65,37 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
color: checkedColor
width: 10
height: 10
width: 10 * scaleRatio
height: 10 * scaleRatio
radius: 10
opacity: 0.8
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
toggle()
}
}
}
MoneroComponents.TextPlain {
Text {
id: label
Layout.leftMargin: (!isMobile ? 10 : 8)
anchors.left: button.right
anchors.leftMargin: !isMobile ? 10 : 8
color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: radioButton.fontSize
wrapMode: Text.Wrap
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
toggle()
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
toggle()
}
}
}
}
}

View File

@@ -28,10 +28,9 @@
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QtQuick 2.9
import QtQuick 2.2
import QtQuick.Layouts 1.1
import "../js/Utils.js" as Utils
import "../components" as MoneroComponents
GridLayout {
@@ -47,36 +46,24 @@ GridLayout {
// the wizards get redesigned to the black-theme
property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name
property bool placeholderFontBold: false
property int placeholderFontSize: 15
property int placeholderFontSize: 18 * scaleRatio
property string placeholderColor: MoneroComponents.Style.defaultFontColor
property real placeholderOpacity: 0.35
property int labelFontSize: 14
property string lineEditBackgroundColor: "transparent"
property string lineEditBorderColor: MoneroComponents.Style.inputBorderColorInActive
property string lineEditFontColor: MoneroComponents.Style.defaultFontColor
property bool lineEditFontBold: false
property int lineEditFontSize: 15
property string lineEditBorderColor: Qt.rgba(0, 0, 0, 0.15)
property string lineEditBackgroundColor: "white"
property string lineEditFontColor: "black"
property int lineEditFontSize: 18 * scaleRatio
property int labelFontSize: 16 * scaleRatio
property bool lineEditFontBold: true
signal editingFinished()
signal textChanged()
function isValid() {
return daemonAddr.text.trim().length > 0 && daemonPort.acceptableInput
}
function getAddress() {
var addr = daemonAddr.text.trim();
var port = daemonPort.text.trim();
// validation
if(addr === "" || addr.length < 2) return "";
if(!Utils.isNumeric(port)) return "";
return addr + ":" + port;
return daemonAddr.text.trim() + ":" + daemonPort.text.trim()
}
LineEdit {
LineEditMulti {
id: daemonAddr
Layout.fillWidth: true
placeholderText: qsTr("Remote Node Hostname / IP") + translationManager.emptyString
@@ -92,10 +79,9 @@ GridLayout {
fontBold: lineEditFontBold
fontSize: lineEditFontSize
onEditingFinished: root.editingFinished()
onTextChanged: root.textChanged()
}
LineEdit {
LineEditMulti {
id: daemonPort
Layout.fillWidth: true
placeholderText: qsTr("Port") + translationManager.emptyString
@@ -110,9 +96,7 @@ GridLayout {
fontColor: lineEditFontColor
fontBold: lineEditFontBold
fontSize: lineEditFontSize
validator: IntValidator{bottom: 1; top: 65535;}
onEditingFinished: root.editingFinished()
onTextChanged: root.textChanged()
}
}

View File

@@ -26,15 +26,11 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import "." as MoneroComponents
import QtQuick 2.0
Item {
id: scrollItem
property var flickable
property alias scrollColor: scroll.color
property alias scrollWidth: scroll.width
property alias scrollRadius: scroll.radius
width: 15
z: 1
@@ -56,14 +52,13 @@ Item {
id: scroll
width: 4
radius: width / 2
height: {
var t = (flickable.height * flickable.height) / flickable.contentHeight
return t < 50 ? 50 : t
return t < 20 ? 20 : t
}
y: 0; x: 0
color: MoneroComponents.Style.orange
opacity: flickable.moving || handleArea.pressed || scrollArea.containsMouse ? 0.8 : 0
color: "#DBDBDB"
opacity: flickable.moving || handleArea.pressed || scrollArea.containsMouse ? 0.5 : 0
visible: flickable.contentHeight > flickable.height
Behavior on opacity {

229
components/SearchInput.qml Normal file
View File

@@ -0,0 +1,229 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import "../components" as MoneroComponents
Item {
id: item
signal searchClicked(string text, int option)
height: 50
Rectangle {
anchors.fill: parent
color: "#DBDBDB"
//radius: 4
}
Rectangle {
anchors.fill: parent
anchors.topMargin: 1
color: "#FFFFFF"
//radius: 4
Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
width: 45
Image {
anchors.centerIn: parent
source: "../images/magnifier.png"
}
}
Input {
id: input
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: dropdown.left
anchors.leftMargin: 45
font.pixelSize: 18
verticalAlignment: TextInput.AlignVCenter
placeholderText: qsTr("Search by...") + translationManager.emptyString
}
Item {
id: dropdown
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: button.left
width: 154
function hide() { droplist.height = 0 }
function containsPoint(px, py) {
if(px < 0)
return false
if(px > width)
return false
if(py < 0)
return false
if(py > height + droplist.height)
return false
return true
}
Row {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
Text {
id: dropText
width: 114 - 12
anchors.verticalCenter: parent.verticalCenter
font.family: "Arial"
font.pixelSize: 12
font.bold: true
color: "#4A4747"
text: "NAME"
}
Image {
anchors.verticalCenter: parent.verticalCenter
source: "../images/hseparator.png"
}
Item {
height: dropdown.height
width: 38
Image {
id: dropIndicator
anchors.centerIn: parent
source: "../images/dropIndicator.png"
rotation: droplist.height === 0 ? 0 : 180
}
}
}
MouseArea {
anchors.fill: parent
onClicked: {
if(droplist.height === 0) {
appWindow.currentItem = dropdown
droplist.height = dropcolumn.height + 2
} else {
droplist.height = 0
}
}
}
}
Rectangle {
id: droplist
property int currentOption: 0
width: 154
height: 0
clip: true
x: dropdown.x
y: dropdown.height
border.width: 1
border.color: "#DBDBDB"
color: "#FFFFFF"
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.leftMargin: 1
anchors.rightMargin: 1
height: 1
color: "#FFFFFF"
}
Behavior on height {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
ListModel {
id: dropdownModel
ListElement { name: "NAME" }
ListElement { name: "DESCRIPTION" }
ListElement { name: "ADDRESS" }
}
Column {
id: dropcolumn
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.margins: 1
Repeater {
model: dropdownModel
delegate: Rectangle {
property bool isCurrent: name === dropText.text
anchors.left: parent.left
anchors.right: parent.right
height: 30
color: delegateArea.pressed || isCurrent ? "#4A4646" : "#FFFFFF"
Text {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: parent.right
elide: Text.ElideRight
anchors.leftMargin: 12
anchors.rightMargin: 12
font.family: "Arial"
font.bold: true
font.pixelSize: 12
color: delegateArea.pressed || parent.isCurrent ? "#FFFFFF" : "#4A4646"
text: name
}
MouseArea {
id: delegateArea
anchors.fill: parent
onClicked: {
droplist.currentOption = index
droplist.height = 0
dropText.text = name
}
}
}
}
}
}
MoneroComponents.StandardButton {
id: button
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.margins: 6
width: 80
text: qsTr("SEARCH")
onClicked: item.searchClicked(input.text, droplist.currentOption)
}
}
}

View File

@@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
@@ -35,113 +35,105 @@ Item {
id: button
property string rightIcon: ""
property string rightIconInactive: ""
property string icon: ""
property string textColor: button.enabled? MoneroComponents.Style.buttonTextColor: MoneroComponents.Style.buttonTextColorDisabled
property string textAlign: rightIcon !== "" ? "left" : "center"
property bool small: false
property alias text: label.text
property int fontSize: {
if(small) return 14;
else return 16;
if(small) return 14 * scaleRatio;
else return 16 * scaleRatio;
}
property alias label: label
signal clicked()
height: small ? 30 : 36
width: buttonLayout.width + 22
implicitHeight: height
implicitWidth: width
// Dynamic height/width
Layout.minimumWidth: {
var _padding = 22;
if(button.rightIcon !== ""){
_padding += 60;
}
function doClick(){
var _width = label.contentWidth + _padding;
if(_width <= 50) {
return 60;
}
return _width;
}
height: small ? 30 * scaleRatio : 36 * scaleRatio
function doClick() {
// Android workaround
releaseFocus();
clicked();
}
Rectangle {
id: buttonRect
anchors.fill: parent
anchors.left: parent.left
anchors.right: parent.right
height: parent.height - 1
radius: 3
color: parent.enabled ? MoneroComponents.Style.buttonBackgroundColor : MoneroComponents.Style.buttonBackgroundColorDisabled
border.width: parent.focus ? 1 : 0
state: button.enabled ? "active" : "disabled"
Component.onCompleted: state = state
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
states: [
State {
name: "hover"
when: buttonArea.containsMouse || button.focus
PropertyChanges {
target: buttonRect
color: MoneroComponents.Style.buttonBackgroundColorHover
}
},
State {
name: "active"
when: button.enabled
PropertyChanges {
target: buttonRect
color: MoneroComponents.Style.buttonBackgroundColor
}
},
State {
name: "disabled"
when: !button.enabled
PropertyChanges {
target: buttonRect
color: MoneroComponents.Style.buttonBackgroundColorDisabled
}
propagateComposedEvents: true
// possibly do some hover effects here
onEntered: {
// if(button.enabled) parent.color = Style.buttonBackgroundColorHover;
// else parent.color = Style.buttonBackgroundColorDisabledHover;
}
onExited: {
// if(button.enabled) parent.color = Style.buttonBackgroundColor;
// else parent.color = Style.buttonBackgroundColorDisabled;
}
]
transitions: Transition {
enabled: appWindow.themeTransition
ColorAnimation { duration: 100 }
}
}
RowLayout {
id: buttonLayout
height: button.height
spacing: 11
Text {
id: label
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: parent.right
horizontalAlignment: textAlign === "center" ? Text.AlignHCenter : Text.AlignLeft
anchors.leftMargin: textAlign === "center" ? 0 : 11
font.family: MoneroComponents.Style.fontBold.name
font.bold: true
font.pixelSize: buttonArea.pressed ? button.fontSize - 1 : button.fontSize
color: parent.textColor
visible: parent.icon === ""
}
Image {
anchors.centerIn: parent
visible: parent.icon !== ""
source: parent.icon
}
MoneroComponents.TextPlain {
id: label
font.family: MoneroComponents.Style.fontBold.name
font.bold: true
font.pixelSize: button.fontSize
color: !buttonArea.pressed ? button.textColor : "transparent"
visible: text !== ""
themeTransition: false
MoneroComponents.TextPlain {
anchors.centerIn: parent
color: button.textColor
font.bold: label.font.bold
font.family: label.font.family
font.pixelSize: label.font.pixelSize - 1
text: label.text
opacity: buttonArea.pressed ? 1 : 0
themeTransition: false
}
}
Image {
visible: button.rightIcon !== ""
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
width: button.small ? 16 : 20
height: button.small ? 16 : 20
source: {
if(button.rightIconInactive !== "" && !button.enabled) {
return button.rightIconInactive;
}
return button.rightIcon;
Image {
visible: parent.rightIcon !== ""
anchors.right: parent.right
anchors.rightMargin: 11 * scaleRatio
anchors.verticalCenter: parent.verticalCenter
width: parent.small ? 16 * scaleRatio : 20 * scaleRatio
height: parent.small ? 16 * scaleRatio : 20 * scaleRatio
source: {
if(parent.rightIconInactive !== "" && !parent.enabled){
return parent.rightIconInactive;
}
return parent.rightIcon;
}
}
MouseArea {
id: buttonArea
anchors.fill: parent
hoverEnabled: true
onClicked: doClick()
cursorShape: Qt.PointingHandCursor
}

View File

@@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.0
import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
@@ -34,7 +34,6 @@ import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.0
import "../components" as MoneroComponents
import "effects/" as MoneroEffects
Rectangle {
id: root
@@ -48,7 +47,6 @@ Rectangle {
property alias textArea: dialogContent
property alias okText: okButton.text
property alias cancelText: cancelButton.text
property alias closeVisible: closeButton.visible
property var icon
@@ -57,18 +55,12 @@ Rectangle {
signal rejected()
signal closeCallback();
// background
MoneroEffects.GradientBackground {
anchors.fill: parent
fallBackColor: MoneroComponents.Style.middlePanelBackgroundColor
initialStartColor: MoneroComponents.Style.middlePanelBackgroundGradientStart
initialStopColor: MoneroComponents.Style.middlePanelBackgroundGradientStop
blackColorStart: MoneroComponents.Style._b_middlePanelBackgroundGradientStart
blackColorStop: MoneroComponents.Style._b_middlePanelBackgroundGradientStop
whiteColorStart: MoneroComponents.Style._w_middlePanelBackgroundGradientStart
whiteColorStop: MoneroComponents.Style._w_middlePanelBackgroundGradientStop
start: Qt.point(0, 0)
end: Qt.point(height, width)
Image {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
source: "../images/middlePanelBg.jpg"
}
// Make window draggable
@@ -86,6 +78,7 @@ Rectangle {
root.x = parent.width/2 - root.width/2
root.y = 100
}
show()
root.z = 11
root.visible = true;
}
@@ -102,57 +95,49 @@ Rectangle {
ColumnLayout {
id: mainLayout
spacing: 10
anchors.fill: parent
anchors.margins: (isMobile? 17 : 20)
anchors { fill: parent; margins: 15 }
RowLayout {
id: column
Layout.topMargin: 14
Layout.fillWidth: true
//anchors {fill: parent; margins: 16 }
Layout.topMargin: 14 * scaleRatio
Layout.alignment: Qt.AlignHCenter
MoneroComponents.Label {
id: dialogTitle
fontSize: 18
horizontalAlignment: Text.AlignHCenter
fontSize: 18 * scaleRatio
fontFamily: "Arial"
color: MoneroComponents.Style.defaultFontColor
}
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
Layout.preferredHeight: 240
RowLayout {
TextArea {
id : dialogContent
Layout.fillWidth: true
Layout.fillHeight: true
renderType: Text.QtRendering
font.family: MoneroComponents.Style.fontLight.name
textFormat: TextEdit.AutoText
readOnly: true
font.pixelSize: 14 * scaleRatio
selectByMouse: false
wrapMode: TextEdit.Wrap
color: MoneroComponents.Style.defaultFontColor
Flickable {
id: flickable
anchors.fill: parent
ScrollBar.vertical: ScrollBar { }
TextArea.flickable: TextArea {
id: dialogContent
Layout.fillWidth: true
Layout.fillHeight: true
renderType: Text.QtRendering
font.family: MoneroComponents.Style.fontLight.name
textFormat: TextEdit.AutoText
readOnly: true
font.pixelSize: 14
selectByMouse: false
wrapMode: TextEdit.Wrap
color: MoneroComponents.Style.defaultFontColor
MouseArea {
anchors.fill: parent
onClicked: {
appWindow.showStatusMessage(qsTr("Double tap to copy"),3)
}
onDoubleClicked: {
parent.selectAll()
parent.copy()
parent.deselect()
console.log("copied to clipboard");
appWindow.showStatusMessage(qsTr("Content copied to clipboard"),3)
}
MouseArea {
anchors.fill: parent
onClicked: {
appWindow.showStatusMessage(qsTr("Double tap to copy"),3)
}
onDoubleClicked: {
parent.selectAll()
parent.copy()
parent.deselect()
console.log("copied to clipboard");
appWindow.showStatusMessage(qsTr("Content copied to clipboard"),3)
}
}
}
@@ -175,46 +160,17 @@ Rectangle {
MoneroComponents.StandardButton {
id: okButton
text: qsTr("OK") + translationManager.emptyString
text: qsTr("OK")
KeyNavigation.tab: cancelButton
onClicked: {
root.close()
root.accepted()
}
}
}
}
// close icon
Rectangle {
id: closeButton
anchors.top: parent.top
anchors.right: parent.right
width: 48
height: 48
color: "transparent"
MoneroEffects.ImageMask {
anchors.centerIn: parent
width: 16
height: 16
image: MoneroComponents.Style.titleBarCloseSource
color: MoneroComponents.Style.defaultFontColor
opacity: 0.75
}
MouseArea {
anchors.fill: parent
onClicked: {
root.close()
root.rejected()
}
cursorShape: Qt.PointingHandCursor
onEntered: closeButton.color = "#262626";
onExited: closeButton.color = "transparent";
}
}
// window borders
Rectangle{
width: 1

View File

@@ -26,11 +26,9 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtGraphicalEffects 1.0
import QtQuick 2.0
import "../components" as MoneroComponents
import "../components/effects/" as MoneroEffects
Item {
id: dropdown
@@ -38,14 +36,14 @@ Item {
property alias dataModel: repeater.model
property string shadowPressedColor
property string shadowReleasedColor
property string pressedColor: MoneroComponents.Style.appWindowBorderColor
property string releasedColor: MoneroComponents.Style.titleBarButtonHoverColor
property string textColor: MoneroComponents.Style.defaultFontColor
property alias currentIndex: columnid.currentIndex
property string pressedColor
property string releasedColor
property string textColor: "#FFFFFF"
property alias currentIndex: column.currentIndex
property bool expanded: false
property int dropdownHeight: 42
property int fontHeaderSize: 16
property int fontItemSize: 14
property int fontHeaderSize: 16 * scaleRatio
property int fontItemSize: 14 * scaleRatio
property string colorBorder: MoneroComponents.Style.inputBorderColorInActive
property string colorHeaderBackground: "transparent"
property bool headerBorder: true
@@ -71,7 +69,7 @@ Item {
// Workaroud for suspected memory leak in 5.8 causing malloc crash on app exit
function update() {
firstColText.text = columnid.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(columnid.currentIndex).column1) + translationManager.emptyString : ""
firstColText.text = column.currentIndex < repeater.model.rowCount() ? qsTr(repeater.model.get(column.currentIndex).column1) + translationManager.emptyString : ""
}
Item {
@@ -83,23 +81,23 @@ Item {
height: dropdown.dropdownHeight
Rectangle {
color: "transparent"
color: dropdown.colorHeaderBackground
border.width: dropdown.headerBorder ? 1 : 0
border.color: dropdown.colorBorder
radius: 4
anchors.fill: parent
}
MoneroComponents.TextPlain {
Text {
id: firstColText
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 12
anchors.leftMargin: 12 * scaleRatio
elide: Text.ElideRight
font.family: MoneroComponents.Style.fontRegular.name
font.bold: dropdown.headerFontBold
font.pixelSize: dropdown.fontHeaderSize
color: dropdown.textColor
color: "#FFFFFF"
}
Item {
@@ -107,21 +105,12 @@ Item {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
width: 32
width: 32 * scaleRatio
Image {
id: dropdownIcon
anchors.centerIn: parent
source: "qrc:///images/whiteDropIndicator.png"
visible: false
}
ColorOverlay {
source: dropdownIcon
anchors.fill: dropdownIcon
color: MoneroComponents.Style.defaultFontColor
rotation: dropdown.expanded ? 180 : 0
opacity: 1
source: "../images/whiteDropIndicator.png"
rotation: dropdown.expanded ? 180 * scaleRatio : 0
}
}
@@ -140,20 +129,21 @@ Item {
anchors.right: parent.right
anchors.top: head.bottom
clip: true
height: dropdown.expanded ? columnid.height : 0
height: dropdown.expanded ? column.height : 0
color: dropdown.pressedColor
//radius: 4
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
width: 3; height: 3
width: 3 * scaleRatio; height: 3 * scaleRatio
color: dropdown.pressedColor
}
Rectangle {
anchors.right: parent.right
anchors.top: parent.top
width: 3; height: 3
width: 3 * scaleRatio; height: 3 * scaleRatio
color: dropdown.pressedColor
}
@@ -162,7 +152,7 @@ Item {
}
Column {
id: columnid
id: column
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
@@ -186,31 +176,31 @@ Item {
delegate: Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: (dropdown.dropdownHeight * 0.75)
height: (dropdown.dropdownHeight * 0.75) * scaleRatio
//radius: index === repeater.count - 1 ? 4 : 0
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor
color: itemArea.containsMouse || index === column.currentIndex || itemArea.containsMouse ? dropdown.releasedColor : dropdown.pressedColor
MoneroComponents.TextPlain {
Text {
id: col1Text
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: col2Text.left
anchors.leftMargin: 12
anchors.leftMargin: 12 * scaleRatio
anchors.rightMargin: 0
font.family: MoneroComponents.Style.fontRegular.name
font.bold: true
font.pixelSize: fontItemSize
color: itemArea.containsMouse || index === columnid.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF"
color: itemArea.containsMouse || index === column.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF"
text: qsTr(column1) + translationManager.emptyString
}
MoneroComponents.TextPlain {
Text {
id: col2Text
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 45
anchors.rightMargin: 45 * scaleRatio
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
font.pixelSize: 14 * scaleRatio
color: "#FFFFFF"
text: ""
}
@@ -218,14 +208,14 @@ Item {
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
width: 3; height: 3
width: 3 * scaleRatio; height: 3 * scaleRatio
color: parent.color
}
Rectangle {
anchors.right: parent.right
anchors.top: parent.top
width: 3; height: 3
width: 3 * scaleRatio; height: 3 * scaleRatio
color: parent.color
}
@@ -237,7 +227,7 @@ Item {
onClicked: {
dropdown.expanded = false
columnid.currentIndex = index
column.currentIndex = index
changed();
dropdown.update()
}

View File

@@ -3,192 +3,29 @@ pragma Singleton
import QtQuick 2.5
QtObject {
property bool blackTheme: true
property QtObject fontMedium: FontLoader { id: _fontMedium; source: "qrc:/fonts/Roboto-Medium.ttf"; }
property QtObject fontBold: FontLoader { id: _fontBold; source: "qrc:/fonts/Roboto-Bold.ttf"; }
property QtObject fontLight: FontLoader { id: _fontLight; source: "qrc:/fonts/Roboto-Light.ttf"; }
property QtObject fontRegular: FontLoader { id: _fontRegular; source: "qrc:/fonts/Roboto-Regular.ttf"; }
property QtObject fontMonoMedium: FontLoader { id: _fontMonoMedium; source: "qrc:/fonts/RobotoMono-Medium.ttf"; }
property QtObject fontMonoBold: FontLoader { id: _fontMonoBold; source: "qrc:/fonts/RobotoMono-Bold.ttf"; }
property QtObject fontMonoLight: FontLoader { id: _fontMonoLight; source: "qrc:/fonts/RobotoMono-Light.ttf"; }
property QtObject fontMonoRegular: FontLoader { id: _fontMonoRegular; source: "qrc:/fonts/RobotoMono-Regular.ttf"; }
property string grey: "#404040"
property string orange: "#FF6C3C"
property string white: "#FFFFFF"
property string green: "#2EB358"
property string moneroGrey: "#4C4C4C"
property string warningColor: "orange"
property string defaultFontColor: blackTheme ? _b_defaultFontColor : _w_defaultFontColor
property string dimmedFontColor: blackTheme ? _b_dimmedFontColor : _w_dimmedFontColor
property string lightGreyFontColor: blackTheme ? _b_lightGreyFontColor : _w_lightGreyFontColor
property string errorColor: blackTheme ? _b_errorColor : _w_errorColor
property string textSelectionColor: blackTheme ? _b_textSelectionColor : _w_textSelectionColor
property string textSelectedColor: blackTheme ? _b_textSelectedColor : _w_textSelectedColor
property string defaultFontColor: "white"
property string dimmedFontColor: "#BBBBBB"
property string inputBoxBackground: "black"
property string inputBoxBackgroundError: "#FFDDDD"
property string inputBoxColor: "white"
property string legacy_placeholderFontColor: "#BABABA"
property string inputBorderColorActive: Qt.rgba(255, 255, 255, 0.38)
property string inputBorderColorInActive: Qt.rgba(255, 255, 255, 0.32)
property string inputBorderColorInvalid: Qt.rgba(255, 0, 0, 0.40)
property string inputBoxBackground: blackTheme ? _b_inputBoxBackground : _w_inputBoxBackground
property string inputBoxBackgroundError: blackTheme ? _b_inputBoxBackgroundError : _w_inputBoxBackgroundError
property string inputBoxColor: blackTheme ? _b_inputBoxColor : _w_inputBoxColor
property string legacy_placeholderFontColor: blackTheme ? _b_legacy_placeholderFontColor : _w_legacy_placeholderFontColor
property string inputBorderColorActive: blackTheme ? _b_inputBorderColorActive : _w_inputBorderColorActive
property string inputBorderColorInActive: blackTheme ? _b_inputBorderColorInActive : _w_inputBorderColorInActive
property string inputBorderColorInvalid: blackTheme ? _b_inputBorderColorInvalid : _w_inputBorderColorInvalid
property string buttonBackgroundColor: blackTheme ? _b_buttonBackgroundColor : _w_buttonBackgroundColor
property string buttonBackgroundColorHover: blackTheme ? _b_buttonBackgroundColorHover : _w_buttonBackgroundColorHover
property string buttonBackgroundColorDisabled: blackTheme ? _b_buttonBackgroundColorDisabled : _w_buttonBackgroundColorDisabled
property string buttonBackgroundColorDisabledHover: blackTheme ? _b_buttonBackgroundColorDisabledHover : _w_buttonBackgroundColorDisabledHover
property string buttonInlineBackgroundColor: blackTheme ? _b_buttonInlineBackgroundColor : _w_buttonInlineBackgroundColor
property string buttonTextColor: blackTheme ? _b_buttonTextColor : _w_buttonTextColor
property string buttonTextColorDisabled: blackTheme ? _b_buttonTextColorDisabled : _w_buttonTextColorDisabled
property string dividerColor: blackTheme ? _b_dividerColor : _w_dividerColor
property real dividerOpacity: blackTheme ? _b_dividerOpacity : _w_dividerOpacity
property string titleBarBackgroundGradientStart: blackTheme ? _b_titleBarBackgroundGradientStart : _w_titleBarBackgroundGradientStart
property string titleBarBackgroundGradientStop: blackTheme ? _b_titleBarBackgroundGradientStop : _w_titleBarBackgroundGradientStop
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
property string wizardBackgroundGradientStart: blackTheme ? _b_wizardBackgroundGradientStart : _w_wizardBackgroundGradientStart
property string middlePanelBackgroundGradientStart: blackTheme ? _b_middlePanelBackgroundGradientStart : _w_middlePanelBackgroundGradientStart
property string middlePanelBackgroundGradientStop: blackTheme ? _b_middlePanelBackgroundGradientStop : _w_middlePanelBackgroundGradientStop
property string middlePanelBackgroundColor: blackTheme ? _b_middlePanelBackgroundColor : _w_middlePanelBackgroundColor
property string menuButtonFallbackBackgroundColor: blackTheme ? _b_menuButtonFallbackBackgroundColor : _w_menuButtonFallbackBackgroundColor
property string menuButtonGradientStart: blackTheme ? _b_menuButtonGradientStart : _w_menuButtonGradientStart
property string menuButtonGradientStop: blackTheme ? _b_menuButtonGradientStop : _w_menuButtonGradientStop
property string menuButtonTextColor: blackTheme ? _b_menuButtonTextColor : _w_menuButtonTextColor
property string menuButtonImageRightColorActive: blackTheme ? _b_menuButtonImageRightColorActive : _w_menuButtonImageRightColorActive
property string menuButtonImageRightColor: blackTheme ? _b_menuButtonImageRightColor : _w_menuButtonImageRightColor
property string menuButtonImageRightSource: blackTheme ? _b_menuButtonImageRightSource : _w_menuButtonImageRightSource
property string menuButtonImageDotArrowSource: blackTheme ? _b_menuButtonImageDotArrowSource : _w_menuButtonImageDotArrowSource
property string inlineButtonTextColor: blackTheme ? _b_inlineButtonTextColor : _w_inlineButtonTextColor
property string inlineButtonBorderColor: blackTheme ? _b_inlineButtonBorderColor : _w_inlineButtonBorderColor
property string appWindowBackgroundColor: blackTheme ? _b_appWindowBackgroundColor : _w_appWindowBackgroundColor
property string appWindowBorderColor: blackTheme ? _b_appWindowBorderColor : _w_appWindowBorderColor
property bool progressBarProgressTextBold: blackTheme ? _b_progressBarProgressTextBold : _w_progressBarProgressTextBold
property string progressBarBackgroundColor: blackTheme ? _b_progressBarBackgroundColor : _w_progressBarBackgroundColor
property string leftPanelBackgroundGradientStart: blackTheme ? _b_leftPanelBackgroundGradientStart : _w_leftPanelBackgroundGradientStart
property string leftPanelBackgroundGradientStop: blackTheme ? _b_leftPanelBackgroundGradientStop : _w_leftPanelBackgroundGradientStop
property string historyHeaderTextColor: blackTheme ? _b_historyHeaderTextColor : _w_historyHeaderTextColor
property string _b_defaultFontColor: "white"
property string _b_dimmedFontColor: "#BBBBBB"
property string _b_lightGreyFontColor: "#DFDFDF"
property string _b_errorColor: "#FA6800"
property string _b_textSelectionColor: "#BBBBBB"
property string _b_textSelectedColor: "white"
property string _b_inputBoxBackground: "black"
property string _b_inputBoxBackgroundError: "#FFDDDD"
property string _b_inputBoxColor: "white"
property string _b_legacy_placeholderFontColor: "#BABABA"
property string _b_inputBorderColorActive: Qt.rgba(255, 255, 255, 0.38)
property string _b_inputBorderColorInActive: Qt.rgba(255, 255, 255, 0.32)
property string _b_inputBorderColorInvalid: Qt.rgba(255, 0, 0, 0.40)
property string _b_buttonBackgroundColor: "#FA6800"
property string _b_buttonBackgroundColorHover: "#E65E00"
property string _b_buttonBackgroundColorDisabled: "#707070"
property string _b_buttonBackgroundColorDisabledHover: "#808080"
property string _b_buttonInlineBackgroundColor: "#707070"
property string _b_buttonTextColor: "white"
property string _b_buttonTextColorDisabled: "black"
property string _b_dividerColor: "white"
property real _b_dividerOpacity: 0.20
property string _b_titleBarBackgroundGradientStart: "#262626";
property string _b_titleBarBackgroundGradientStop: "#191919"
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"
property string _b_wizardBackgroundGradientStart: "#1e1e1e"
property string _b_middlePanelBackgroundGradientStart: "#232323"
property string _b_middlePanelBackgroundGradientStop: "#101010"
property string _b_middlePanelBackgroundColor: "#181818"
property string _b_menuButtonFallbackBackgroundColor: "#09FFFFFF"
property string _b_menuButtonGradientStart: "#11FFFFFF"
property string _b_menuButtonGradientStop: "#00000000"
property string _b_menuButtonTextColor: "white"
property string _b_menuButtonImageRightColorActive: "white"
property string _b_menuButtonImageRightColor: "white"
property string _b_menuButtonImageRightSource: "qrc:///images/right.svg"
property string _b_menuButtonImageDotArrowSource: "qrc:///images/arrow-right-medium-white.png"
property string _b_inlineButtonTextColor: "black"
property string _b_inlineButtonBorderColor: "black"
property string _b_appWindowBackgroundColor: "white"
property string _b_appWindowBorderColor: "#313131"
property bool _b_progressBarProgressTextBold: true
property string _b_progressBarBackgroundColor: "#24FFFFFF"
property string _b_leftPanelBackgroundGradientStart: "#222222"
property string _b_leftPanelBackgroundGradientStop: "#1a1a1a"
property string _b_historyHeaderTextColor: "#C0C0C0"
property string _w_defaultFontColor: "black"
property string _w_dimmedFontColor: "#3f3f3f"
property string _w_lightGreyFontColor: "#515151"
property string _w_errorColor: "#FA6800"
property string _w_textSelectionColor: "#BBBBBB"
property string _w_textSelectedColor: "black"
property string _w_inputBoxBackground: "white"
property string _w_inputBoxBackgroundError: "#FFDDDD"
property string _w_inputBoxColor: "black"
property string _w_legacy_placeholderFontColor: "#BABABA"
property string _w_inputBorderColorActive: Qt.rgba(0, 0, 0, 0.30)
property string _w_inputBorderColorInActive: Qt.rgba(0, 0, 0, 0.16)
property string _w_inputBorderColorInvalid: Qt.rgba(255, 0, 0, 0.50)
property string _w_buttonBackgroundColor: "#FA6800"
property string _w_buttonBackgroundColorHover: "#E65E00"
property string _w_buttonBackgroundColorDisabled: "#bbbbbb"
property string _w_buttonBackgroundColorDisabledHover: "#D1D1D1"
property string _w_buttonInlineBackgroundColor: "#bbbbbb"
property string _w_buttonTextColor: "white"
property string _w_buttonTextColorDisabled: "black"
property string _w_dividerColor: "black"
property real _w_dividerOpacity: 0.20
property string _w_titleBarBackgroundGradientStart: "#fcfcfc"
property string _w_titleBarBackgroundGradientStop: "#FBFBFB"
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"
property string _w_wizardBackgroundGradientStart: "white"
property string _w_middlePanelBackgroundGradientStart: "white"
property string _w_middlePanelBackgroundGradientStop: "#ededed"
property string _w_middlePanelBackgroundColor: "#f5f5f5"
property string _w_menuButtonFallbackBackgroundColor: "#09000000"
property string _w_menuButtonGradientStart: "#08000000"
property string _w_menuButtonGradientStop: "#10FFFFFF"
property string _w_menuButtonTextColor: "#787878"
property string _w_menuButtonImageRightSource: "qrc:///images/right.svg"
property string _w_menuButtonImageRightColorActive: "#FA6800"
property string _w_menuButtonImageRightColor: "#808080"
property string _w_menuButtonImageDotArrowSource: "qrc:///images/arrow-right-medium-white.png"
property string _w_inlineButtonTextColor: "white"
property string _w_inlineButtonBorderColor: "transparent"
property string _w_appWindowBackgroundColor: "black"
property string _w_appWindowBorderColor: "#dedede"
property bool _w_progressBarProgressTextBold: false
property string _w_progressBarBackgroundColor: "#24000000"
property string _w_leftPanelBackgroundGradientStart: "white"
property string _w_leftPanelBackgroundGradientStop: "#f5f5f5"
property string _w_historyHeaderTextColor: "#515151"
property string buttonBackgroundColor: "#FA6800"
property string buttonBackgroundColorHover: "#E65E00"
property string buttonBackgroundColorDisabled: "#707070"
property string buttonBackgroundColorDisabledHover: "#808080"
property string buttonTextColor: "white"
property string buttonTextColorDisabled: "black"
property string dividerColor: "white"
property real dividerOpacity: 0.20
}

View File

@@ -0,0 +1,237 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
Item {
id: dropdown
property bool expanded: false
property alias dataModel: repeater.model
signal collapsed()
signal optionClicked(int option)
width: 72
height: 37
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
function hide() { dropdown.expanded = false }
function containsPoint(px, py) {
if(px < 0)
return false
if(px > width)
return false
if(py < 0)
return false
if(py > height + dropArea.height)
return false
return true
}
Item {
id: head
anchors.fill: parent
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: parent.height - 1
y: dropdown.expanded || dropArea.height > 0 ? 0 : 1
//radius: 3
color: dropdown.expanded || dropArea.height > 0 ? "#888888" : "#DBDBDB"
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
height: parent.height - 1
y: dropdown.expanded || dropArea.height > 0 ? 1 : 0
//radius: 3
color: dropdown.expanded || dropArea.height > 0 ? "#DBDBDB" : "#F0EEEE"
}
Rectangle {
anchors.left: parent.left
anchors.bottom: parent.bottom
height: 3
width: 3
color: "#DBDBDB"
visible: dropdown.expanded || dropArea.height > 0
}
Rectangle {
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 3
width: 3
color: "#DBDBDB"
visible: dropdown.expanded || dropArea.height > 0
}
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10
source: "../images/tableOptions.png"
}
Rectangle {
anchors.centerIn: parent
anchors.horizontalCenterOffset: 1
height: 23
width: 1
color: dropdown.expanded || dropArea.height > 0 ? "#FFFFFF" : "#DBDBDB"
}
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 10
source: "../images/dropIndicator.png"
}
}
Timer {
id: timer
interval: 50
repeat: true
running: false
onTriggered: {
if(((appWindow.toolTip.visible && !appWindow.toolTip.containsMouse) || !appWindow.toolTip.visible) && !mouseArea.containsMouse) {
appWindow.toolTip.visible = false
dropdown.expanded = false
currentIndex = -1
timer.stop()
}
}
}
MouseArea {
id: mouseArea
anchors.left: head.left
anchors.right: head.right
anchors.top: head.top
height: head.height + dropArea.height
hoverEnabled: true
onEntered: dropdown.expanded = true
property int currentIndex: -1
onMouseYChanged: {
if(mouseY > head.height) {
var posY = parseInt((mouseY - head.height) / 30)
currentIndex = posY
} else {
currentIndex = -1
}
}
onClicked: {
optionClicked(currentIndex)
}
onExited: timer.start()
preventStealing: true
z: 1
Item {
id: dropArea
anchors.left: parent.left
anchors.right: parent.right
y: head.height
height: dropdown.expanded ? column.height : 0
onHeightChanged: if(height === 0) dropdown.collapsed()
clip: true
Behavior on height {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
Column {
id: column
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
Repeater {
id: repeater
// Workaround for translations in listElements. All translated strings needs to be listed in this file.
property string stringCopy: qsTr("<b>Copy address to clipboard</b>") + translationManager.emptyString
property string stringSend: qsTr("<b>Send to this address</b>") + translationManager.emptyString
property string stringFind: qsTr("<b>Find similar transactions</b>") + translationManager.emptyString
property string stringRemove: qsTr("<b>Remove from address book</b>") + translationManager.emptyString
delegate: Rectangle {
id: delegate
property bool containsMouse: index === mouseArea.currentIndex
anchors.left: parent.left
anchors.right: parent.right
height: 30
color: containsMouse ? "#F0EEEE" : "#DBDBDB"
//radius: index === repeater.count - 1 ? 5 : 0
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
width: 5
height: 5
color: delegate.color
}
Rectangle {
anchors.right: parent.right
anchors.top: parent.top
width: 5
height: 5
color: delegate.color
}
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10
source: icon
}
onContainsMouseChanged: {
if(containsMouse) {
var pos = rootItem.mapFromItem(delegate, 30, -25)
appWindow.toolTip.text = qsTr(name) + translationManager.emptyString
appWindow.toolTip.x = pos.x - appWindow.toolTip.width
// if(appWindow.toolTip.height > 30)
// pos.y -= appWindow.toolTip.height - 30
appWindow.toolTip.y = pos.y
appWindow.toolTip.visible = true
appWindow.toolTip.z = 3
}
}
}
}
}
}
}
}

202
components/TableHeader.qml Normal file
View File

@@ -0,0 +1,202 @@
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
Rectangle {
id: header
signal sortRequest(bool desc, int column)
property alias dataModel: columnsRepeater.model
property int activeSortColumn: -1
property int offset: 0
height: 31
color: "transparent"
Rectangle{
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: "#808080"
}
Rectangle{
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 1
color: "#808080"
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 1
color: "#808080"
}
Row {
id: row
anchors.horizontalCenter: parent.horizontalCenter
Rectangle {
height: 31
width: 1
color: "#808080"
}
Repeater {
id: columnsRepeater
// Workaround for translations in listElements. All translated strings needs to be listed in this file.
property string stringPaymentID: qsTr("Payment ID") + translationManager.emptyString
property string stringDate: qsTr("Date") + translationManager.emptyString
property string stringBlockHeight: qsTr("Block height") + translationManager.emptyString
property string stringAmount: qsTr("Amount") + translationManager.emptyString
delegate: Rectangle {
id: delegate
property bool desc: false
color: "transparent"
height: 31
width: columnWidth
Text {
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: -2
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 13
anchors.rightMargin: 13
elide: Text.ElideRight
font.family: "Arial"
font.pixelSize: 14
color: {
if(delegateArea.pressed)
return "#FF4304"
return index === header.activeSortColumn || delegateArea.containsMouse ? "white" : "#808080"
}
text: qsTr(columnName) + translationManager.emptyString
}
MouseArea {
id: delegateArea
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
delegate.desc = !delegate.desc
header.activeSortColumn = index
header.sortRequest(delegate.desc, index)
}
}
Row {
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.rightMargin: 9
Item {
width: 14
anchors.top: parent.top
anchors.bottom: parent.bottom
Image {
anchors.centerIn: parent
anchors.verticalCenterOffset: -2
source: {
if(descArea.pressed)
return "../images/descSortIndicatorPressed.png"
return index === header.activeSortColumn || descArea.containsMouse ? "../images/descSortIndicatorActived.png" :
"../images/descSortIndicator.png"
}
}
MouseArea {
id: descArea
hoverEnabled: true
anchors.fill: parent
onClicked: {
delegate.desc = true
header.activeSortColumn = index
header.sortRequest(delegate.desc, index)
}
}
}
Item {
width: 14
anchors.top: parent.top
anchors.bottom: parent.bottom
Image {
anchors.centerIn: parent
anchors.verticalCenterOffset: -3
source: {
if(ascArea.pressed)
return "../images/ascSortIndicatorPressed.png"
return index === header.activeSortColumn || ascArea.containsMouse ? "../images/ascSortIndicatorActived.png" :
"../images/ascSortIndicator.png"
}
}
MouseArea {
id: ascArea
hoverEnabled: true
anchors.fill: parent
onClicked: {
delegate.desc = false
header.activeSortColumn = index
header.sortRequest(delegate.desc, index)
}
}
}
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 1
color: "transparent"
}
Rectangle {
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
width: 1
color: "#808080"
}
}
}
}
}

View File

@@ -1,11 +1,11 @@
import QtQuick 2.9
import QtQuick 2.0
import "../components" as MoneroComponents
TextEdit {
color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name
selectionColor: MoneroComponents.Style.textSelectionColor
selectionColor: MoneroComponents.Style.dimmedFontColor
wrapMode: Text.Wrap
readOnly: true
selectByMouse: true

View File

@@ -1,28 +0,0 @@
import QtQuick 2.9
import "." as MoneroComponents
import "effects/" as MoneroEffects
Text {
// When using this component, please note that if you use a color different
// than `defaultFontColor`, you are required to also define `themeTransitionXColor`.
// If you do not set these the component will receive the wrong color after a transition.
// If you do not want to set these, use `themeTransition: false`.
id: root
property bool themeTransition: true
property string themeTransitionBlackColor: ""
property string themeTransitionWhiteColor: ""
font.family: MoneroComponents.Style.fontMedium.name
font.bold: false
font.pixelSize: 14
textFormat: Text.PlainText
MoneroEffects.ColorTransition {
enabled: root.themeTransition
themeTransition: root.themeTransition
targetObj: root
duration: 750
blackColor: root.themeTransitionBlackColor !== "" ? root.themeTransitionBlackColor : MoneroComponents.Style._b_defaultFontColor
whiteColor: root.themeTransitionWhiteColor !== "" ? root.themeTransitionWhiteColor : MoneroComponents.Style._w_defaultFontColor
}
}

View File

@@ -1,48 +0,0 @@
import QtQuick 2.9
import QtQuick.Controls 2.0
import "." as MoneroComponents
TextArea {
id: textArea
property bool themeTransition: true
property string colorWhiteTheme: ""
property string colorBlackTheme: ""
color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
selectByMouse: false
wrapMode: Text.WordWrap;
textMargin: 0
leftPadding: 0
topPadding: 0
readOnly: true
textFormat: TextEdit.PlainText
states: [
State {
name: "black";
when: textArea.themeTransition && MoneroComponents.Style.blackTheme
PropertyChanges {
target: textArea
color: {
return textArea.colorBlackTheme ? textArea.colorBlackTheme : MoneroComponents.Style._b_defaultFontColor
}
}
}, State {
name: "white";
when: textArea.themeTransition && !MoneroComponents.Style.blackTheme
PropertyChanges {
target: textArea
color: {
return textArea.colorWhiteTheme ? textArea.colorWhiteTheme : MoneroComponents.Style._w_defaultFontColor
}
}
}
]
transitions: Transition {
enabled: appWindow.themeTransition
ColorAnimation { properties: "color"; easing.type: Easing.InOutQuad; duration: 750 }
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2014-2019, The Monero Project
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
@@ -26,26 +26,47 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick.Layouts 1.2
import QtQuick.Controls 2.0
import QtQuick 2.0
import "../components" as MoneroComponents
Rectangle {
property bool active: false
Layout.preferredWidth: 30
Layout.fillHeight: true
property string activeColor: MoneroComponents.Style.defaultFontColor
property string inactiveColor: MoneroComponents.Style.progressBarBackgroundColor
color: "transparent"
Item {
id: delegateItem
width: 1
height: 48
property bool mainTick: false
property int currentIndex
property int currentX
Image {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
visible: parent.mainTick
source: "../images/privacyTick.png"
Text {
anchors.right: parent.right
anchors.rightMargin: 12
anchors.bottom: parent.bottom
anchors.bottomMargin: 2
font.family: "Arial"
font.bold: true
font.pixelSize: 12 * scaleRatio
color: MoneroComponents.Style.defaultFontColor
text: {
if(currentIndex === 0) return qsTr("Default") + translationManager.emptyString
if(currentIndex === 13) return qsTr("High") + translationManager.emptyString
return ""
}
}
}
Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
width: 10
height: 10
radius: 10
color: parent.active ? parent.activeColor : parent.inactiveColor
anchors.top: parent.top
anchors.topMargin: 14
width: 1
color: "#DBDBDB"
height: 8
visible: !parent.mainTick
}
}

View File

@@ -26,11 +26,9 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.2
import QtQuick.Window 2.1
import "../components" as MoneroComponents
Window {
property alias text: content.text
property alias containsMouse: tipArea.containsMouse
@@ -57,10 +55,10 @@ Window {
anchors.top: parent.bottom
anchors.left: parent.left
anchors.leftMargin: 5
source: "qrc:///images/tip.png"
source: "../images/tip.png"
}
MoneroComponents.TextPlain {
Text {
id: content
anchors.horizontalCenter: parent.horizontalCenter
y: 6

View File

@@ -26,320 +26,219 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick 2.5
import QtQuick.Window 2.0
import QtGraphicalEffects 1.0
import QtQuick.Layouts 1.2
import FontAwesome 1.0
import "." as MoneroComponents
import "effects/" as MoneroEffects
import QtQuick.Layouts 1.1
Rectangle {
id: root
property int mouseX: 0
property bool basicButtonVisible: false
property bool customDecorations: persistentSettings.customDecorations
property bool showMinimizeButton: true
property bool showMaximizeButton: true
property bool showCloseButton: true
id: titleBar
height: {
if(!persistentSettings.customDecorations || isMobile) return 0;
return 50;
}
if(!customDecorations || isMobile){
return 0;
}
if(small) return 38 * scaleRatio;
else return 50 * scaleRatio;
}
y: -height
z: 1
color: "transparent"
property string title
property int mouseX: 0
property bool containsMouse: false
property alias basicButtonVisible: goToBasicVersionButton.visible
property bool customDecorations: persistentSettings.customDecorations
property bool showWhatIsButton: true
property bool showMinimizeButton: false
property bool showMaximizeButton: false
property bool showCloseButton: true
property bool showMoneroLogo: false
property bool small: false
signal closeClicked
signal maximizeClicked
signal minimizeClicked
signal languageClicked
signal goToBasicVersion(bool yes)
state: "default"
states: [
State {
name: "default";
PropertyChanges { target: btnSidebarCollapse; visible: true}
PropertyChanges { target: btnLanguageToggle; visible: true}
}, State {
// show only theme switcher and window controls
name: "essentials";
PropertyChanges { target: btnSidebarCollapse; visible: false}
PropertyChanges { target: btnLanguageToggle; visible: false}
}
]
Item {
// Background gradient
width: parent.width
height: parent.height
z: parent.z + 1
MoneroEffects.GradientBackground {
anchors.fill: parent
duration: 300
fallBackColor: MoneroComponents.Style.middlePanelBackgroundColor
initialStartColor: MoneroComponents.Style.titleBarBackgroundGradientStart
initialStopColor: MoneroComponents.Style.titleBarBackgroundGradientStop
blackColorStart: MoneroComponents.Style._b_titleBarBackgroundGradientStart
blackColorStop: MoneroComponents.Style._b_titleBarBackgroundGradientStop
whiteColorStart: MoneroComponents.Style._w_titleBarBackgroundGradientStart
whiteColorStop: MoneroComponents.Style._w_titleBarBackgroundGradientStop
start: Qt.point(width, 0)
end: Qt.point(0, 0)
Image {
anchors.fill: parent
height: titleBar.height
width: titleBar.width
source: "../images/titlebarGradient.jpg"
}
}
RowLayout {
Item {
id: titlebarlogo
width: 125
height: parent.height
anchors.centerIn: parent
visible: customDecorations && showMoneroLogo
z: parent.z + 1
Image {
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 11
width: 125
height: 28
source: "../images/titlebarLogo.png"
}
}
Label {
id: titleLabel
visible: !showMoneroLogo && customDecorations && titleBar.title !== ''
anchors.centerIn: parent
fontSize: 18
text: titleBar.title
z: parent.z + 1
}
// collapse left panel
Rectangle {
id: goToBasicVersionButton
property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width
property bool checked: false
anchors.top: parent.top
anchors.left: parent.left
color: "transparent"
height: titleBar.height
width: height
visible: isMobile
z: parent.z + 2
Image {
width: 14
height: 14
anchors.centerIn: parent
source: "../images/expand.png"
}
MouseArea {
id: basicMouseArea
hoverEnabled: true
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onEntered: goToBasicVersionButton.color = "#262626";
onExited: goToBasicVersionButton.color = "transparent";
onClicked: {
releaseFocus()
parent.checked = !parent.checked
titleBar.goToBasicVersion(leftPanel.visible)
}
}
}
Row {
id: row
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
visible: parent.customDecorations
z: parent.z + 2
spacing: 0
anchors.fill: parent
// collapse sidebar
Rectangle {
id: btnSidebarCollapse
visible: root.basicButtonVisible
id: minimizeButton
visible: showMinimizeButton
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 42
color: "transparent"
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
MoneroEffects.ImageMask {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
height: 14
width: 14
image: MoneroComponents.Style.titleBarExpandSource
color: MoneroComponents.Style.defaultFontColor
fontAwesomeFallbackIcon: FontAwesome.cube
fontAwesomeFallbackSize: 14
fontAwesomeFallbackOpacity: MoneroComponents.Style.blackTheme ? 1.0 : 0.9
opacity: 0.75
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: root.goToBasicVersion(leftPanel.visible)
}
}
// language selection
Rectangle {
id: btnLanguageToggle
color: "transparent"
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
Text {
text: FontAwesome.globe
font.family: FontAwesome.fontFamily
font.pixelSize: 16
color: MoneroComponents.Style.defaultFontColor
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
opacity: 0.75
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: root.languageClicked()
}
}
// switch theme
Rectangle {
color: "transparent"
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
Text {
text: MoneroComponents.Style.blackTheme ? FontAwesome.lightbulbO : FontAwesome.moonO
font.family: FontAwesome.fontFamily
font.pixelSize: 16
color: MoneroComponents.Style.defaultFontColor
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
opacity: 0.75
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: {
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
persistentSettings.blackTheme = MoneroComponents.Style.blackTheme;
}
}
}
Item {
// make dummy space when hiding buttons when titlebar
// state is 'essentials' in order for the
// monero logo to still be centered
Layout.preferredWidth: parent.height * 2 // amount of buttons we hide
Layout.preferredHeight: parent.height
visible: root.state == "essentials"
}
// monero logo
Item {
Layout.fillWidth: true
Layout.preferredHeight: parent.height
Image {
id: imgLogo
width: 125
height: 28
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: MoneroComponents.Style.titleBarLogoSource
visible: {
if(!isOpenGL) return true;
if(!MoneroComponents.Style.blackTheme) return true;
return false;
}
}
Colorize {
visible: isOpenGL && MoneroComponents.Style.blackTheme
anchors.fill: imgLogo
source: imgLogo
saturation: 0.0
}
}
// minimize
Rectangle {
color: "transparent"
visible: root.showMinimizeButton
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
MoneroEffects.ImageMask {
anchors.bottom: parent.bottom
anchors.bottomMargin: 18
anchors.horizontalCenter: parent.horizontalCenter
height: 3
width: 15
image: MoneroComponents.Style.titleBarMinimizeSource
color: MoneroComponents.Style.defaultFontColor
fontAwesomeFallbackIcon: FontAwesome.minus
fontAwesomeFallbackSize: 18
fontAwesomeFallbackOpacity: MoneroComponents.Style.blackTheme ? 0.8 : 0.6
opacity: 0.75
anchors.centerIn: parent
source: "../images/minimize.png"
}
MouseArea {
id: minimizeArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: root.minimizeClicked();
onEntered: minimizeButton.color = "#262626";
onExited: minimizeButton.color = "transparent";
onClicked: minimizeClicked();
}
}
// maximize
Rectangle {
id: test
visible: root.showMaximizeButton
color: "transparent"
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
id: maximizeButton
visible: showMaximizeButton
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 42
color: "transparent";
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
source: MoneroComponents.Style.titleBarFullscreenSource
sourceSize.width: 16
sourceSize.height: 16
smooth: true
mipmap: true
opacity: 0.75
rotation: appWindow.visibility === Window.FullScreen ? 180 : 0
}
MouseArea {
id: buttonArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: root.maximizeClicked();
}
}
// close
Rectangle {
visible: root.showCloseButton
color: "transparent"
Layout.preferredWidth: parent.height
Layout.preferredHeight: parent.height
MoneroEffects.ImageMask {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
anchors.centerIn: parent
height: 16
width: 16
image: MoneroComponents.Style.titleBarCloseSource
color: MoneroComponents.Style.defaultFontColor
fontAwesomeFallbackIcon: FontAwesome.timesRectangle
fontAwesomeFallbackSize: 18
fontAwesomeFallbackOpacity: MoneroComponents.Style.blackTheme ? 0.8 : 0.6
opacity: 0.75
source: appWindow.visibility === Window.FullScreen ? "../images/backToWindowIcon.png" :
"../images/fullscreen.png"
}
MouseArea {
id: maximizeArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: maximizeButton.color = "#262626";
onExited: maximizeButton.color = "transparent";
onClicked: maximizeClicked();
}
}
Rectangle {
id: closeButton
visible: showCloseButton
anchors.top: parent.top
anchors.bottom: parent.bottom
width: 42
color: containsMouse ? "#E04343" : "#00000000"
Image {
anchors.centerIn: parent
width: 16
height: 16
source: "../images/close.png"
}
MouseArea {
anchors.fill: parent
onClicked: closeClicked();
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.color = MoneroComponents.Style.titleBarButtonHoverColor
onExited: parent.color = "transparent"
onClicked: root.closeClicked();
onEntered: closeButton.color = "#262626";
onExited: closeButton.color = "transparent";
}
}
}
// window borders
Rectangle {
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.left: parent.left
height: 1
color: "#2F2F2F"
z: parent.z + 1
}
Rectangle {
z: parent.z + 3
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.top: parent.top
anchors.right: parent.right
height: MoneroComponents.Style.blackTheme ? 1 : 1
color: MoneroComponents.Style.titleBarBackgroundBorderColor
MoneroEffects.ColorTransition {
targetObj: parent
blackColor: MoneroComponents.Style._b_titleBarBackgroundBorderColor
whiteColor: MoneroComponents.Style._w_titleBarBackgroundBorderColor
}
}
MouseArea {
enabled: persistentSettings.customDecorations
property var previousPosition
anchors.fill: parent
propagateComposedEvents: true
onPressed: previousPosition = globalCursor.getPosition()
onPositionChanged: {
if (pressedButtons == Qt.LeftButton) {
var pos = globalCursor.getPosition()
var dx = pos.x - previousPosition.x
var dy = pos.y - previousPosition.y
appWindow.x += dx
appWindow.y += dy
previousPosition = pos
}
}
anchors.left: parent.left
visible: titleBar.small
height: 1
color: "#2F2F2F"
z: parent.z + 1
}
}

View File

@@ -1,4 +1,4 @@
import QtQuick 2.9
import QtQuick 2.7
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
@@ -7,19 +7,18 @@ import "." as MoneroComponents
Rectangle {
id: root
property alias text: content.text
property alias textColor: content.color
property int fontSize: 15
property int fontSize: 15 * scaleRatio
Layout.fillWidth: true
Layout.preferredHeight: warningLayout.height
color: MoneroComponents.Style.titleBarButtonHoverColor
color: "#09FFFFFF"
radius: 4
border.color: MoneroComponents.Style.inputBorderColorInActive
border.width: 1
signal linkActivated;
RowLayout {
id: warningLayout
spacing: 0
@@ -30,11 +29,11 @@ Rectangle {
Layout.alignment: Qt.AlignVCenter
Layout.preferredHeight: 33
Layout.preferredWidth: 33
Layout.rightMargin: 12
Layout.leftMargin: 18
Layout.rightMargin: 14
Layout.leftMargin: 14
Layout.topMargin: 12
Layout.bottomMargin: 12
source: "qrc:///images/warning.png"
source: "../images/warning.png"
}
TextArea {
@@ -44,19 +43,21 @@ Rectangle {
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: root.fontSize
horizontalAlignment: TextInput.AlignLeft
selectByMouse: true
selectByMouse: false
textFormat: Text.RichText
wrapMode: Text.WordWrap
textMargin: 0
leftPadding: 4
rightPadding: 18
topPadding: 10
bottomPadding: 10
leftPadding: 0
topPadding: 6
readOnly: true
onLinkActivated: root.linkActivated();
selectionColor: MoneroComponents.Style.textSelectionColor
selectedTextColor: MoneroComponents.Style.textSelectedColor
// @TODO: Legacy. Remove after Qt 5.8.
// https://stackoverflow.com/questions/41990013
MouseArea {
anchors.fill: parent
enabled: false
}
}
}
}

View File

@@ -1,107 +0,0 @@
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtGraphicalEffects 1.0
import "../" as MoneroComponents
Item {
id: root
property string fallBackColor: ""
property string blackColorStart: ""
property string blackColorStop: ""
property string whiteColorStart: ""
property string whiteColorStop: ""
property string initialStartColor: ""
property string initialStopColor: ""
property double posStart: 0.1
property double posStop: 1.0
property int duration: 300
property variant start
property variant end
anchors.fill: parent
// background software renderer
Rectangle {
visible: !isOpenGL
anchors.fill: parent
color: root.fallBackColor
}
// background opengl
LinearGradient {
visible: isOpenGL
anchors.fill: parent
start: root.start
end: root.end
gradient: Gradient {
GradientStop {
id: gradientStart
position: root.posStart
color: root.initialStartColor
}
GradientStop {
id: gradientStop
position: root.posStop
color: root.initialStopColor
}
}
states: [
State {
name: "black";
when: isOpenGL && MoneroComponents.Style.blackTheme
PropertyChanges {
target: gradientStart
color: root.blackColorStart
}
PropertyChanges {
target: gradientStop
color: root.blackColorStop
}
}, State {
name: "white";
when: isOpenGL && !MoneroComponents.Style.blackTheme
PropertyChanges {
target: gradientStart
color: root.whiteColorStart
}
PropertyChanges {
target: gradientStop
color: root.whiteColorStop
}
}
]
transitions: Transition {
enabled: appWindow.themeTransition
ColorAnimation { properties: "color"; easing.type: Easing.InOutQuad; duration: root.duration }
}
}
}

View File

@@ -1,84 +0,0 @@
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtGraphicalEffects 1.0
import "../" as MoneroComponents
import FontAwesome 1.0
Item {
// Use this component to color+opacity change images with transparency (svg/png)
// Does not work in low graphics mode, use fontAwesome fallback option.
id: root
property string image: ""
property string color: ""
property bool fontAwesomeFallbackEnabled: true
property var fontAwesomeFallbackIcon: ""
property int fontAwesomeFallbackSize: 16
property double fontAwesomeFallbackOpacity: 0.8
property string fontAwesomeFallbackColor: MoneroComponents.Style.defaultFontColor
property alias fontAwesomeFallback: fontAwesomeFallback
property alias svgMask: svgMask
property alias imgMockColor: imgMockColor
width: 0
height: 0
Image {
id: svgMask
source: root.image
sourceSize.width: root.width
sourceSize.height: root.height
smooth: true
mipmap: true
visible: false
}
ColorOverlay {
id: imgMockColor
anchors.fill: root
source: svgMask
color: root.color
visible: isOpenGL
}
Text {
id: fontAwesomeFallback
visible: !isOpenGL && root.fontAwesomeFallback
text: !isOpenGL ? root.fontAwesomeFallbackIcon : ""
font.family: FontAwesome.fontFamily
font.pixelSize: root.fontAwesomeFallbackSize
color: root.fontAwesomeFallbackColor
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
opacity: root.fontAwesomeFallbackOpacity
}
}

0
empty Normal file
View File

View File

@@ -27,14 +27,9 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "filter.h"
#include <QtGlobal>
#include <QKeyEvent>
#include <QDebug>
#ifdef QT_DEBUG
#include "private/qabstractanimation_p.h"
#endif
filter::filter(QObject *parent) :
QObject(parent)
{
@@ -43,17 +38,6 @@ filter::filter(QObject *parent) :
}
bool filter::eventFilter(QObject *obj, QEvent *ev) {
// macOS sends fileopen signal for incoming uri handlers
if (ev->type() == QEvent::FileOpen) {
QFileOpenEvent *openEvent = static_cast<QFileOpenEvent *>(ev);
QUrl scheme = openEvent->url();
emit uriHandler(scheme);
}
if(ev->type() == QEvent::KeyPress || ev->type() == QEvent::MouseButtonRelease){
emit userActivity();
}
switch(ev->type()) {
case QEvent::KeyPress: {
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
@@ -91,21 +75,6 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
case QEvent::KeyRelease: {
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
#ifdef QT_DEBUG
if(ke->key() == Qt::Key_F9){
QUnifiedTimer::instance()->setSlowModeEnabled(true);
QUnifiedTimer::instance()->setSlowdownFactor(10);
qDebug() << "Slow animations enabled";
}
if(ke->key() == Qt::Key_F10){
QUnifiedTimer::instance()->setSlowModeEnabled(false);
QUnifiedTimer::instance()->setSlowdownFactor(1);
qDebug() << "Slow animations disabled";
}
#endif
if(ke->key() == Qt::Key_Backtab)
m_backtabPressed = false;

View File

@@ -1,21 +1,21 @@
// Copyright (c) 2014-2019, The Monero Project
//
// Copyright (c) 2014-2018, The Monero Project
//
// All rights reserved.
//
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
@@ -48,8 +48,6 @@ signals:
void sequenceReleased(const QVariant &o, const QVariant &seq);
void mousePressed(const QVariant &o, const QVariant &x, const QVariant &y);
void mouseReleased(const QVariant &o, const QVariant &x, const QVariant &y);
void userActivity();
void uriHandler(const QUrl &url);
};
#endif // FILTER_H

View File

@@ -1,798 +0,0 @@
pragma Singleton
import QtQuick 2.9
Object {
FontLoader {
source: "./fontawesome-webfont.ttf"
}
property string fontFamily: "FontAwesome"
// Icons
property string addressBook : "\uf2b9"
property string addressBookO : "\uf2ba"
property string addressCard : "\uf2bb"
property string addressCardO : "\uf2bc"
property string adjust : "\uf042"
property string adn : "\uf170"
property string alignCenter : "\uf037"
property string alignJustify : "\uf039"
property string alignLeft : "\uf036"
property string alignRight : "\uf038"
property string amazon : "\uf270"
property string ambulance : "\uf0f9"
property string americanSignLanguageInterpreting : "\uf2a3"
property string anchor : "\uf13d"
property string android : "\uf17b"
property string angellist : "\uf209"
property string angleDoubleDown : "\uf103"
property string angleDoubleLeft : "\uf100"
property string angleDoubleRight : "\uf101"
property string angleDoubleUp : "\uf102"
property string angleDown : "\uf107"
property string angleLeft : "\uf104"
property string angleRight : "\uf105"
property string angleUp : "\uf106"
property string apple : "\uf179"
property string archive : "\uf187"
property string areaChart : "\uf1fe"
property string arrowCircleDown : "\uf0ab"
property string arrowCircleLeft : "\uf0a8"
property string arrowCircleODown : "\uf01a"
property string arrowCircleOLeft : "\uf190"
property string arrowCircleORight : "\uf18e"
property string arrowCircleOUp : "\uf01b"
property string arrowCircleRight : "\uf0a9"
property string arrowCircleUp : "\uf0aa"
property string arrowDown : "\uf063"
property string arrowLeft : "\uf060"
property string arrowRight : "\uf061"
property string arrowUp : "\uf062"
property string arrows : "\uf047"
property string arrowsAlt : "\uf0b2"
property string arrowsH : "\uf07e"
property string arrowsV : "\uf07d"
property string aslInterpreting : "\uf2a3"
property string assistiveListeningSystems : "\uf2a2"
property string asterisk : "\uf069"
property string at : "\uf1fa"
property string audioDescription : "\uf29e"
property string automobile : "\uf1b9"
property string backward : "\uf04a"
property string balanceScale : "\uf24e"
property string ban : "\uf05e"
property string bandcamp : "\uf2d5"
property string bank : "\uf19c"
property string barChart : "\uf080"
property string barChartO : "\uf080"
property string barcode : "\uf02a"
property string bars : "\uf0c9"
property string bath : "\uf2cd"
property string bathtub : "\uf2cd"
property string battery : "\uf240"
property string battery0 : "\uf244"
property string battery1 : "\uf243"
property string battery2 : "\uf242"
property string battery3 : "\uf241"
property string battery4 : "\uf240"
property string batteryEmpty : "\uf244"
property string batteryFull : "\uf240"
property string batteryHalf : "\uf242"
property string batteryQuarter : "\uf243"
property string batteryThreeQuarters : "\uf241"
property string bed : "\uf236"
property string beer : "\uf0fc"
property string behance : "\uf1b4"
property string behanceSquare : "\uf1b5"
property string bell : "\uf0f3"
property string bellO : "\uf0a2"
property string bellSlash : "\uf1f6"
property string bellSlashO : "\uf1f7"
property string bicycle : "\uf206"
property string binoculars : "\uf1e5"
property string birthdayCake : "\uf1fd"
property string bitbucket : "\uf171"
property string bitbucketSquare : "\uf172"
property string bitcoin : "\uf15a"
property string blackTie : "\uf27e"
property string blind : "\uf29d"
property string bluetooth : "\uf293"
property string bluetoothB : "\uf294"
property string bold : "\uf032"
property string bolt : "\uf0e7"
property string bomb : "\uf1e2"
property string book : "\uf02d"
property string bookmark : "\uf02e"
property string bookmarkO : "\uf097"
property string braille : "\uf2a1"
property string briefcase : "\uf0b1"
property string btc : "\uf15a"
property string bug : "\uf188"
property string building : "\uf1ad"
property string buildingO : "\uf0f7"
property string bullhorn : "\uf0a1"
property string bullseye : "\uf140"
property string bus : "\uf207"
property string buysellads : "\uf20d"
property string cab : "\uf1ba"
property string calculator : "\uf1ec"
property string calendar : "\uf073"
property string calendarCheckO : "\uf274"
property string calendarMinusO : "\uf272"
property string calendarO : "\uf133"
property string calendarPlusO : "\uf271"
property string calendarTimesO : "\uf273"
property string camera : "\uf030"
property string cameraRetro : "\uf083"
property string car : "\uf1b9"
property string caretDown : "\uf0d7"
property string caretLeft : "\uf0d9"
property string caretRight : "\uf0da"
property string caretSquareODown : "\uf150"
property string caretSquareOLeft : "\uf191"
property string caretSquareORight : "\uf152"
property string caretSquareOUp : "\uf151"
property string caretUp : "\uf0d8"
property string cartArrowDown : "\uf218"
property string cartPlus : "\uf217"
property string cc : "\uf20a"
property string ccAmex : "\uf1f3"
property string ccDinersClub : "\uf24c"
property string ccDiscover : "\uf1f2"
property string ccJcb : "\uf24b"
property string ccMastercard : "\uf1f1"
property string ccPaypal : "\uf1f4"
property string ccStripe : "\uf1f5"
property string ccVisa : "\uf1f0"
property string certificate : "\uf0a3"
property string chain : "\uf0c1"
property string chainBroken : "\uf127"
property string check : "\uf00c"
property string checkCircle : "\uf058"
property string checkCircleO : "\uf05d"
property string checkSquare : "\uf14a"
property string checkSquareO : "\uf046"
property string chevronCircleDown : "\uf13a"
property string chevronCircleLeft : "\uf137"
property string chevronCircleRight : "\uf138"
property string chevronCircleUp : "\uf139"
property string chevronDown : "\uf078"
property string chevronLeft : "\uf053"
property string chevronRight : "\uf054"
property string chevronUp : "\uf077"
property string child : "\uf1ae"
property string chrome : "\uf268"
property string circle : "\uf111"
property string circleO : "\uf10c"
property string circleONotch : "\uf1ce"
property string circleThin : "\uf1db"
property string clipboard : "\uf0ea"
property string clockO : "\uf017"
property string clone : "\uf24d"
property string close : "\uf00d"
property string cloud : "\uf0c2"
property string cloudDownload : "\uf0ed"
property string cloudUpload : "\uf0ee"
property string cny : "\uf157"
property string code : "\uf121"
property string codeFork : "\uf126"
property string codepen : "\uf1cb"
property string codiepie : "\uf284"
property string coffee : "\uf0f4"
property string cog : "\uf013"
property string cogs : "\uf085"
property string columns : "\uf0db"
property string comment : "\uf075"
property string commentO : "\uf0e5"
property string commenting : "\uf27a"
property string commentingO : "\uf27b"
property string comments : "\uf086"
property string commentsO : "\uf0e6"
property string compass : "\uf14e"
property string compress : "\uf066"
property string connectdevelop : "\uf20e"
property string contao : "\uf26d"
property string copy : "\uf0c5"
property string copyright : "\uf1f9"
property string creativeCommons : "\uf25e"
property string creditCard : "\uf09d"
property string creditCardAlt : "\uf283"
property string crop : "\uf125"
property string crosshairs : "\uf05b"
property string css3 : "\uf13c"
property string cube : "\uf1b2"
property string cubes : "\uf1b3"
property string cut : "\uf0c4"
property string cutlery : "\uf0f5"
property string dashboard : "\uf0e4"
property string dashcube : "\uf210"
property string database : "\uf1c0"
property string deaf : "\uf2a4"
property string deafness : "\uf2a4"
property string dedent : "\uf03b"
property string delicious : "\uf1a5"
property string desktop : "\uf108"
property string deviantart : "\uf1bd"
property string diamond : "\uf219"
property string digg : "\uf1a6"
property string dollar : "\uf155"
property string dotCircleO : "\uf192"
property string download : "\uf019"
property string dribbble : "\uf17d"
property string driversLicense : "\uf2c2"
property string driversLicenseO : "\uf2c3"
property string dropbox : "\uf16b"
property string drupal : "\uf1a9"
property string edge : "\uf282"
property string edit : "\uf044"
property string eercast : "\uf2da"
property string eject : "\uf052"
property string ellipsisH : "\uf141"
property string ellipsisV : "\uf142"
property string empire : "\uf1d1"
property string envelope : "\uf0e0"
property string envelopeO : "\uf003"
property string envelopeOpen : "\uf2b6"
property string envelopeOpenO : "\uf2b7"
property string envelopeSquare : "\uf199"
property string envira : "\uf299"
property string eraser : "\uf12d"
property string etsy : "\uf2d7"
property string eur : "\uf153"
property string euro : "\uf153"
property string exchange : "\uf0ec"
property string exclamation : "\uf12a"
property string exclamationCircle : "\uf06a"
property string exclamationTriangle : "\uf071"
property string expand : "\uf065"
property string expeditedssl : "\uf23e"
property string externalLink : "\uf08e"
property string externalLinkSquare : "\uf14c"
property string eye : "\uf06e"
property string eyeSlash : "\uf070"
property string eyedropper : "\uf1fb"
property string fa : "\uf2b4"
property string facebook : "\uf09a"
property string facebookF : "\uf09a"
property string facebookOfficial : "\uf230"
property string facebookSquare : "\uf082"
property string fastBackward : "\uf049"
property string fastForward : "\uf050"
property string fax : "\uf1ac"
property string feed : "\uf09e"
property string female : "\uf182"
property string fighterJet : "\uf0fb"
property string file : "\uf15b"
property string fileArchiveO : "\uf1c6"
property string fileAudioO : "\uf1c7"
property string fileCodeO : "\uf1c9"
property string fileExcelO : "\uf1c3"
property string fileImageO : "\uf1c5"
property string fileMovieO : "\uf1c8"
property string fileO : "\uf016"
property string filePdfO : "\uf1c1"
property string filePhotoO : "\uf1c5"
property string filePictureO : "\uf1c5"
property string filePowerpointO : "\uf1c4"
property string fileSoundO : "\uf1c7"
property string fileText : "\uf15c"
property string fileTextO : "\uf0f6"
property string fileVideoO : "\uf1c8"
property string fileWordO : "\uf1c2"
property string fileZipO : "\uf1c6"
property string filesO : "\uf0c5"
property string film : "\uf008"
property string filter : "\uf0b0"
property string fire : "\uf06d"
property string fireExtinguisher : "\uf134"
property string firefox : "\uf269"
property string firstOrder : "\uf2b0"
property string flag : "\uf024"
property string flagCheckered : "\uf11e"
property string flagO : "\uf11d"
property string flash : "\uf0e7"
property string flask : "\uf0c3"
property string flickr : "\uf16e"
property string floppyO : "\uf0c7"
property string folder : "\uf07b"
property string folderO : "\uf114"
property string folderOpen : "\uf07c"
property string folderOpenO : "\uf115"
property string font : "\uf031"
property string fontAwesome : "\uf2b4"
property string fonticons : "\uf280"
property string fortAwesome : "\uf286"
property string forumbee : "\uf211"
property string forward : "\uf04e"
property string foursquare : "\uf180"
property string freeCodeCamp : "\uf2c5"
property string frownO : "\uf119"
property string futbolO : "\uf1e3"
property string gamepad : "\uf11b"
property string gavel : "\uf0e3"
property string gbp : "\uf154"
property string ge : "\uf1d1"
property string gear : "\uf013"
property string gears : "\uf085"
property string genderless : "\uf22d"
property string getPocket : "\uf265"
property string gg : "\uf260"
property string ggCircle : "\uf261"
property string gift : "\uf06b"
property string git : "\uf1d3"
property string gitSquare : "\uf1d2"
property string github : "\uf09b"
property string githubAlt : "\uf113"
property string githubSquare : "\uf092"
property string gitlab : "\uf296"
property string gittip : "\uf184"
property string glass : "\uf000"
property string glide : "\uf2a5"
property string glideG : "\uf2a6"
property string globe : "\uf0ac"
property string google : "\uf1a0"
property string googlePlus : "\uf0d5"
property string googlePlusCircle : "\uf2b3"
property string googlePlusOfficial : "\uf2b3"
property string googlePlusSquare : "\uf0d4"
property string googleWallet : "\uf1ee"
property string graduationCap : "\uf19d"
property string gratipay : "\uf184"
property string grav : "\uf2d6"
property string group : "\uf0c0"
property string hSquare : "\uf0fd"
property string hackerNews : "\uf1d4"
property string handGrabO : "\uf255"
property string handLizardO : "\uf258"
property string handODown : "\uf0a7"
property string handOLeft : "\uf0a5"
property string handORight : "\uf0a4"
property string handOUp : "\uf0a6"
property string handPaperO : "\uf256"
property string handPeaceO : "\uf25b"
property string handPointerO : "\uf25a"
property string handRockO : "\uf255"
property string handScissorsO : "\uf257"
property string handSpockO : "\uf259"
property string handStopO : "\uf256"
property string handshakeO : "\uf2b5"
property string hardOfHearing : "\uf2a4"
property string hashtag : "\uf292"
property string hddO : "\uf0a0"
property string header : "\uf1dc"
property string headphones : "\uf025"
property string heart : "\uf004"
property string heartO : "\uf08a"
property string heartbeat : "\uf21e"
property string history : "\uf1da"
property string home : "\uf015"
property string hospitalO : "\uf0f8"
property string hotel : "\uf236"
property string hourglass : "\uf254"
property string hourglass1 : "\uf251"
property string hourglass2 : "\uf252"
property string hourglass3 : "\uf253"
property string hourglassEnd : "\uf253"
property string hourglassHalf : "\uf252"
property string hourglassO : "\uf250"
property string hourglassStart : "\uf251"
property string houzz : "\uf27c"
property string html5 : "\uf13b"
property string iCursor : "\uf246"
property string idBadge : "\uf2c1"
property string idCard : "\uf2c2"
property string idCardO : "\uf2c3"
property string ils : "\uf20b"
property string image : "\uf03e"
property string imdb : "\uf2d8"
property string inbox : "\uf01c"
property string indent : "\uf03c"
property string industry : "\uf275"
property string info : "\uf129"
property string infoCircle : "\uf05a"
property string inr : "\uf156"
property string instagram : "\uf16d"
property string institution : "\uf19c"
property string internetExplorer : "\uf26b"
property string intersex : "\uf224"
property string ioxhost : "\uf208"
property string italic : "\uf033"
property string joomla : "\uf1aa"
property string jpy : "\uf157"
property string jsfiddle : "\uf1cc"
property string key : "\uf084"
property string keyboardO : "\uf11c"
property string krw : "\uf159"
property string language : "\uf1ab"
property string laptop : "\uf109"
property string lastfm : "\uf202"
property string lastfmSquare : "\uf203"
property string leaf : "\uf06c"
property string leanpub : "\uf212"
property string legal : "\uf0e3"
property string lemonO : "\uf094"
property string levelDown : "\uf149"
property string levelUp : "\uf148"
property string lifeBouy : "\uf1cd"
property string lifeBuoy : "\uf1cd"
property string lifeRing : "\uf1cd"
property string lifeSaver : "\uf1cd"
property string lightbulbO : "\uf0eb"
property string lineChart : "\uf201"
property string link : "\uf0c1"
property string linkedin : "\uf0e1"
property string linkedinSquare : "\uf08c"
property string linode : "\uf2b8"
property string linux : "\uf17c"
property string list : "\uf03a"
property string listAlt : "\uf022"
property string listOl : "\uf0cb"
property string listUl : "\uf0ca"
property string locationArrow : "\uf124"
property string lock : "\uf023"
property string longArrowDown : "\uf175"
property string longArrowLeft : "\uf177"
property string longArrowRight : "\uf178"
property string longArrowUp : "\uf176"
property string lowVision : "\uf2a8"
property string magic : "\uf0d0"
property string magnet : "\uf076"
property string mailForward : "\uf064"
property string mailReply : "\uf112"
property string mailReplyAll : "\uf122"
property string male : "\uf183"
property string map : "\uf279"
property string mapMarker : "\uf041"
property string mapO : "\uf278"
property string mapPin : "\uf276"
property string mapSigns : "\uf277"
property string mars : "\uf222"
property string marsDouble : "\uf227"
property string marsStroke : "\uf229"
property string marsStrokeH : "\uf22b"
property string marsStrokeV : "\uf22a"
property string maxcdn : "\uf136"
property string meanpath : "\uf20c"
property string medium : "\uf23a"
property string medkit : "\uf0fa"
property string meetup : "\uf2e0"
property string mehO : "\uf11a"
property string mercury : "\uf223"
property string microchip : "\uf2db"
property string microphone : "\uf130"
property string microphoneSlash : "\uf131"
property string minus : "\uf068"
property string minusCircle : "\uf056"
property string minusSquare : "\uf146"
property string minusSquareO : "\uf147"
property string mixcloud : "\uf289"
property string mobile : "\uf10b"
property string mobilePhone : "\uf10b"
property string modx : "\uf285"
property string money : "\uf0d6"
property string moonO : "\uf186"
property string mortarBoard : "\uf19d"
property string motorcycle : "\uf21c"
property string mousePointer : "\uf245"
property string music : "\uf001"
property string navicon : "\uf0c9"
property string neuter : "\uf22c"
property string newspaperO : "\uf1ea"
property string objectGroup : "\uf247"
property string objectUngroup : "\uf248"
property string odnoklassniki : "\uf263"
property string odnoklassnikiSquare : "\uf264"
property string opencart : "\uf23d"
property string openid : "\uf19b"
property string opera : "\uf26a"
property string optinMonster : "\uf23c"
property string outdent : "\uf03b"
property string pagelines : "\uf18c"
property string paintBrush : "\uf1fc"
property string paperPlane : "\uf1d8"
property string paperPlaneO : "\uf1d9"
property string paperclip : "\uf0c6"
property string paragraph : "\uf1dd"
property string paste : "\uf0ea"
property string pause : "\uf04c"
property string pauseCircle : "\uf28b"
property string pauseCircleO : "\uf28c"
property string paw : "\uf1b0"
property string paypal : "\uf1ed"
property string pencil : "\uf040"
property string pencilSquare : "\uf14b"
property string pencilSquareO : "\uf044"
property string percent : "\uf295"
property string phone : "\uf095"
property string phoneSquare : "\uf098"
property string photo : "\uf03e"
property string pictureO : "\uf03e"
property string pieChart : "\uf200"
property string piedPiper : "\uf2ae"
property string piedPiperAlt : "\uf1a8"
property string piedPiperPp : "\uf1a7"
property string pinterest : "\uf0d2"
property string pinterestP : "\uf231"
property string pinterestSquare : "\uf0d3"
property string plane : "\uf072"
property string play : "\uf04b"
property string playCircle : "\uf144"
property string playCircleO : "\uf01d"
property string plug : "\uf1e6"
property string plus : "\uf067"
property string plusCircle : "\uf055"
property string plusSquare : "\uf0fe"
property string plusSquareO : "\uf196"
property string podcast : "\uf2ce"
property string powerOff : "\uf011"
property string printIcon : "\uf02f"
property string productHunt : "\uf288"
property string puzzlePiece : "\uf12e"
property string qq : "\uf1d6"
property string qrcode : "\uf029"
property string question : "\uf128"
property string questionCircle : "\uf059"
property string questionCircleO : "\uf29c"
property string quora : "\uf2c4"
property string quoteLeft : "\uf10d"
property string quoteRight : "\uf10e"
property string ra : "\uf1d0"
property string random : "\uf074"
property string ravelry : "\uf2d9"
property string rebel : "\uf1d0"
property string recycle : "\uf1b8"
property string reddit : "\uf1a1"
property string redditAlien : "\uf281"
property string redditSquare : "\uf1a2"
property string refresh : "\uf021"
property string registered : "\uf25d"
property string remove : "\uf00d"
property string renren : "\uf18b"
property string reorder : "\uf0c9"
property string repeat : "\uf01e"
property string reply : "\uf112"
property string replyAll : "\uf122"
property string resistance : "\uf1d0"
property string retweet : "\uf079"
property string rmb : "\uf157"
property string road : "\uf018"
property string rocket : "\uf135"
property string rotateLeft : "\uf0e2"
property string rotateRight : "\uf01e"
property string rouble : "\uf158"
property string rss : "\uf09e"
property string rssSquare : "\uf143"
property string rub : "\uf158"
property string ruble : "\uf158"
property string rupee : "\uf156"
property string s15 : "\uf2cd"
property string safari : "\uf267"
property string save : "\uf0c7"
property string scissors : "\uf0c4"
property string scribd : "\uf28a"
property string search : "\uf002"
property string searchMinus : "\uf010"
property string searchPlus : "\uf00e"
property string sellsy : "\uf213"
property string send : "\uf1d8"
property string sendO : "\uf1d9"
property string server : "\uf233"
property string share : "\uf064"
property string shareAlt : "\uf1e0"
property string shareAltSquare : "\uf1e1"
property string shareSquare : "\uf14d"
property string shareSquareO : "\uf045"
property string shekel : "\uf20b"
property string sheqel : "\uf20b"
property string shield : "\uf132"
property string ship : "\uf21a"
property string shirtsinbulk : "\uf214"
property string shoppingBag : "\uf290"
property string shoppingBasket : "\uf291"
property string shoppingCart : "\uf07a"
property string shower : "\uf2cc"
property string signIn : "\uf090"
property string signLanguage : "\uf2a7"
property string signOut : "\uf08b"
property string signal : "\uf012"
property string signing : "\uf2a7"
property string simplybuilt : "\uf215"
property string sitemap : "\uf0e8"
property string skyatlas : "\uf216"
property string skype : "\uf17e"
property string slack : "\uf198"
property string sliders : "\uf1de"
property string slideshare : "\uf1e7"
property string smileO : "\uf118"
property string snapchat : "\uf2ab"
property string snapchatGhost : "\uf2ac"
property string snapchatSquare : "\uf2ad"
property string snowflakeO : "\uf2dc"
property string soccerBallO : "\uf1e3"
property string sort : "\uf0dc"
property string sortAlphaAsc : "\uf15d"
property string sortAlphaDesc : "\uf15e"
property string sortAmountAsc : "\uf160"
property string sortAmountDesc : "\uf161"
property string sortAsc : "\uf0de"
property string sortDesc : "\uf0dd"
property string sortDown : "\uf0dd"
property string sortNumericAsc : "\uf162"
property string sortNumericDesc : "\uf163"
property string sortUp : "\uf0de"
property string soundcloud : "\uf1be"
property string spaceShuttle : "\uf197"
property string spinner : "\uf110"
property string spoon : "\uf1b1"
property string spotify : "\uf1bc"
property string square : "\uf0c8"
property string squareO : "\uf096"
property string stackExchange : "\uf18d"
property string stackOverflow : "\uf16c"
property string star : "\uf005"
property string starHalf : "\uf089"
property string starHalfEmpty : "\uf123"
property string starHalfFull : "\uf123"
property string starHalfO : "\uf123"
property string starO : "\uf006"
property string steam : "\uf1b6"
property string steamSquare : "\uf1b7"
property string stepBackward : "\uf048"
property string stepForward : "\uf051"
property string stethoscope : "\uf0f1"
property string stickyNote : "\uf249"
property string stickyNoteO : "\uf24a"
property string stop : "\uf04d"
property string stopCircle : "\uf28d"
property string stopCircleO : "\uf28e"
property string streetView : "\uf21d"
property string strikethrough : "\uf0cc"
property string stumbleupon : "\uf1a4"
property string stumbleuponCircle : "\uf1a3"
property string subscript : "\uf12c"
property string subway : "\uf239"
property string suitcase : "\uf0f2"
property string sunO : "\uf185"
property string superpowers : "\uf2dd"
property string superscript : "\uf12b"
property string support : "\uf1cd"
property string table : "\uf0ce"
property string tablet : "\uf10a"
property string tachometer : "\uf0e4"
property string tag : "\uf02b"
property string tags : "\uf02c"
property string tasks : "\uf0ae"
property string taxi : "\uf1ba"
property string telegram : "\uf2c6"
property string television : "\uf26c"
property string tencentWeibo : "\uf1d5"
property string terminal : "\uf120"
property string textHeight : "\uf034"
property string textWidth : "\uf035"
property string th : "\uf00a"
property string thLarge : "\uf009"
property string thList : "\uf00b"
property string themeisle : "\uf2b2"
property string thermometer : "\uf2c7"
property string thermometer0 : "\uf2cb"
property string thermometer1 : "\uf2ca"
property string thermometer2 : "\uf2c9"
property string thermometer3 : "\uf2c8"
property string thermometer4 : "\uf2c7"
property string thermometerEmpty : "\uf2cb"
property string thermometerFull : "\uf2c7"
property string thermometerHalf : "\uf2c9"
property string thermometerQuarter : "\uf2ca"
property string thermometerThreeQuarters : "\uf2c8"
property string thumbTack : "\uf08d"
property string thumbsDown : "\uf165"
property string thumbsODown : "\uf088"
property string thumbsOUp : "\uf087"
property string thumbsUp : "\uf164"
property string ticket : "\uf145"
property string times : "\uf00d"
property string timesCircle : "\uf057"
property string timesCircleO : "\uf05c"
property string timesRectangle : "\uf2d3"
property string timesRectangleO : "\uf2d4"
property string tint : "\uf043"
property string toggleDown : "\uf150"
property string toggleLeft : "\uf191"
property string toggleOff : "\uf204"
property string toggleOn : "\uf205"
property string toggleRight : "\uf152"
property string toggleUp : "\uf151"
property string trademark : "\uf25c"
property string train : "\uf238"
property string transgender : "\uf224"
property string transgenderAlt : "\uf225"
property string trash : "\uf1f8"
property string trashO : "\uf014"
property string tree : "\uf1bb"
property string trello : "\uf181"
property string tripadvisor : "\uf262"
property string trophy : "\uf091"
property string truck : "\uf0d1"
property string tryIcon : "\uf195"
property string tty : "\uf1e4"
property string tumblr : "\uf173"
property string tumblrSquare : "\uf174"
property string turkishLira : "\uf195"
property string tv : "\uf26c"
property string twitch : "\uf1e8"
property string twitter : "\uf099"
property string twitterSquare : "\uf081"
property string umbrella : "\uf0e9"
property string underline : "\uf0cd"
property string undo : "\uf0e2"
property string universalAccess : "\uf29a"
property string university : "\uf19c"
property string unlink : "\uf127"
property string unlock : "\uf09c"
property string unlockAlt : "\uf13e"
property string unsorted : "\uf0dc"
property string upload : "\uf093"
property string usb : "\uf287"
property string usd : "\uf155"
property string user : "\uf007"
property string userCircle : "\uf2bd"
property string userCircleO : "\uf2be"
property string userMd : "\uf0f0"
property string userO : "\uf2c0"
property string userPlus : "\uf234"
property string userSecret : "\uf21b"
property string userTimes : "\uf235"
property string users : "\uf0c0"
property string vcard : "\uf2bb"
property string vcardO : "\uf2bc"
property string venus : "\uf221"
property string venusDouble : "\uf226"
property string venusMars : "\uf228"
property string viacoin : "\uf237"
property string viadeo : "\uf2a9"
property string viadeoSquare : "\uf2aa"
property string videoCamera : "\uf03d"
property string vimeo : "\uf27d"
property string vimeoSquare : "\uf194"
property string vine : "\uf1ca"
property string vk : "\uf189"
property string volumeControlPhone : "\uf2a0"
property string volumeDown : "\uf027"
property string volumeOff : "\uf026"
property string volumeUp : "\uf028"
property string warning : "\uf071"
property string wechat : "\uf1d7"
property string weibo : "\uf18a"
property string weixin : "\uf1d7"
property string whatsapp : "\uf232"
property string wheelchair : "\uf193"
property string wheelchairAlt : "\uf29b"
property string wifi : "\uf1eb"
property string wikipediaW : "\uf266"
property string windowClose : "\uf2d3"
property string windowCloseO : "\uf2d4"
property string windowMaximize : "\uf2d0"
property string windowMinimize : "\uf2d1"
property string windowRestore : "\uf2d2"
property string windows : "\uf17a"
property string won : "\uf159"
property string wordpress : "\uf19a"
property string wpbeginner : "\uf297"
property string wpexplorer : "\uf2de"
property string wpforms : "\uf298"
property string wrench : "\uf0ad"
property string xing : "\uf168"
property string xingSquare : "\uf169"
property string yCombinator : "\uf23b"
property string yCombinatorSquare : "\uf1d4"
property string yahoo : "\uf19e"
property string yc : "\uf23b"
property string ycSquare : "\uf1d4"
property string yelp : "\uf1e9"
property string yen : "\uf157"
property string yoast : "\uf2b1"
property string youtube : "\uf167"
property string youtubePlay : "\uf16a"
property string youtubeSquare : "\uf166"
}

View File

@@ -1,8 +0,0 @@
import QtQuick 2.9
QtObject {
id: object
default property alias children: object.__children
property list<QtObject> __children: [QtObject {}]
}

View File

@@ -1,2 +0,0 @@
module FontAwesome
singleton FontAwesome 1.0 FontAwesome.qml

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -17,15 +17,16 @@ if [ ! -d $MONERO_DIR/src ]; then
fi
git submodule update --remote
git -C $MONERO_DIR fetch
git -C $MONERO_DIR checkout v0.14.1.0
git -C $MONERO_DIR checkout release-v0.13
# get monero core tag
pushd $MONERO_DIR
get_tag
popd
# create local monero branch
git -C $MONERO_DIR checkout -B $VERSIONTAG
git -C $MONERO_DIR submodule init
git -C $MONERO_DIR submodule update
# Merge monero PR dependencies
# Workaround for git username requirements
@@ -47,9 +48,6 @@ done
$(git -C $MONERO_DIR config user.name "$OLD_GIT_USER")
$(git -C $MONERO_DIR config user.email "$OLD_GIT_EMAIL")
git -C $MONERO_DIR submodule init
git -C $MONERO_DIR submodule update
# Build libwallet if it doesnt exist
if [ ! -f $MONERO_DIR/lib/libwallet_merged.a ]; then
echo "libwallet_merged.a not found - Building libwallet"
@@ -90,12 +88,6 @@ if [ -z $BUILD_TYPE ]; then
BUILD_TYPE=release
fi
BUILD_TREZOR_FLAGS=" -DUSE_DEVICE_TREZOR=ON"
if [ "$BUILD_TREZOR" == false ]; then
BUILD_TREZOR_FLAGS=" -DUSE_DEVICE_TREZOR=OFF"
fi
BUILD_TREZOR_FLAGS=" -DUSE_DEVICE_TREZOR_UDP_RELEASE=ON ${BUILD_TREZOR_FLAGS}"
STATIC=false
ANDROID=false
if [ "$BUILD_TYPE" == "release" ]; then
@@ -144,9 +136,9 @@ make_exec="make"
if [ "$platform" == "darwin" ]; then
echo "Configuring build for MacOS.."
if [ "$STATIC" == true ]; then
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
else
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi
## LINUX 64
@@ -154,38 +146,38 @@ elif [ "$platform" == "linux64" ]; then
echo "Configuring build for Linux x64"
if [ "$ANDROID" == true ]; then
echo "Configuring build for Android on Linux host"
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="armv7-a" -D ANDROID=true -D BUILD_GUI_DEPS=ON -D USE_LTO=OFF -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="armv7-a" -D ANDROID=true -D BUILD_GUI_DEPS=ON -D USE_LTO=OFF -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
elif [ "$STATIC" == true ]; then
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="x86-64" -D BUILD_64=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
else
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi
## LINUX 32
elif [ "$platform" == "linux32" ]; then
echo "Configuring build for Linux i686"
if [ "$STATIC" == true ]; then
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D ARCH="i686" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
else
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi
## LINUX ARMv7
elif [ "$platform" == "linuxarmv7" ]; then
echo "Configuring build for Linux armv7"
if [ "$STATIC" == true ]; then
cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D STATIC=ON -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
else
cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -D -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi
## LINUX other
elif [ "$platform" == "linux" ]; then
echo "Configuring build for Linux general"
if [ "$STATIC" == true ]; then
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
else
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi
## Windows 64
@@ -194,21 +186,21 @@ elif [ "$platform" == "mingw64" ]; then
# Do something under Windows NT platform
echo "Configuring build for MINGW64.."
BOOST_ROOT=/mingw64/boost
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="x86-64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=../../cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys64 ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="x86-64" -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" ../..
## Windows 32
elif [ "$platform" == "mingw32" ]; then
# Do something under Windows NT platform
echo "Configuring build for MINGW32.."
BOOST_ROOT=/mingw32/boost
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D Boost_DEBUG=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="i686" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" -D CMAKE_TOOLCHAIN_FILE=../../cmake/32-bit-toolchain.cmake -D MSYS2_FOLDER=c:/msys32 ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D Boost_DEBUG=ON -D BOOST_ROOT="$BOOST_ROOT" -D ARCH="i686" -D BUILD_64=OFF -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" -G "MSYS Makefiles" ../..
make_exec="mingw32-make"
else
echo "Unknown platform, configuring general build"
if [ "$STATIC" == true ]; then
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D STATIC=ON -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
else
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON $BUILD_TREZOR_FLAGS -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
cmake -D CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -D BUILD_GUI_DEPS=ON -D CMAKE_INSTALL_PREFIX="$MONERO_DIR" ../..
fi
fi
@@ -244,13 +236,12 @@ eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/easylogging++ all install
eval make -C $MONERO_DIR/build/$BUILD_TYPE/external/db_drivers/liblmdb all install
# Install libunbound
if [ -d $MONERO_DIR/build/$BUILD_TYPE/external/unbound ]; then
echo "Installing libunbound..."
pushd $MONERO_DIR/build/$BUILD_TYPE/external/unbound
# no need to make, it was already built as dependency for libwallet
# make -j$CPU_CORE_COUNT
$make_exec install -j$CPU_CORE_COUNT
popd
fi
echo "Installing libunbound..."
pushd $MONERO_DIR/build/$BUILD_TYPE/external/unbound
# no need to make, it was already built as dependency for libwallet
# make -j$CPU_CORE_COUNT
$make_exec install -j$CPU_CORE_COUNT
popd
popd

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 361 KiB

View File

@@ -1,8 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<g fill="none" fill-rule="evenodd" stroke="#FFF" stroke-width="1.5" opacity="1">
<path fill-rule="nonzero" d="M10 .75C4.9.75.75 4.9.75 10S4.9 19.25 10 19.25s9.25-4.15 9.25-9.25S15.1.75 10 .75z"/>
<g stroke-linecap="round">
<path d="M11.1 12.786L13.5 10l-2.4-2.786M5.7 10h7.627"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

BIN
images/ascSortIndicator.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

BIN
images/backToWindowIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

View File

@@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="14" viewBox="0 0 16 14">
<path fill="none" fill-rule="evenodd" stroke="#FFF" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.647" d="M1 8.295L6.732 13 15 1"/>
</svg>

Before

Width:  |  Height:  |  Size: 244 B

BIN
images/checkedBlackIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

BIN
images/close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

View File

@@ -1,5 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd" stroke="#FFF" stroke-linecap="round" stroke-width="1.85" opacity="1">
<path d="M1 1l14 14M15 1L1 15"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 250 B

BIN
images/closeIcon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

BIN
images/connectedImage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1,6 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="21" viewBox="0 0 16 21">
<g fill="none" fill-rule="evenodd" opacity="1">
<path fill="#FFF" d="M4 1v2H2v16h12V3h-2V1h2.5A1.5 1.5 0 0 1 16 2.5v17a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 19.5v-17A1.5 1.5 0 0 1 1.5 1H4zm2-1h4a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1z"/>
<path stroke="#FFF" stroke-linecap="round" stroke-linejoin="round" d="M4.41 11.634l2.874 2.44 4.08-5.926"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 493 B

Some files were not shown because too many files have changed in this diff Show More