Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ RES_ICONS = \
qt/res/icons/about.png \
qt/res/icons/about_qt.png \
qt/res/icons/asset_administrator.png \
qt/res/icons/asset_administrator_dark.png \
qt/res/icons/asset_create.png \
qt/res/icons/asset_create_selected.png \
qt/res/icons/asset_manage.png \
Expand Down
14 changes: 12 additions & 2 deletions src/qt/assettablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "amount.h"
#include "assets/assets.h"
#include "validation.h"
#include "platformstyle.h"

#include <QDebug>
#include <QStringList>
Expand Down Expand Up @@ -153,8 +154,17 @@ QVariant AssetTableModel::data(const QModelIndex &index, int role) const
}
case Qt::DecorationRole:
{
QPixmap pixmap = QPixmap::fromImage(QImage(":/icons/asset_administrator"));
return rec->fIsAdministrator ? pixmap : QVariant();
QPixmap pixmap;

if (!rec->fIsAdministrator)
QVariant();

if (darkModeEnabled)
pixmap = QPixmap::fromImage(QImage(":/icons/asset_administrator_dark"));
else
pixmap = QPixmap::fromImage(QImage(":/icons/asset_administrator"));

return pixmap;
}
case Qt::ToolTipRole:
return formatTooltip(rec);
Expand Down
50 changes: 2 additions & 48 deletions src/qt/forms/overviewpage.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout_7">
<property name="spacing">
<number>0</number>
Expand All @@ -34,42 +34,6 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>40</number>
</property>
<property name="topMargin">
<number>40</number>
</property>
<item>
<widget class="QPushButton" name="testTotalRaven">
<property name="text">
<string>PushButton</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0">
<property name="spacing">
Expand Down Expand Up @@ -180,16 +144,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="rvnBalanceBack">
<property name="text">
<string/>
</property>
<property name="arrowType">
<enum>Qt::LeftArrow</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
Expand Down Expand Up @@ -827,7 +781,7 @@
</item>
</layout>
</item>
<item row="0" column="2">
<item row="0" column="3">
<widget class="QLabel" name="labelAlerts">
<property name="visible">
<bool>true</bool>
Expand Down
26 changes: 5 additions & 21 deletions src/qt/overviewpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ class TxViewDelegate : public QAbstractItemDelegate
int halfheight = (mainRect.height() - 2*ypad)/2;
QRect amountRect(mainRect.left() + xspace, mainRect.top()+ypad, mainRect.width() - xspace, halfheight);
QRect addressRect(mainRect.left() + xspace, mainRect.top()+ypad+halfheight, mainRect.width() - xspace, halfheight);
icon = platformStyle->SingleColorIcon(icon);

if (darkModeEnabled)
icon = platformStyle->SingleColorIcon(icon, COLOR_TOOLBAR_NOT_SELECTED_TEXT);
else
icon = platformStyle->SingleColorIcon(icon, COLOR_LABELS);
icon.paint(painter, decorationRect);

QDateTime date = index.data(TransactionTableModel::DateRole).toDateTime();
Expand Down Expand Up @@ -316,8 +320,6 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent)

connect(ui->listTransactions, SIGNAL(clicked(QModelIndex)), this, SLOT(handleTransactionClicked(QModelIndex)));
connect(ui->listAssets, SIGNAL(clicked(QModelIndex)), this, SLOT(handleAssetClicked(QModelIndex)));
connect(ui->testTotalRaven, SIGNAL(clicked()), this, SLOT(totalRVNClicked()));
connect(ui->rvnBalanceBack, SIGNAL(clicked()), this, SLOT(totalBackRVNClicked()));

// start with displaying the "out of sync" warnings
showOutOfSyncWarning(true);
Expand Down Expand Up @@ -367,9 +369,6 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent)
ui->labelTotal->setFont(GUIUtil::getTopLabelFontBolded());
ui->labelWatchTotal->setFont(GUIUtil::getTopLabelFontBolded());

/** Hide the asset total frame */
ui->frame->hide();

