1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-05 15:34:57 -04:00

Highlight demod frame when the marker is highlighted on the spectrum

This commit is contained in:
f4exb
2017-11-14 22:58:35 +01:00
parent 84113775aa
commit 3db655fe61
24 changed files with 90 additions and 2 deletions
+12 -2
View File
@@ -5,7 +5,8 @@
#include "ui_glspectrumgui.h"
RollupWidget::RollupWidget(QWidget* parent) :
QWidget(parent)
QWidget(parent),
m_highlighted(false)
{
setMinimumSize(250, 150);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
@@ -99,6 +100,15 @@ void RollupWidget::setTitleColor(const QColor& c)
update();
}
void RollupWidget::setHighlighted(bool highlighted)
{
if (m_highlighted != highlighted)
{
m_highlighted = highlighted;
update();
}
}
int RollupWidget::arrangeRollups()
{
QFontMetrics fm(font());
@@ -153,7 +163,7 @@ void RollupWidget::paintEvent(QPaintEvent*)
p.drawRect(width() - 5, height() - 5, 5, 5);
// Rahmen
p.setPen(frame);
p.setPen(m_highlighted ? Qt::white : frame);
p.setBrush(palette().window());
QRectF r(rect());
r.adjust(0.5, 0.5, -0.5, -0.5);