From e2db20b1f33a0c4a7675864ff4927b0b3a0a1efe Mon Sep 17 00:00:00 2001 From: morg Date: Thu, 26 Jun 2025 09:48:02 +0200 Subject: [PATCH] DeviceView: prevents setting 0px as font size. --- qt/DeviceView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/DeviceView.cpp b/qt/DeviceView.cpp index 74618d4d..8c484c26 100644 --- a/qt/DeviceView.cpp +++ b/qt/DeviceView.cpp @@ -797,7 +797,7 @@ void DeviceView::paintEvent(QPaintEvent* /* event */) | Label | | Set the font color so that the text is visible | \*-----------------------------------------------------*/ - font.setPixelSize(posh / 2); + font.setPixelSize(std::max(1, posh / 2)); painter.setFont(font); unsigned int luma = (unsigned int)(0.2126f * currentColor.red() + 0.7152f * currentColor.green() + 0.0722f * currentColor.blue());