/** Create the search bar for assets */
ui->assetSearch->setAttribute(Qt::WA_MacShowFocusRect, 0);
ui->assetSearch->setStyleSheet(QString(".QLineEdit {border: 1px solid %1; border-radius: 5px;}").arg(COLOR_LABELS.name()));
Expand Down Expand Up @@ -497,9 +496,6 @@ void OverviewPage::setBalance(const CAmount& balance, const CAmount& unconfirmed
ui->labelWatchImmature->setText(RavenUnits::formatWithUnit(unit, watchImmatureBalance, false, RavenUnits::separatorAlways));
ui->labelWatchTotal->setText(RavenUnits::formatWithUnit(unit, watchOnlyBalance + watchUnconfBalance + watchImmatureBalance, false, RavenUnits::separatorAlways));

ui->testTotalRaven->setText(RavenUnits::formatWithUnit(unit, balance + unconfirmedBalance + immatureBalance, false, RavenUnits::separatorAlways));
ui->testTotalRaven->setFont(GUIUtil::getTopLabelFont(QFont::Weight::Bold, 26));

// only show immature (newly mined) balance if it's non-zero, so as not to complicate things
// for the non-mining users
bool showImmature = immatureBalance != 0;
Expand Down Expand Up @@ -635,15 +631,3 @@ void OverviewPage::assetSearchChanged()
return;
assetFilter->setAssetNamePrefix(ui->assetSearch->text());
}

void OverviewPage::totalRVNClicked()
{
ui->frame->show();
ui->testTotalRaven->hide();
}

void OverviewPage::totalBackRVNClicked()
{
ui->frame->hide();
ui->testTotalRaven->show();
}
2 changes: 0 additions & 2 deletions src/qt/overviewpage.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ private Q_SLOTS:
void updateWatchOnlyLabels(bool showWatchOnly);
void handleOutOfSyncWarningClicks();
void assetSearchChanged();
void totalRVNClicked();
void totalBackRVNClicked();
};

#endif // RAVEN_QT_OVERVIEWPAGE_H
7 changes: 7 additions & 0 deletions src/qt/platformstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ QIcon PlatformStyle::SingleColorIcon(const QIcon& icon) const
return ColorizeIcon(icon, SingleColor());
}

QIcon PlatformStyle::SingleColorIcon(const QIcon& icon, const QColor& color) const
{
if (!colorizeIcons)
return icon;
return ColorizeIcon(icon, color);
}

QIcon PlatformStyle::OrangeColorIcon(const QString& filename) const
{
if (!colorizeIcons)
Expand Down
3 changes: 3 additions & 0 deletions src/qt/platformstyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ class PlatformStyle
/** Colorize an icon (given object) with the icon color */
QIcon SingleColorIcon(const QIcon& icon) const;

/** Colorize an icon (given object) with the (given color) */
QIcon SingleColorIcon(const QIcon& icon, const QColor& color) const;

/** Set icon with two states on and off */
QIcon SingleColorIconOnOff(const QString& filenameOn, const QString& filenameOff) const;

Expand Down
1 change: 1 addition & 0 deletions src/qt/raven.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<file alias="network_disabled">res/icons/network_disabled.png</file>
<file alias="refresh">res/icons/refresh.png</file>
<file alias="asset_administrator">res/icons/asset_administrator.png</file>
<file alias="asset_administrator_dark">res/icons/asset_administrator_dark.png</file>
<file alias="asset_create">res/icons/asset_create.png</file>
<file alias="asset_create_selected">res/icons/asset_create_selected.png</file>
<file alias="asset_manage">res/icons/asset_manage.png</file>
Expand Down
5 changes: 2 additions & 3 deletions src/qt/receivecoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ void ReceiveCoinsDialog::setModel(WalletModel *_model)
SLOT(recentRequestsView_selectionChanged(QItemSelection, QItemSelection)));
// Last 2 columns are set by the columnResizingFixer, when the table geometry is ready.
columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH, this);

tableView->show();
}
}

Expand Down Expand Up @@ -175,9 +177,6 @@ void ReceiveCoinsDialog::setupHistoryFrame(const PlatformStyle *platformStyle)

ui->label_6->setStyleSheet(STRING_LABEL_COLOR);

ui->recentRequestsView->setGraphicsEffect(GUIUtil::getShadowEffect());
ui->recentRequestsView->setStyleSheet(".QTableView {border: none;}");

contextMenu->setFont(GUIUtil::getSubLabelFont());

}
Expand Down
Binary file added src/qt/res/icons/asset_administrator_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.