Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
755977d1ba | ||
|
|
bb127744af |
177
BasicPanel.qml
Normal file
@@ -0,0 +1,177 @@
|
||||
// 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 QtGraphicalEffects 1.0
|
||||
import "components"
|
||||
import "pages"
|
||||
|
||||
// mbg033 @ 2016-10-08: Not used anymore, to be deleted
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
width: 470
|
||||
// height: paymentId.y + paymentId.height + 12
|
||||
height: header.height + header.anchors.topMargin + transferBasic.height
|
||||
color: "#F0EEEE"
|
||||
|
||||
border.width: 1
|
||||
border.color: "#DBDBDB"
|
||||
|
||||
property alias balanceText : balanceText.text;
|
||||
property alias unlockedBalanceText : availableBalanceText.text;
|
||||
// repeating signal to the outside world
|
||||
signal paymentClicked(string address, string paymentId, string amount, int mixinCount,
|
||||
int priority, string description)
|
||||
|
||||
Connections {
|
||||
target: transferBasic
|
||||
onPaymentClicked: {
|
||||
console.log("BasicPanel: paymentClicked")
|
||||
root.paymentClicked(address, paymentId, amount, mixinCount, priority, description)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: header
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.leftMargin: 1
|
||||
anchors.rightMargin: 1
|
||||
anchors.topMargin: 30
|
||||
height: 64
|
||||
color: "#FFFFFF"
|
||||
|
||||
Image {
|
||||
id: logo
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.verticalCenterOffset: -5
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
source: "images/moneroLogo2.png"
|
||||
}
|
||||
|
||||
Grid {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
width: 256
|
||||
columns: 3
|
||||
|
||||
Text {
|
||||
|
||||
width: 116
|
||||
height: 20
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
elide: Text.ElideRight
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignBottom
|
||||
color: "#535353"
|
||||
text: qsTr("Locked Balance:")
|
||||
}
|
||||
|
||||
Text {
|
||||
id: balanceText
|
||||
width: 110
|
||||
height: 20
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 18
|
||||
elide: Text.ElideRight
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignBottom
|
||||
color: "#000000"
|
||||
text: qsTr("78.9239845")
|
||||
}
|
||||
|
||||
Item {
|
||||
height: 20
|
||||
width: 20
|
||||
|
||||
Image {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
source: "images/lockIcon.png"
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
width: 116
|
||||
height: 20
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 12
|
||||
elide: Text.ElideRight
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignBottom
|
||||
color: "#535353"
|
||||
text: qsTr("Available Balance:")
|
||||
}
|
||||
|
||||
Text {
|
||||
id: availableBalanceText
|
||||
width: 110
|
||||
height: 20
|
||||
font.family: "Arial"
|
||||
font.pixelSize: 14
|
||||
elide: Text.ElideRight
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
verticalAlignment: Text.AlignBottom
|
||||
color: "#000000"
|
||||
text: qsTr("2324.9239845")
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
height: 1
|
||||
color: "#DBDBDB"
|
||||
}
|
||||
}
|
||||
Item {
|
||||
anchors.top: header.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
Transfer {
|
||||
id : transferBasic
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
||||
// indicate disabled state
|
||||
// Desaturate {
|
||||
// anchors.fill: parent
|
||||
// source: parent
|
||||
// desaturation: root.enabled ? 0.0 : 1.0
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@@ -252,9 +252,7 @@ Rectangle {
|
||||
|
||||
Flickable {
|
||||
id:flicker
|
||||
contentHeight: (progressBar.visible)? menuColumn.height + separator.height +
|
||||
networkStatus.height + progressBar.height + daemonProgressBar.height :
|
||||
menuColumn.height + separator.height + networkStatus.height
|
||||
contentHeight: 500 * scaleRatio
|
||||
anchors.fill: parent
|
||||
clip: true
|
||||
|
||||
@@ -478,7 +476,7 @@ Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
text: qsTr("Shared RingDB") + translationManager.emptyString
|
||||
symbol: qsTr("A") + translationManager.emptyString
|
||||
symbol: qsTr("S") + translationManager.emptyString
|
||||
dotColor: "#FFD781"
|
||||
under: advancedButton
|
||||
onClicked: {
|
||||
@@ -570,26 +568,15 @@ Rectangle {
|
||||
|
||||
} // Flickable
|
||||
|
||||
Rectangle {
|
||||
id: separator
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: 0
|
||||
anchors.bottom: networkStatus.top;
|
||||
height: 10 * scaleRatio
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
NetworkStatusItem {
|
||||
id: networkStatus
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: 0
|
||||
anchors.leftMargin: 4
|
||||
anchors.rightMargin: 4
|
||||
anchors.bottom: (progressBar.visible)? progressBar.top : parent.bottom;
|
||||
connected: Wallet.ConnectionStatus_Disconnected
|
||||
height: 48 * scaleRatio
|
||||
height: 58 * scaleRatio
|
||||
}
|
||||
|
||||
ProgressBar {
|
||||
@@ -597,7 +584,7 @@ Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: daemonProgressBar.top
|
||||
height: 48 * scaleRatio
|
||||
height: 35 * scaleRatio
|
||||
syncType: qsTr("Wallet")
|
||||
visible: networkStatus.connected
|
||||
}
|
||||
|
||||
49
Logger.cpp
@@ -1,49 +0,0 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QStandardPaths>
|
||||
#include <QFileInfo>
|
||||
#include <QString>
|
||||
|
||||
#include "Logger.h"
|
||||
#include "wallet/api/wallet2_api.h"
|
||||
|
||||
// default log path by OS (should be writable)
|
||||
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);
|
||||
#elif defined(Q_OS_WIN)
|
||||
static const QString osPath = QCoreApplication::applicationDirPath();
|
||||
#elif defined(Q_OS_MAC)
|
||||
static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0) + "/Library/Logs";
|
||||
#else // linux + bsd
|
||||
static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0);
|
||||
#endif
|
||||
|
||||
|
||||
// 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
|
||||
return osPath + "/" + default_name;
|
||||
}
|
||||
|
||||
|
||||
// custom messageHandler that foward all messages to easylogging
|
||||
void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message)
|
||||
{
|
||||
(void) context; // context isn't used in release builds
|
||||
const std::string cat = "frontend"; // category displayed in the log
|
||||
const std::string msg = message.toStdString();
|
||||
switch(type)
|
||||
{
|
||||
case QtDebugMsg: Monero::Wallet::debug(cat, msg); break;
|
||||
case QtInfoMsg: Monero::Wallet::info(cat, msg); break;
|
||||
case QtWarningMsg: Monero::Wallet::warning(cat, msg); break;
|
||||
case QtCriticalMsg: Monero::Wallet::error(cat, msg); break;
|
||||
case QtFatalMsg: Monero::Wallet::error(cat, msg); break;
|
||||
}
|
||||
}
|
||||
|
||||
8
Logger.h
@@ -1,8 +0,0 @@
|
||||
#ifndef LOGGER_H
|
||||
#define LOGGER_H
|
||||
|
||||
const QString getLogPath(const QString logPath);
|
||||
void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message);
|
||||
|
||||
#endif // LOGGER_H
|
||||
|
||||
@@ -50,7 +50,6 @@ Rectangle {
|
||||
property string unlockedBalanceText
|
||||
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 { }
|
||||
@@ -121,7 +120,7 @@ Rectangle {
|
||||
}, State {
|
||||
name: "Receive"
|
||||
PropertyChanges { target: root; currentView: receiveView }
|
||||
PropertyChanges { target: mainFlickable; contentHeight: receiveView.receiveHeight + 100 }
|
||||
PropertyChanges { target: mainFlickable; contentHeight: 1000 * scaleRatio }
|
||||
}, State {
|
||||
name: "TxKey"
|
||||
PropertyChanges { target: root; currentView: txkeyView }
|
||||
@@ -129,7 +128,7 @@ Rectangle {
|
||||
}, State {
|
||||
name: "SharedRingDB"
|
||||
PropertyChanges { target: root; currentView: sharedringdbView }
|
||||
PropertyChanges { target: mainFlickable; contentHeight: sharedringdbView.panelHeight + 100 }
|
||||
PropertyChanges { target: mainFlickable; contentHeight: minHeight }
|
||||
}, State {
|
||||
name: "AddressBook"
|
||||
PropertyChanges { target: root; currentView: addressBookView }
|
||||
@@ -141,7 +140,7 @@ Rectangle {
|
||||
}, State {
|
||||
name: "Settings"
|
||||
PropertyChanges { target: root; currentView: settingsView }
|
||||
PropertyChanges { target: mainFlickable; contentHeight: settingsView.settingsHeight + 100 }
|
||||
PropertyChanges { target: mainFlickable; contentHeight: 2000 * scaleRatio }
|
||||
}, State {
|
||||
name: "Mining"
|
||||
PropertyChanges { target: root; currentView: miningView }
|
||||
|
||||
98
README.md
@@ -69,11 +69,11 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
|
||||
### On Linux:
|
||||
|
||||
(Tested on Ubuntu 17.10 x64, Ubuntu 18.04 x64 and Gentoo x64)
|
||||
(Tested on Ubuntu 16.04 x86, 16.10 x64, Gentoo x64 and Linux Mint 18 "Sarah" - Cinnamon x64)
|
||||
|
||||
1. Install Monero dependencies
|
||||
|
||||
- For Debian distributions (Debian, Ubuntu, Mint, Tails...)
|
||||
- For Ubuntu and Mint
|
||||
|
||||
`sudo apt install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev`
|
||||
|
||||
@@ -81,13 +81,27 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
|
||||
`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`
|
||||
|
||||
2. Install Qt:
|
||||
2. Grab an up-to-date copy of the monero-gui repository
|
||||
|
||||
*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.
|
||||
`git clone https://github.com/monero-project/monero-gui.git`
|
||||
|
||||
- For Ubuntu 17.10+
|
||||
3. Go into the repository
|
||||
|
||||
`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`
|
||||
`cd monero-gui`
|
||||
|
||||
4. Install the GUI dependencies
|
||||
|
||||
- For Ubuntu 16.04 x86
|
||||
|
||||
`sudo apt install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-xmllistmodel qttools5-dev-tools qml-module-qtquick-dialogs`
|
||||
|
||||
- For Ubuntu 16.04+ x64
|
||||
|
||||
`sudo apt install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-xmllistmodel qttools5-dev-tools qml-module-qtquick-dialogs qml-module-qt-labs-settings libqt5qml-graphicaleffects`
|
||||
|
||||
- For Linux Mint 18 "Sarah" - Cinnamon x64
|
||||
|
||||
`sudo apt install qml-module-qt-labs-settings qml-module-qtgraphicaleffects`
|
||||
|
||||
- For Gentoo
|
||||
|
||||
@@ -95,7 +109,7 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
|
||||
- Optional : To build the flag `WITH_SCANNER`
|
||||
|
||||
- For Ubuntu
|
||||
- For Ubuntu and Mint
|
||||
|
||||
`sudo apt install qtmultimedia5-dev qml-module-qtmultimedia libzbar-dev`
|
||||
|
||||
@@ -105,17 +119,15 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
|
||||
`emerge dev-qt/qtmultimedia:5 media-gfx/zbar`
|
||||
|
||||
5. Build the GUI
|
||||
|
||||
3. Clone repository
|
||||
- For Ubuntu and Mint
|
||||
|
||||
`git clone https://github.com/monero-project/monero-gui.git`
|
||||
`./build.sh`
|
||||
|
||||
4. Build
|
||||
- For Gentoo
|
||||
|
||||
```
|
||||
cd monero-gui
|
||||
./build.sh
|
||||
```
|
||||
`QT_SELECT=5 ./build.sh`
|
||||
|
||||
The executable can be found in the build/release/bin folder.
|
||||
|
||||
@@ -182,47 +194,57 @@ More info: http://stackoverflow.com/a/35098040/1683164
|
||||
|
||||
### On Windows:
|
||||
|
||||
The Monero GUI on Windows is 64 bits only; 32-bit Windows GUI builds are not officially supported anymore.
|
||||
1. Install [msys2](http://msys2.github.io/), follow the instructions on that page on how to update packages to the latest versions
|
||||
|
||||
1. Install [MSYS2](https://www.msys2.org/), follow the instructions on that page on how to update system and packages to the latest versions
|
||||
2. Install Monero dependencies as described in [monero documentation](https://github.com/monero-project/monero) into msys2 environment
|
||||
**As we only build application for x86, install only dependencies for x86 architecture (i686 in package name)**
|
||||
```
|
||||
pacman -S mingw-w64-i686-toolchain make mingw-w64-i686-cmake mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-zeromq mingw-w64-i686-libsodium
|
||||
|
||||
2. Open an 64-bit MSYS2 shell: Use the *MSYS2 MinGW 64-bit* shortcut, or use the `msys2_shell.cmd` batch file with a `-mingw64` parameter
|
||||
```
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
```
|
||||
pacman -S mingw-w64-x86_64-qt5
|
||||
```
|
||||
|
||||
There is no more need to download some special installer from the Qt website, the standard MSYS2 package for Qt will do in almost all circumstances.
|
||||
|
||||
5. Install git
|
||||
3. Install git into msys2 environment
|
||||
|
||||
```
|
||||
pacman -S git
|
||||
```
|
||||
|
||||
6. Clone repository
|
||||
4. Install Qt5 from [official site](https://www.qt.io/download-open-source/)
|
||||
- download unified installer, run and select following options:
|
||||
- Qt > Qt 5.7 > MinGW 5.3.0 32 bit
|
||||
- Tools > MinGW 5.3.0
|
||||
- continue with installation
|
||||
|
||||
5. Open ```MinGW-w64 Win32 Shell``` shell
|
||||
|
||||
```%MSYS_ROOT%\msys2_shell.cmd -mingw32```
|
||||
|
||||
Where ```%MSYS_ROOT%``` will be ```c:\msys32``` if your host OS is x86-based or ```c:\msys64``` if your host OS
|
||||
is x64-based
|
||||
|
||||
6. Install the latest version of boost, specifically the required static libraries
|
||||
```
|
||||
cd
|
||||
wget http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.bz2
|
||||
tar xjf boost_1_63_0.tar.bz2
|
||||
cd boost_1_63_0
|
||||
./bootstrap.sh mingw
|
||||
./b2 --prefix=/mingw32/boost --layout=tagged --without-mpi --without-python toolset=gcc address-model=32 variant=debug,release link=static threading=multi runtime-link=static -j$(nproc) install
|
||||
```
|
||||
|
||||
7. Clone repository
|
||||
```
|
||||
cd
|
||||
git clone https://github.com/monero-project/monero-gui.git
|
||||
```
|
||||
|
||||
7. Build
|
||||
|
||||
8. Build the GUI
|
||||
```
|
||||
cd monero-gui
|
||||
export PATH=$(ls -rd /c/Qt/5.[6,7,8]/mingw53_32/bin | head -1):$PATH
|
||||
./build.sh
|
||||
cd build
|
||||
make deploy
|
||||
```
|
||||
|
||||
The executable can be found in the `.\release\bin` directory.
|
||||
The executable can be found in the ```.\release\bin``` directory.
|
||||
|
||||
@@ -25,12 +25,19 @@ bool TranslationManager::setLanguage(const QString &language)
|
||||
return true;
|
||||
}
|
||||
|
||||
// translations are compiled into app binary
|
||||
#ifdef Q_OS_MACX
|
||||
QString dir = qApp->applicationDirPath() + "/../Resources/translations";
|
||||
#else
|
||||
QString dir = qApp->applicationDirPath() + "/translations";
|
||||
#endif
|
||||
|
||||
QString filename = "monero-core_" + language;
|
||||
|
||||
qDebug("%s: loading translation file '%s' from '%s'",
|
||||
qDebug("%s: loading translation file '%s' from '%s",
|
||||
__FUNCTION__, qPrintable(filename), qPrintable(dir));
|
||||
|
||||
|
||||
if (m_translator->load(filename, dir)) {
|
||||
qDebug("%s: translation for language '%s' loaded successfully",
|
||||
__FUNCTION__, qPrintable(language));
|
||||
@@ -38,24 +45,11 @@ bool TranslationManager::setLanguage(const QString &language)
|
||||
qApp->installTranslator(m_translator);
|
||||
emit languageChanged();
|
||||
return true;
|
||||
} else {
|
||||
qCritical("%s: error loading translation for language '%s'",
|
||||
__FUNCTION__, qPrintable(language));
|
||||
return false;
|
||||
}
|
||||
|
||||
qDebug("%s: couldn't load translation file '%s' from '%s'",
|
||||
__FUNCTION__, qPrintable(filename), qPrintable(dir));
|
||||
qDebug("%s: loading embedded translation file '%s'",
|
||||
__FUNCTION__, qPrintable(filename));
|
||||
|
||||
if (m_translator->load(filename, ":")) {
|
||||
qDebug("%s: embedded translation for language '%s' loaded successfully",
|
||||
__FUNCTION__, qPrintable(language));
|
||||
qApp->installTranslator(m_translator);
|
||||
emit languageChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
qCritical("%s: error loading translation for language '%s'",
|
||||
__FUNCTION__, qPrintable(language));
|
||||
return false;
|
||||
}
|
||||
|
||||
TranslationManager *TranslationManager::instance()
|
||||
|
||||
52
build_libwallet_api.sh
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# MONERO_URL=https://github.com/monero-project/monero.git
|
||||
# MONERO_BRANCH=master
|
||||
CPU_CORE_COUNT=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu)
|
||||
pushd $(pwd)
|
||||
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
source $ROOT_DIR/utils.sh
|
||||
|
||||
|
||||
INSTALL_DIR=$ROOT_DIR/wallet
|
||||
MONERO_DIR=$ROOT_DIR/monero
|
||||
|
||||
|
||||
mkdir -p $MONERO_DIR/build/release
|
||||
pushd $MONERO_DIR/build/release
|
||||
|
||||
# reusing function from "utils.sh"
|
||||
platform=$(get_platform)
|
||||
|
||||
pushd $MONERO_DIR/build/release/src/wallet
|
||||
make -j$CPU_CORE_COUNT
|
||||
make install -j$CPU_CORE_COUNT
|
||||
popd
|
||||
|
||||
# unbound is one more dependency. can't be merged to the wallet_merged
|
||||
# since filename conflict (random.c.obj)
|
||||
# for Linux, we use libunbound shipped with the system, so we don't need to build it
|
||||
|
||||
if [ "$platform" != "linux" ]; then
|
||||
echo "Building libunbound..."
|
||||
pushd $MONERO_DIR/build/release/external/unbound
|
||||
# no need to make, it was already built as dependency for libwallet
|
||||
# make -j$CPU_CORE_COUNT
|
||||
make install -j$CPU_CORE_COUNT
|
||||
popd
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -57,12 +57,7 @@ RowLayout {
|
||||
radius: 3
|
||||
y: 0
|
||||
color: "transparent"
|
||||
border.color:
|
||||
if(checkBox.checked){
|
||||
return MoneroComponents.Style.inputBorderColorActive;
|
||||
} else {
|
||||
return MoneroComponents.Style.inputBorderColorInActive;
|
||||
}
|
||||
border.color: checkBox.checked ? Qt.rgba(1, 1, 1, 0.35) : Qt.rgba(1, 1, 1, 0.25)
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
||||
@@ -27,23 +27,22 @@
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtQuick.Window 2.2
|
||||
import QtQuick.Window 2.0
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
import "../js/Windows.js" as Windows
|
||||
import "../js/Utils.js" as Utils
|
||||
|
||||
Window {
|
||||
id: root
|
||||
modality: Qt.ApplicationModal
|
||||
color: "black"
|
||||
flags: Windows.flags
|
||||
flags: Qt.Window | Qt.FramelessWindowHint
|
||||
property alias title: dialogTitle.text
|
||||
property alias text: dialogContent.text
|
||||
property alias content: root.text
|
||||
property alias okVisible: okButton.visible
|
||||
property alias textArea: dialogContent
|
||||
property var icon
|
||||
|
||||
@@ -51,25 +50,15 @@ Window {
|
||||
signal accepted()
|
||||
signal rejected()
|
||||
|
||||
onClosing: {
|
||||
inactiveOverlay.visible = false;
|
||||
}
|
||||
|
||||
function open() {
|
||||
inactiveOverlay.visible = true;
|
||||
show();
|
||||
show()
|
||||
}
|
||||
|
||||
// TODO: implement without hardcoding sizes
|
||||
width: 480
|
||||
height: 280
|
||||
|
||||
// background gradient
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: "../images/middlePanelBg.jpg"
|
||||
}
|
||||
|
||||
// Make window draggable
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
@@ -81,136 +70,79 @@ Window {
|
||||
|
||||
ColumnLayout {
|
||||
id: mainLayout
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 20 * scaleRatio
|
||||
anchors.margins: 35 * scaleRatio
|
||||
spacing: 20 * scaleRatio
|
||||
spacing: 10
|
||||
anchors { fill: parent; margins: 35 }
|
||||
|
||||
RowLayout {
|
||||
id: content
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
id: column
|
||||
//anchors {fill: parent; margins: 16 }
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
Flickable {
|
||||
id: flickable
|
||||
anchors.fill: parent
|
||||
|
||||
TextArea.flickable: TextArea {
|
||||
id : dialogContent
|
||||
textFormat: TextEdit.RichText
|
||||
selectByMouse: true
|
||||
selectByKeyboard: true
|
||||
anchors.fill: parent
|
||||
font.family: "Ariel"
|
||||
font.pixelSize: 14 * scaleRatio
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
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, "lime");
|
||||
textArea.append(msg);
|
||||
}
|
||||
function logMessage(msg){
|
||||
msg = msg.trim();
|
||||
var color = "white";
|
||||
if(msg.toLowerCase().indexOf('error') >= 0){
|
||||
color = "red";
|
||||
} else if (msg.toLowerCase().indexOf('warning') >= 0){
|
||||
color = "yellow";
|
||||
}
|
||||
|
||||
// format multi-lines
|
||||
if(msg.split("\n").length >= 2){
|
||||
msg = msg.split("\n").join('<br>');
|
||||
}
|
||||
|
||||
log(msg, color);
|
||||
}
|
||||
function log_color(msg, color){
|
||||
return "<span style='color: " + color + ";' >" + msg + "</span>";
|
||||
}
|
||||
function log(msg, color){
|
||||
var timestamp = Utils.formatDate(new Date(), {
|
||||
weekday: undefined,
|
||||
month: "numeric",
|
||||
timeZoneName: undefined
|
||||
});
|
||||
|
||||
var _timestamp = log_color("[" + timestamp + "]", "#FFFFFF");
|
||||
var _msg = log_color(msg, color);
|
||||
textArea.append(_timestamp + " " + _msg);
|
||||
|
||||
// scroll to bottom
|
||||
//if(flickable.contentHeight > content.height){
|
||||
// flickable.contentY = flickable.contentHeight + 20;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
Label {
|
||||
id: dialogTitle
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: 32
|
||||
font.family: "Arial"
|
||||
color: "#555555"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
TextArea {
|
||||
id : dialogContent
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
font.family: "Arial"
|
||||
textFormat: TextEdit.AutoText
|
||||
readOnly: true
|
||||
font.pixelSize: 12
|
||||
}
|
||||
}
|
||||
|
||||
// Ok/Cancel buttons
|
||||
RowLayout {
|
||||
id: buttons
|
||||
spacing: 60
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
id: okButton
|
||||
width: 120
|
||||
fontSize: 14
|
||||
text: qsTr("Close") + translationManager.emptyString
|
||||
onClicked: {
|
||||
root.close()
|
||||
root.accepted()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.LineEdit {
|
||||
id: sendCommandText
|
||||
Layout.fillWidth: true
|
||||
width: 300
|
||||
placeholderText: qsTr("command + enter (e.g help)") + translationManager.emptyString
|
||||
onAccepted: {
|
||||
if(text.length > 0) {
|
||||
textArea.logCommand(">>> " + text)
|
||||
daemonManager.sendCommand(text, currentWallet.nettype);
|
||||
}
|
||||
if(text.length > 0)
|
||||
daemonManager.sendCommand(text,currentWallet.nettype);
|
||||
text = ""
|
||||
}
|
||||
}
|
||||
|
||||
// Status button
|
||||
// MoneroComponents.StandardButton {
|
||||
// id: sendCommandButton
|
||||
// enabled: sendCommandText.text.length > 0
|
||||
// fontSize: 14
|
||||
// text: qsTr("Send command")
|
||||
// onClicked: {
|
||||
// daemonManager.sendCommand(sendCommandText.text,currentWallet.testnet);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
// window borders
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
width:1
|
||||
color: "#2F2F2F"
|
||||
z: 2
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
width:1
|
||||
color: "#2F2F2F"
|
||||
z: 2
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
height:1
|
||||
color: "#2F2F2F"
|
||||
z: 2
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -38,8 +38,6 @@ TextField {
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
selectByMouse: true
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
selectionColor: MoneroComponents.Style.dimmedFontColor
|
||||
selectedTextColor: MoneroComponents.Style.defaultFontColor
|
||||
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
|
||||
@@ -46,7 +46,6 @@ Item {
|
||||
signal rejected()
|
||||
|
||||
function open() {
|
||||
inactiveOverlay.visible = true
|
||||
leftPanel.enabled = false
|
||||
middlePanel.enabled = false
|
||||
titleBar.enabled = false
|
||||
@@ -57,7 +56,6 @@ Item {
|
||||
}
|
||||
|
||||
function close() {
|
||||
inactiveOverlay.visible = false
|
||||
leftPanel.enabled = true
|
||||
middlePanel.enabled = true
|
||||
titleBar.enabled = true
|
||||
@@ -155,4 +153,12 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: bg
|
||||
z: parent.z + 1
|
||||
anchors.fill: parent
|
||||
color: "black"
|
||||
opacity: 0.8
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,8 +47,6 @@ TextArea {
|
||||
horizontalAlignment: TextInput.AlignLeft
|
||||
selectByMouse: true
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
selectionColor: MoneroComponents.Style.dimmedFontColor
|
||||
selectedTextColor: MoneroComponents.Style.defaultFontColor
|
||||
|
||||
wrapMode: {
|
||||
if(wrapAnywhere){
|
||||
@@ -60,7 +58,7 @@ TextArea {
|
||||
onTextChanged: {
|
||||
if(addressValidation){
|
||||
// js replacement for `RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }`
|
||||
textArea.text = textArea.text.replace(/[^a-z0-9.@]/gi,'');
|
||||
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;
|
||||
|
||||
@@ -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.5
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
@@ -43,7 +43,6 @@ Item {
|
||||
property string fontFamily: ""
|
||||
property alias wrapMode: label.wrapMode
|
||||
property alias horizontalAlignment: label.horizontalAlignment
|
||||
property alias hoveredLink: label.hoveredLink
|
||||
signal linkActivated()
|
||||
height: label.height * scaleRatio
|
||||
width: label.width * scaleRatio
|
||||
|
||||
@@ -43,6 +43,7 @@ Rectangle {
|
||||
width: labelButtonText.width + 14
|
||||
anchors.right: copyButton.left
|
||||
anchors.rightMargin: 6
|
||||
visible: isValidOpenAliasAddress(addressLine.text)
|
||||
|
||||
Text {
|
||||
id: labelButtonText
|
||||
|
||||
@@ -32,7 +32,7 @@ import "../components" as MoneroComponents
|
||||
|
||||
Label {
|
||||
id: item
|
||||
fontSize: 18 * scaleRatio
|
||||
fontSize: 17 * scaleRatio
|
||||
|
||||
Rectangle {
|
||||
anchors.top: item.bottom
|
||||
@@ -43,10 +43,4 @@ Label {
|
||||
color: MoneroComponents.Style.dividerColor
|
||||
opacity: MoneroComponents.Style.dividerOpacity
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ Item {
|
||||
property bool placeholderFontBold: false
|
||||
property int placeholderFontSize: 18 * scaleRatio
|
||||
property string placeholderColor: MoneroComponents.Style.defaultFontColor
|
||||
property real placeholderOpacity: 0.35
|
||||
property real placeholderOpacity: 0.25
|
||||
|
||||
property alias validator: input.validator
|
||||
property alias readOnly : input.readOnly
|
||||
@@ -52,9 +52,9 @@ Item {
|
||||
property bool copyButton: false
|
||||
property string borderColor: {
|
||||
if(input.activeFocus){
|
||||
return MoneroComponents.Style.inputBorderColorActive;
|
||||
return Qt.rgba(255, 255, 255, 0.35);
|
||||
} else {
|
||||
return MoneroComponents.Style.inputBorderColorInActive;
|
||||
return Qt.rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
}
|
||||
property bool borderDisabled: false
|
||||
|
||||
@@ -112,7 +112,7 @@ ColumnLayout {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10 * scaleRatio
|
||||
opacity: 0.35
|
||||
opacity: 0.25
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
font.pixelSize: 18 * scaleRatio
|
||||
@@ -125,11 +125,11 @@ ColumnLayout {
|
||||
border.width: 1
|
||||
border.color: {
|
||||
if(multiLine.error && multiLine.text !== ""){
|
||||
return MoneroComponents.Style.inputBorderColorInvalid;
|
||||
return Qt.rgba(255, 0, 0, 0.45);
|
||||
} else if(multiLine.activeFocus){
|
||||
return MoneroComponents.Style.inputBorderColorActive;
|
||||
return Qt.rgba(255, 255, 255, 0.35);
|
||||
} else {
|
||||
return MoneroComponents.Style.inputBorderColorInActive;
|
||||
return Qt.rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
}
|
||||
radius: 4
|
||||
|
||||
@@ -123,10 +123,8 @@ Rectangle {
|
||||
|
||||
Text {
|
||||
id: symbolText
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 44 * scaleRatio
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.pixelSize: 12 * scaleRatio
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: 11 * scaleRatio
|
||||
font.bold: true
|
||||
color: button.checked || buttonArea.containsMouse ? "#FFFFFF" : dot.color
|
||||
visible: appWindow.ctrlPressed
|
||||
|
||||
@@ -38,7 +38,13 @@ import "../components" as MoneroComponents
|
||||
Item {
|
||||
id: root
|
||||
visible: false
|
||||
z: parent.z + 2
|
||||
Rectangle {
|
||||
id: bg
|
||||
z: parent.z + 1
|
||||
anchors.fill: parent
|
||||
color: "black"
|
||||
opacity: 0.8
|
||||
}
|
||||
|
||||
property alias password: passwordInput1.text
|
||||
|
||||
@@ -48,7 +54,6 @@ Item {
|
||||
signal closeCallback()
|
||||
|
||||
function open() {
|
||||
inactiveOverlay.visible = true
|
||||
leftPanel.enabled = false
|
||||
middlePanel.enabled = false
|
||||
titleBar.enabled = false
|
||||
@@ -60,7 +65,6 @@ Item {
|
||||
}
|
||||
|
||||
function close() {
|
||||
inactiveOverlay.visible = false
|
||||
leftPanel.enabled = true
|
||||
middlePanel.enabled = true
|
||||
titleBar.enabled = true
|
||||
@@ -82,7 +86,7 @@ Item {
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
z: inactiveOverlay.z + 1
|
||||
z: bg.z + 1
|
||||
id: mainLayout
|
||||
spacing: 10
|
||||
anchors { fill: parent; margins: 35 * scaleRatio }
|
||||
|
||||
@@ -38,7 +38,6 @@ import "../components" as MoneroComponents
|
||||
Item {
|
||||
id: root
|
||||
visible: false
|
||||
z: parent.z + 2
|
||||
|
||||
property alias password: passwordInput.text
|
||||
property string walletName
|
||||
@@ -49,7 +48,6 @@ Item {
|
||||
signal closeCallback()
|
||||
|
||||
function open(walletName) {
|
||||
inactiveOverlay.visible = true // draw appwindow inactive
|
||||
root.walletName = walletName ? walletName : ""
|
||||
leftPanel.enabled = false
|
||||
middlePanel.enabled = false
|
||||
@@ -61,7 +59,6 @@ Item {
|
||||
}
|
||||
|
||||
function close() {
|
||||
inactiveOverlay.visible = false
|
||||
leftPanel.enabled = true
|
||||
middlePanel.enabled = true
|
||||
titleBar.enabled = true
|
||||
@@ -70,7 +67,7 @@ Item {
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
z: inactiveOverlay.z + 1
|
||||
z: bg.z + 1
|
||||
id: mainLayout
|
||||
spacing: 10
|
||||
anchors { fill: parent; margins: 35 * scaleRatio }
|
||||
@@ -169,4 +166,11 @@ Item {
|
||||
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: bg
|
||||
|
||||
anchors.fill: parent
|
||||
color: "black"
|
||||
opacity: 0.8
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,11 @@ Item {
|
||||
//radius: 2
|
||||
width: row.x
|
||||
|
||||
color: "#FF6C3C"
|
||||
color: {
|
||||
if(item.fillLevel < 3) return "#FF6C3C"
|
||||
if(item.fillLevel < 13) return "#AAFFBB"
|
||||
return "#36B25C"
|
||||
}
|
||||
|
||||
Timer {
|
||||
interval: 500
|
||||
|
||||
@@ -71,7 +71,11 @@ Item {
|
||||
//radius: 2
|
||||
width: row.x
|
||||
|
||||
color: "#FF6C3C"
|
||||
color: {
|
||||
if(item.fillLevel < 5) return "#FF6C3C"
|
||||
if(item.fillLevel < 13) return "#AAFFBB"
|
||||
return "#36B25C"
|
||||
}
|
||||
|
||||
Timer {
|
||||
interval: 500
|
||||
|
||||
@@ -42,7 +42,7 @@ Rectangle {
|
||||
function updateProgress(currentBlock,targetBlock, blocksToSync, statusTxt){
|
||||
if(targetBlock > 0) {
|
||||
var remaining = (currentBlock < targetBlock) ? targetBlock - currentBlock : 0
|
||||
var progressLevel = (blocksToSync > 0 && blocksToSync != remaining) ? (100*(blocksToSync - remaining)/blocksToSync).toFixed(0) : (100*(currentBlock / targetBlock)).toFixed(0)
|
||||
var progressLevel = (blocksToSync > 0 && blocksToSync != remaining) ? (100*(blocksToSync - remaining)/blocksToSync).toFixed(0) : 100*(currentBlock / targetBlock).toFixed(0)
|
||||
fillLevel = progressLevel
|
||||
if(typeof statusTxt != "undefined" && statusTxt != "") {
|
||||
progressText.text = statusTxt;
|
||||
@@ -100,7 +100,7 @@ Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
height: bar.height
|
||||
property int maxWidth: bar.width * scaleRatio
|
||||
property int maxWidth: bar.width - 4 * scaleRatio
|
||||
width: (maxWidth * fillLevel) / 100
|
||||
radius: 8
|
||||
// could change color based on progressbar status; if(item.fillLevel < 99 )
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
// 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 "../components" as MoneroComponents
|
||||
|
||||
RowLayout {
|
||||
id: radioButton
|
||||
property alias text: label.text
|
||||
property bool checked: false
|
||||
property int fontSize: 14 * scaleRatio
|
||||
property alias fontColor: label.color
|
||||
signal clicked()
|
||||
height: 26 * scaleRatio
|
||||
// legacy properties
|
||||
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
|
||||
radioButton.clicked()
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Rectangle {
|
||||
id: button
|
||||
anchors.left: parent.left
|
||||
y: 0
|
||||
color: "transparent"
|
||||
border.color: borderColor
|
||||
width: radioButton.height
|
||||
height: radioButton.height
|
||||
radius: radioButton.height
|
||||
|
||||
Rectangle {
|
||||
visible: radioButton.checked
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: checkedColor
|
||||
width: 10 * scaleRatio
|
||||
height: 10 * scaleRatio
|
||||
radius: 10
|
||||
opacity: 0.8
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
toggle()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: label
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ GridLayout {
|
||||
property bool placeholderFontBold: false
|
||||
property int placeholderFontSize: 18 * scaleRatio
|
||||
property string placeholderColor: MoneroComponents.Style.defaultFontColor
|
||||
property real placeholderOpacity: 0.35
|
||||
property real placeholderOpacity: 0.25
|
||||
|
||||
property string lineEditBorderColor: Qt.rgba(0, 0, 0, 0.15)
|
||||
property string lineEditBackgroundColor: "white"
|
||||
|
||||
@@ -34,10 +34,8 @@ import "../components" as MoneroComponents
|
||||
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: {
|
||||
@@ -47,22 +45,10 @@ Item {
|
||||
signal clicked()
|
||||
|
||||
// Dynamic height/width
|
||||
Layout.minimumWidth: {
|
||||
var _padding = 22;
|
||||
if(button.rightIcon !== ""){
|
||||
_padding += 60;
|
||||
}
|
||||
|
||||
var _width = label.contentWidth + _padding;
|
||||
if(_width <= 50) {
|
||||
return 60;
|
||||
}
|
||||
|
||||
return _width;
|
||||
}
|
||||
|
||||
Layout.minimumWidth: (label.contentWidth > 50)? label.contentWidth + 22 : 60
|
||||
height: small ? 30 * scaleRatio : 36 * scaleRatio
|
||||
|
||||
|
||||
function doClick() {
|
||||
// Android workaround
|
||||
releaseFocus();
|
||||
@@ -101,8 +87,7 @@ Item {
|
||||
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
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.family: MoneroComponents.Style.fontBold.name
|
||||
font.bold: true
|
||||
font.pixelSize: buttonArea.pressed ? button.fontSize - 1 : button.fontSize
|
||||
@@ -116,21 +101,6 @@ Item {
|
||||
source: parent.icon
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
@@ -43,7 +43,6 @@ Item {
|
||||
property int dropdownHeight: 42
|
||||
property int fontHeaderSize: 16 * scaleRatio
|
||||
property int fontItemSize: 14 * scaleRatio
|
||||
property string colorBorder: MoneroComponents.Style.inputBorderColorInActive
|
||||
property string colorHeaderBackground: "transparent"
|
||||
property bool headerBorder: true
|
||||
property bool headerFontBold: false
|
||||
@@ -81,7 +80,7 @@ Item {
|
||||
Rectangle {
|
||||
color: dropdown.colorHeaderBackground
|
||||
border.width: dropdown.headerBorder ? 1 : 0
|
||||
border.color: dropdown.colorBorder
|
||||
border.color: Qt.rgba(1, 1, 1, 0.25)
|
||||
radius: 4
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
@@ -17,9 +17,6 @@ QtObject {
|
||||
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 buttonBackgroundColor: "#FA6800"
|
||||
property string buttonBackgroundColorHover: "#E65E00"
|
||||
@@ -28,5 +25,5 @@ QtObject {
|
||||
property string buttonTextColor: "white"
|
||||
property string buttonTextColorDisabled: "black"
|
||||
property string dividerColor: "white"
|
||||
property real dividerOpacity: 0.20
|
||||
property real dividerOpacity: 0.25
|
||||
}
|
||||
|
||||
160
components/SubaddressTable.qml
Normal file
@@ -0,0 +1,160 @@
|
||||
// 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 "../components" as MoneroComponents
|
||||
|
||||
ListView {
|
||||
id: listView
|
||||
clip: true
|
||||
boundsBehavior: ListView.StopAtBounds
|
||||
highlightMoveDuration: 0
|
||||
highlightFollowsCurrentItem: true
|
||||
anchors.topMargin: 0
|
||||
spacing: 0
|
||||
|
||||
delegate: Rectangle {
|
||||
id: delegate
|
||||
height: 80
|
||||
color: 'transparent';
|
||||
anchors.topMargin: 0
|
||||
width: listView.width
|
||||
clip: true
|
||||
|
||||
MoneroComponents.LineEditMulti {
|
||||
id: addressLine
|
||||
|
||||
fontSize: 14
|
||||
readOnly: true
|
||||
width: parent.width
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 10
|
||||
anchors.topMargin: 12
|
||||
anchors.rightMargin: 54
|
||||
anchors.bottomMargin: 0
|
||||
text: address
|
||||
|
||||
showingHeader: false
|
||||
showBorder: false
|
||||
addressValidation: false
|
||||
}
|
||||
|
||||
MoneroComponents.IconButton {
|
||||
id: clipboardButton
|
||||
imageSource: "../images/copyToClipboard.png"
|
||||
|
||||
onClicked: {
|
||||
console.log(addressLine.text + " copied to clipboard");
|
||||
clipboard.setText(addressLine.text);
|
||||
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3);
|
||||
}
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Text {
|
||||
id: indexText
|
||||
anchors.top: addressLine.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 20
|
||||
font.family: "Arial"
|
||||
font.bold: true
|
||||
font.pixelSize: 12
|
||||
color: "#444444"
|
||||
text: "#" + index
|
||||
}
|
||||
|
||||
Text {
|
||||
id: labelText
|
||||
anchors.top: addressLine.bottom
|
||||
anchors.left: indexText.right
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 10
|
||||
font.family: "Arial"
|
||||
font.bold: true
|
||||
font.pixelSize: 12
|
||||
color: MoneroComponents.Style.greyFontColor
|
||||
text: label
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
z: 5
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: clipboardButton.width
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
listView.currentIndex = index;
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: 1
|
||||
color: MoneroComponents.Style.grey
|
||||
z: 6
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: 1
|
||||
color: MoneroComponents.Style.grey
|
||||
z: 6
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
anchors.bottom: parent.bottom
|
||||
color: MoneroComponents.Style.grey
|
||||
height: 1
|
||||
z: 6
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: 3
|
||||
color: 'white'
|
||||
visible: listView.currentIndex == index
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import "../components" as MoneroComponents
|
||||
TextEdit {
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
selectionColor: MoneroComponents.Style.dimmedFontColor
|
||||
wrapMode: Text.Wrap
|
||||
readOnly: true
|
||||
selectByMouse: true
|
||||
|
||||
@@ -26,62 +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.5
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Window 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
Rectangle {
|
||||
id: titleBar
|
||||
|
||||
height: {
|
||||
if(!customDecorations || isMobile){
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(small) return 38 * scaleRatio;
|
||||
else return 50 * scaleRatio;
|
||||
}
|
||||
y: -height
|
||||
z: 1
|
||||
|
||||
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
|
||||
property bool customDecorations: true
|
||||
signal goToBasicVersion(bool yes)
|
||||
height: customDecorations && !isMobile ? 50 : 0
|
||||
y: -height
|
||||
property string title
|
||||
property alias maximizeButtonVisible: maximizeButton.visible
|
||||
z: 1
|
||||
|
||||
Item {
|
||||
// Background gradient
|
||||
id: test
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
z: parent.z + 1
|
||||
height: 50
|
||||
z: 1
|
||||
|
||||
// use jpg for gradiency
|
||||
Image {
|
||||
anchors.fill: titleBar
|
||||
height: titleBar.height
|
||||
width: titleBar.width
|
||||
anchors.fill: parent
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
source: "../images/titlebarGradient.jpg"
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Item{
|
||||
id: titlebarlogo
|
||||
width: 125
|
||||
height: parent.height
|
||||
height: 50
|
||||
anchors.centerIn: parent
|
||||
visible: customDecorations && showMoneroLogo
|
||||
z: parent.z + 1
|
||||
visible: customDecorations
|
||||
z: 1
|
||||
|
||||
Image {
|
||||
anchors.left: parent.left
|
||||
@@ -93,15 +77,6 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
@@ -110,10 +85,10 @@ Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
color: "transparent"
|
||||
height: titleBar.height
|
||||
height: 50 * scaleRatio
|
||||
width: height
|
||||
visible: isMobile
|
||||
z: parent.z + 2
|
||||
z: 2
|
||||
|
||||
Image {
|
||||
width: 14
|
||||
@@ -143,11 +118,36 @@ Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
visible: parent.customDecorations
|
||||
z: parent.z + 2
|
||||
z: 2
|
||||
|
||||
Rectangle {
|
||||
id: whatIsAreaButton
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: 42
|
||||
color: containsMouse ? "#6B0072" : "#00000000"
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
width: 9
|
||||
height: 16
|
||||
source: "../images/question.png"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: whatIsArea
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onEntered: whatIsAreaButton.color = "#262626";
|
||||
onExited: whatIsAreaButton.color = "transparent";
|
||||
onClicked: {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: minimizeButton
|
||||
visible: showMinimizeButton
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: 42
|
||||
@@ -165,13 +165,14 @@ Rectangle {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onEntered: minimizeButton.color = "#262626";
|
||||
onExited: minimizeButton.color = "transparent";
|
||||
onClicked: minimizeClicked();
|
||||
onClicked: {
|
||||
appWindow.visibility = Window.Minimized
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: maximizeButton
|
||||
visible: showMaximizeButton
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: 42
|
||||
@@ -192,13 +193,15 @@ Rectangle {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onEntered: maximizeButton.color = "#262626";
|
||||
onExited: maximizeButton.color = "transparent";
|
||||
onClicked: maximizeClicked();
|
||||
onClicked: {
|
||||
appWindow.visibility = appWindow.visibility !== Window.FullScreen ? Window.FullScreen :
|
||||
Window.Windowed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: closeButton
|
||||
visible: showCloseButton
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
width: 42
|
||||
@@ -213,7 +216,7 @@ Rectangle {
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: closeClicked();
|
||||
onClicked: appWindow.close();
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onEntered: closeButton.color = "#262626";
|
||||
@@ -222,23 +225,4 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// window borders
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
height: 1
|
||||
color: "#2F2F2F"
|
||||
z: parent.z + 1
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
visible: titleBar.small
|
||||
height: 1
|
||||
color: "#2F2F2F"
|
||||
z: parent.z + 1
|
||||
}
|
||||
}
|
||||
|
||||
19
filter.cpp
@@ -34,20 +34,13 @@ filter::filter(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
m_tabPressed = false;
|
||||
m_backtabPressed = false;
|
||||
}
|
||||
|
||||
bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
||||
switch(ev->type()) {
|
||||
case QEvent::KeyPress: {
|
||||
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
|
||||
if(ke->key() == Qt::Key_Backtab) {
|
||||
if(m_backtabPressed)
|
||||
break;
|
||||
else m_backtabPressed = true;
|
||||
}
|
||||
|
||||
if(ke->key() == Qt::Key_Tab) {
|
||||
if(ke->key() == Qt::Key_Tab || ke->key() == Qt::Key_Backtab) {
|
||||
if(m_tabPressed)
|
||||
break;
|
||||
else m_tabPressed = true;
|
||||
@@ -65,7 +58,7 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
||||
sks = ks.toString();
|
||||
}
|
||||
#ifndef Q_OS_MAC
|
||||
if(sks.contains("Alt+Tab") || sks.contains("Alt+Backtab"))
|
||||
if(sks.contains("Alt+Tab") || sks.contains("Alt+Shift+Backtab"))
|
||||
break;
|
||||
#else
|
||||
sks.replace("Meta", "Ctrl");
|
||||
@@ -74,11 +67,7 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
||||
} break;
|
||||
case QEvent::KeyRelease: {
|
||||
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
|
||||
|
||||
if(ke->key() == Qt::Key_Backtab)
|
||||
m_backtabPressed = false;
|
||||
|
||||
if(ke->key() == Qt::Key_Tab)
|
||||
if(ke->key() == Qt::Key_Tab || ke->key() == Qt::Key_Backtab)
|
||||
m_tabPressed = false;
|
||||
|
||||
QString sks;
|
||||
@@ -99,7 +88,7 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
||||
sks = ks.toString();
|
||||
}
|
||||
#ifndef Q_OS_MAC
|
||||
if(sks.contains("Alt+Tab") || sks.contains("Alt+Backtab"))
|
||||
if(sks.contains("Alt+Tab") || sks.contains("Alt+Shift+Backtab"))
|
||||
break;
|
||||
#else
|
||||
sks.replace("Meta", "Ctrl");
|
||||
|
||||
2
filter.h
@@ -36,7 +36,7 @@ class filter : public QObject
|
||||
Q_OBJECT
|
||||
private:
|
||||
bool m_tabPressed;
|
||||
bool m_backtabPressed;
|
||||
|
||||
public:
|
||||
explicit filter(QObject *parent = 0);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ if [ ! -d $MONERO_DIR/src ]; then
|
||||
fi
|
||||
git submodule update --remote
|
||||
git -C $MONERO_DIR fetch
|
||||
git -C $MONERO_DIR checkout v0.12.2.0
|
||||
git -C $MONERO_DIR checkout v0.12.0.0
|
||||
|
||||
# get monero core tag
|
||||
get_tag
|
||||
|
||||
|
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 191 B |
|
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 288 B |
|
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 287 B |
|
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 288 B |
|
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 231 B |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 30 KiB |
BIN
images/checkedBlackIcon.png
Normal file → Executable file
|
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 15 KiB |
BIN
images/checkedIcon-black.png
Normal file → Executable file
|
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 320 B |
BIN
images/close.png
|
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 280 B |
|
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 249 B |
|
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 454 B After Width: | Height: | Size: 306 B |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 268 B |
|
Before Width: | Height: | Size: 456 B After Width: | Height: | Size: 334 B |
|
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 364 B After Width: | Height: | Size: 284 B |
|
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 532 B After Width: | Height: | Size: 384 B |
|
Before Width: | Height: | Size: 454 B After Width: | Height: | Size: 306 B |
|
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 355 B |
|
Before Width: | Height: | Size: 563 B After Width: | Height: | Size: 477 B |
|
Before Width: | Height: | Size: 707 B After Width: | Height: | Size: 514 B |
|
Before Width: | Height: | Size: 578 B |
|
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 238 B |
|
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 260 B |
|
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 185 B |
|
Before Width: | Height: | Size: 401 B After Width: | Height: | Size: 238 B |
|
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 234 B |
|
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 312 B |
|
Before Width: | Height: | Size: 456 B After Width: | Height: | Size: 319 B |
BIN
images/historyBorderRadius.png
Normal file → Executable file
|
Before Width: | Height: | Size: 378 B After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 201 B |
BIN
images/leftPanelBg.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 501 B After Width: | Height: | Size: 362 B |
|
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 552 B |
|
Before Width: | Height: | Size: 493 B After Width: | Height: | Size: 337 B |
|
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 560 B |
|
Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 208 B |
BIN
images/menu.png
|
Before Width: | Height: | Size: 859 B After Width: | Height: | Size: 1.6 KiB |
BIN
images/menuArrow.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 856 B After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 476 B After Width: | Height: | Size: 340 B |
BIN
images/middlePanelBg.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 366 B After Width: | Height: | Size: 198 B |
|
Before Width: | Height: | Size: 822 B After Width: | Height: | Size: 792 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 596 B After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 444 B After Width: | Height: | Size: 304 B |
|
Before Width: | Height: | Size: 466 B After Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 296 B |