From 7b98a0c585f8f1a36e6d17275f343957e8149093 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sat, 8 May 2021 23:51:16 +0100 Subject: [PATCH] Fix rx/tx frequency overlay punctuation and make label background transparent --- map65/widegraph.cpp | 10 ++--- map65/widegraph.ui | 103 ++++++++++++++++++++++++-------------------- 2 files changed, 61 insertions(+), 52 deletions(-) diff --git a/map65/widegraph.cpp b/map65/widegraph.cpp index d918ffb51..ae1e3db08 100644 --- a/map65/widegraph.cpp +++ b/map65/widegraph.cpp @@ -15,8 +15,6 @@ WideGraph::WideGraph(QWidget *parent) : this->setMaximumHeight(880); ui->widePlot->setMaximumHeight(800); m_bIQxt=false; - ui->labFreq->setStyleSheet( \ - "QLabel { background-color : black; color : yellow; }"); connect(ui->widePlot, SIGNAL(freezeDecode1(int)),this, SLOT(wideFreezeDecode(int))); @@ -60,7 +58,7 @@ void WideGraph::resizeEvent(QResizeEvent* ) //resizeEvent() if(!size().isValid()) return; int w = size().width(); int h = size().height(); - ui->labFreq->setGeometry(QRect(w-160,h-100,131,41)); + ui->labFreq->setGeometry(QRect(w-256,h-100,227,41)); } void WideGraph::saveSettings() @@ -372,8 +370,10 @@ void WideGraph::tx570() void WideGraph::updateFreqLabel() { - auto rxFreq = QString {"%1"}.arg (ui->widePlot->rxFreq (), 10, 'f', 6).insert (7, '.'); - auto txFreq = QString {"%1"}.arg (ui->widePlot->txFreq (), 10, 'f', 6).insert (7, '.'); + auto rxFreq = QString {"%1"}.arg (ui->widePlot->rxFreq (), 10, 'f', 6); + auto txFreq = QString {"%1"}.arg (ui->widePlot->txFreq (), 10, 'f', 6); + rxFreq.insert (rxFreq.size () - 3, '.'); + txFreq.insert (txFreq.size () - 3, '.'); ui->labFreq->setText (QString {"Rx: %1\nTx: %2"}.arg (rxFreq, txFreq)); } diff --git a/map65/widegraph.ui b/map65/widegraph.ui index bde24dfac..38f90d47d 100644 --- a/map65/widegraph.ui +++ b/map65/widegraph.ui @@ -15,54 +15,63 @@ - - - - - true - - - - 0 - 0 - - - - - 400 - 200 - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - 1 - - - - - 1015 - 230 - 131 - 41 - - - - - 12 - - - - Rx: 144.118.200 + + + true + + + + 0 + 0 + + + + + 400 + 200 + + + + QFrame::StyledPanel + + + QFrame::Sunken + + + 1 + + + + + 940 + 230 + 211 + 41 + + + + + 12 + + + + QLabel { + background-color: rgba(0, 0, 0, 0); + color: yellow; +} + + + Rx: 144.118.200 Tx: 144.127.317 - - - - + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + +