Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
RomyToklio committed Oct 18, 2018
2 parents 96d43d0 + 7615b86 commit 8dc68b7
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 30 deletions.
16 changes: 7 additions & 9 deletions LeftPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Rectangle {
visible: true
z: 2
id: column1
height: 200
height: 210
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
Expand All @@ -111,10 +111,10 @@ Rectangle {
anchors.leftMargin: 20
anchors.verticalCenter: parent.verticalCenter
height: 490 * scaleRatio
width: 259 * scaleRatio
width: 260 * scaleRatio

Image {
width: 259; height: 170
width: 260; height: 170
fillMode: Image.PreserveAspectFit
source: "images/card-background.png"
}
Expand Down Expand Up @@ -247,19 +247,17 @@ 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: (progressBar.visible)? menuColumn.height + separator.height +
networkStatus.height + progressBar.height + daemonProgressBar.height :
menuColumn.height + separator.height + networkStatus.height
anchors.fill: parent
contentHeight: menuColumn.height
anchors.top: parent.top
anchors.bottom: networkStatus.top
width: parent.width
clip: true


Column {

id: menuColumn
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ 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`
`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`

- 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`
`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`

2. Install Qt:

Expand Down Expand Up @@ -205,6 +205,12 @@ The Monero GUI on Windows is 64 bits only; 32-bit Windows GUI builds are not off

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.

**Note:** There is a known issue that GUI won't lauch properly when building tag v0.13.0.3 with Qt 5.11.2.

If your encounter issue with that, please remove current Qt by: `pacman -R mingw-w64-x86_64-qt5`

And install 5.11.1 instead by: `pacman -U http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-qt5-5.11.1-3-any.pkg.tar.xz`

5. Install git

```
Expand Down
2 changes: 1 addition & 1 deletion get_libwallet_api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 release-v0.13
git -C $MONERO_DIR checkout master

# get Pyrex core tag
get_tag
Expand Down
18 changes: 7 additions & 11 deletions pages/Receive.qml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ Rectangle {
}

function update() {
const max_tracking = 3;

if (!appWindow.currentWallet || !trackingEnabled.checked) {
trackingLineText.text = "";
trackingModel.clear();
Expand All @@ -80,10 +82,10 @@ Rectangle {
var count = model.rowCount()
var totalAmount = 0
var nTransactions = 0
var blockchainHeight = 0
var blockchainHeight = null
var txs = []

for (var i = 0; i < count; ++i) {
for (var i = 0; i < count && txs.length < max_tracking; ++i) {
var idx = model.index(i, 0)
var isout = model.data(idx, TransactionHistoryModel.TransactionIsOutRole);
var subaddrAccount = model.data(idx, TransactionHistoryModel.TransactionSubaddrAccountRole);
Expand All @@ -103,8 +105,8 @@ Rectangle {
if (blockHeight == 0) {
in_txpool = true;
} else {
if (blockchainHeight == 0)
blockchainHeight = walletManager.blockchainHeight()
if (blockchainHeight == null)
blockchainHeight = appWindow.currentWallet.blockChainHeight()
confirmations = blockchainHeight - blockHeight - 1
displayAmount = model.data(idx, TransactionHistoryModel.TransactionDisplayAmountRole);
}
Expand All @@ -130,7 +132,6 @@ Rectangle {
trackingLineText.text = qsTr("%1 transactions found").arg(nTransactions) + ":" + translationManager.emptyString
}

var max_tracking = 3;
toReceiveSatisfiedLine.text = "";
var expectedAmount = walletManager.amountFromString(amountToReceiveLine.text)
if (expectedAmount && expectedAmount != amount) {
Expand All @@ -143,11 +144,6 @@ Rectangle {
}

trackingModel.clear();

if (txs.length > 3) {
txs.length = 3;
}

txs.forEach(function(tx){
trackingModel.append({
"amount": tx.amount,
Expand Down Expand Up @@ -473,7 +469,7 @@ Rectangle {
Image {
id: qrCode
anchors.fill: parent
anchors.margins: 6
anchors.margins: 1

smooth: false
fillMode: Image.PreserveAspectFit
Expand Down
6 changes: 4 additions & 2 deletions pyrexcoin-wallet-gui.pro
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ QT += qml quick widgets
WALLET_ROOT=$$PWD/Pyrex

CONFIG += c++11 link_pkgconfig
packagesExist(libpcsclite) {
PKGCONFIG += libpcsclite
packagesExist(hidapi-libusb) {
PKGCONFIG += hidapi-libusb
}
!win32 {
QMAKE_CXXFLAGS += -fPIC -fstack-protector -fstack-protector-strong
Expand Down Expand Up @@ -298,6 +298,7 @@ linux {
-lssl \
-llmdb \
-lsodium \
-lhidapi-libusb \
-lcrypto

if(!android) {
Expand Down Expand Up @@ -328,6 +329,7 @@ macx {
-L/usr/local/opt/openssl/lib \
-L/usr/local/opt/boost/lib \
-lboost_serialization \
-lhidapi \
-lboost_thread-mt \
-lboost_system \
-lboost_date_time \
Expand Down
19 changes: 14 additions & 5 deletions src/libwalletqt/QRCodeImageProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ QImage QRCodeImageProvider::genQrImage(const QString &id, QSize *size)
using namespace qrcodegen;

QrCode qrcode = QrCode::encodeText(id.toStdString().c_str(), QrCode::Ecc::MEDIUM);
QImage img = QImage(qrcode.size, qrcode.size, QImage::Format_Mono);
for (int y = 0; y < qrcode.size; ++y)
for (int x = 0; x < qrcode.size; ++x)
img.setPixel(x, y, !qrcode.getModule(x, y)); // 1 is black, not "255/white"
unsigned int black = 0;
unsigned int white = 1;
unsigned int borderSize = 4;
unsigned int imageSize = qrcode.size + (2 * borderSize);
QImage img = QImage(imageSize, imageSize, QImage::Format_Mono);

for (unsigned int y = 0; y < imageSize; ++y)
for (unsigned int x = 0; x < imageSize; ++x)
if ((x < borderSize) || (x >= imageSize - borderSize) || (y < borderSize) || (y >= imageSize - borderSize))
img.setPixel(x, y, white);
else
img.setPixel(x, y, qrcode.getModule(x - borderSize, y - borderSize) ? black : white);
if (size)
*size = QSize(qrcode.size, qrcode.size);
*size = QSize(imageSize, imageSize);

return img;
}

Expand Down

0 comments on commit 8dc68b7

Please sign in to comment.