Browse Source

More tweaks for market tab

dev
fekt 2 weeks ago
parent
commit
eb4d23bd99
  1. 16
      src/mainwindow.cpp
  2. 25
      src/mainwindow.ui

16
src/mainwindow.cpp

@ -2245,6 +2245,22 @@ void MainWindow::setupMarketTab() {
auto s = Settings::getInstance();
auto ticker = s->get_currency_name();
// Hide note to allow fetch prices if already enabled and hide empty chart/data if not enabled
if (s->getAllowFetchPrices() == true) {
ui->marketNote->setHidden(true);
} else {
ui->marketChart->setHidden(true);
ui->volume->setHidden(true);
ui->volumeLabel->setHidden(true);
ui->volumeBTC->setHidden(true);
ui->volumeLocal->setHidden(true);
ui->marketcap->setHidden(true);
ui->marketcapLabel->setHidden(true);
ui->marketcapBTC->setHidden(true);
ui->marketcapLocal->setHidden(true);
ui->chartType->setHidden(true);
}
ui->volume->setText(QString::number((double) s->get_volume("HUSH") ,'f',8) + " HUSH");
ui->volumeLocal->setText(QString::number((double) s->get_volume(ticker) ,'f',8) + " " + ticker);
ui->volumeBTC->setText(QString::number((double) s->get_volume("BTC") ,'f',8) + " BTC");

25
src/mainwindow.ui

@ -1061,7 +1061,7 @@
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_31">
<widget class="QLabel" name="marketcapLabel">
<property name="text">
<string>Market Cap</string>
</property>
@ -1191,10 +1191,29 @@
</property>
</widget>
</item>
<item row="0" column="0">
<item row="0" column="1" colspan="2">
<widget class="QLabel" name="marketNote">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Allow &quot;Connect to the internet to fetch prices&quot; under Edit &gt; Settings &gt; Options to see market data</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Note: &lt;span style=&quot; font-weight:400;&quot;&gt;Please allow &amp;quot;Connect to the internet to fetch prices&amp;quot; under Edit &amp;gt; Settings &amp;gt; Options &lt;/span&gt;(Ctrl+P)&lt;span style=&quot; font-weight:400;&quot;&gt; to see market data and restart the app.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:400;&quot;&gt;Fetching prices and market data is disabled by default for &lt;/span&gt;Extreme Privacy!&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<property name="margin">
<number>30</number>
</property>
<property name="openExternalLinks">
<bool>false</bool>

Loading…
Cancel
Save