1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

Level meters: fixed text position and make sure appropriate font is used

This commit is contained in:
f4exb 2018-05-07 03:38:57 +02:00
parent 4e389d77e1
commit b32330780b
7 changed files with 25 additions and 90 deletions

View File

@ -56,16 +56,7 @@
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>2</number>
</property>
<item>
@ -361,6 +352,7 @@
<property name="font">
<font>
<family>Liberation Mono</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="toolTip">

View File

@ -50,16 +50,7 @@
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>2</number>
</property>
<item>
@ -506,6 +497,7 @@
<property name="font">
<font>
<family>Liberation Mono</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="toolTip">

View File

@ -56,16 +56,7 @@
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>2</number>
</property>
<item>
@ -401,6 +392,7 @@
<property name="font">
<font>
<family>Liberation Mono</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="toolTip">

View File

@ -53,16 +53,7 @@
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>2</number>
</property>
<item>
@ -707,6 +698,7 @@
<property name="font">
<font>
<family>Liberation Mono</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="toolTip">
@ -1253,16 +1245,7 @@
<property name="spacing">
<number>2</number>
</property>
<property name="leftMargin">
<number>3</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>3</number>
</property>
<item>

View File

@ -56,16 +56,7 @@
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>2</number>
</property>
<item>
@ -401,6 +392,7 @@
<property name="font">
<font>
<family>Liberation Mono</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="toolTip">

View File

@ -31,12 +31,12 @@
<property name="windowTitle">
<string>UDP Sample Sink</string>
</property>
<property name="toolTipDuration">
<number>-1</number>
</property>
<property name="statusTip">
<string>UDP Sample Sink</string>
</property>
<property name="toolTipDuration" stdset="0">
<number>-1</number>
</property>
<widget class="QWidget" name="widget" native="true">
<property name="geometry">
<rect>
@ -56,16 +56,7 @@
<string>Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>2</number>
</property>
<property name="spacing">
@ -92,7 +83,7 @@
<string>Input sample rate (S/s)</string>
</property>
<property name="inputMask">
<string>0009999</string>
<string>0009999; </string>
</property>
<property name="text">
<string>48000</string>
@ -122,7 +113,7 @@
<string>Signal bandwidth (Hz)</string>
</property>
<property name="inputMask">
<string>0009999</string>
<string>0009999; </string>
</property>
<property name="text">
<string>32000</string>
@ -211,6 +202,7 @@
<property name="font">
<font>
<family>Liberation Mono</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="toolTip">
@ -511,7 +503,7 @@
<string>FM deviation in Hz</string>
</property>
<property name="inputMask">
<string>00000</string>
<string>00000; </string>
</property>
<property name="text">
<string>2500</string>
@ -537,7 +529,7 @@
<string>Percentage of AM modulation</string>
</property>
<property name="inputMask">
<string>000</string>
<string>000; </string>
</property>
<property name="text">
<string>95</string>
@ -814,7 +806,7 @@
<string>Local UDP address</string>
</property>
<property name="inputMask">
<string>000.000.000.000</string>
<string>000.000.000.000; </string>
</property>
<property name="text">
<string>127.0.0.1</string>
@ -858,7 +850,7 @@
<string>Local UDP port</string>
</property>
<property name="inputMask">
<string>00000</string>
<string>00000; </string>
</property>
<property name="text">
<string>9998</string>
@ -968,16 +960,7 @@
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>2</number>
</property>
<item>

View File

@ -180,6 +180,7 @@ void LevelMeterVU::resized()
// 100% full height white line
painter.setPen(Qt::white);
painter.setFont(font());
// painter.drawLine(0.75*bar.width(), 0, 0.75*bar.width(), bar.height());
m_scaleEngine.setSize(0.75*bar.width());
@ -323,7 +324,7 @@ void LevelMeterSignalDB::resized()
{
if ((tick.textSize > 0) && (tick.textPos > 0))
{
painter.drawText(QPointF(tick.textPos - (tick.textSize/2) - 2, bar.height()/2 - 1), tick.text);
painter.drawText(QPointF(tick.textPos - (tick.textSize/2) - 4, bar.height()/2 - 1), tick.text);
}
painter.drawLine(shiftx(tick.pos, bar.width()), 0, shiftx(scaleTickList[i].pos,bar.width()), bar.height());