[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kmplayer/0.12] src: Update pixel_device_ratio before painting instead on app startup
From: Koos Vriezen <koos.vriezen () gmail ! com>
Date: 2016-10-30 12:00:20
Message-ID: E1c0omi-0002tI-OL () code ! kde ! org
[Download RAW message or body]
Git commit 93fa2c2587fa8b2f1b0da4ab7f7f2978f105fac2 by Koos Vriezen.
Committed on 30/10/2016 at 11:58.
Pushed by vriezen into branch '0.12'.
Update pixel_device_ratio before painting instead on app startup
Only used for adding a few pixels to text bounds. So if dragging the app
from a low res to a hires display, that could cause text being tuncated.
M +1 -3 src/viewarea.cpp
http://commits.kde.org/kmplayer/93fa2c2587fa8b2f1b0da4ab7f7f2978f105fac2
diff --git a/src/viewarea.cpp b/src/viewarea.cpp
index e407c95..77a260f 100644
--- a/src/viewarea.cpp
+++ b/src/viewarea.cpp
@@ -1892,9 +1892,6 @@ KDE_NO_CDTOR_EXPORT ViewArea::ViewArea (QWidget *, View * view, bool paint_bg)
m_minimal (false),
m_updaters_enabled (true),
m_paint_background (paint_bg) {
-#if QT_VERSION >= 0x050600
- pixel_device_ratio = devicePixelRatioF();
-#endif
if (!paint_bg)
setAttribute (Qt::WA_NoSystemBackground, true);
QPalette palette;
@@ -2030,6 +2027,7 @@ KDE_NO_EXPORT void ViewArea::mouseMoveEvent (QMouseEvent * e) {
KDE_NO_EXPORT void ViewArea::syncVisual () {
#if QT_VERSION >= 0x050600
+ pixel_device_ratio = devicePixelRatioF();
int w = (int)(width() * devicePixelRatioF());
int h = (int)(height() * devicePixelRatioF());
#else
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic