New upstream version 26.0.2+dfsg1

This commit is contained in:
Sebastian Ramacher 2020-10-12 22:28:36 +02:00
parent bc27b6c1ca
commit 040dcc3fc2
23 changed files with 226 additions and 184 deletions

View file

@ -531,6 +531,8 @@ VolumeMeter::VolumeMeter(QWidget *parent, obs_volmeter_t *obs_volmeter,
bool vertical)
: QWidget(parent), obs_volmeter(obs_volmeter), vertical(vertical)
{
setAttribute(Qt::WA_OpaquePaintEvent, true);
// Use a font that can be rendered small.
tickFont = QFont("Arial");
tickFont.setPixelSize(7);
@ -1041,6 +1043,11 @@ void VolumeMeter::paintEvent(QPaintEvent *event)
// Actual painting of the widget starts here.
QPainter painter(this);
// Paint window background color (as widget is opaque)
QColor background = palette().color(QPalette::ColorRole::Window);
painter.fillRect(rect, background);
if (vertical) {
// Invert the Y axis to ease the math
painter.translate(0, height);