mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
DolphinQt: resolve Qt5.15 deprecations
This commit is contained in:
parent
c629af6319
commit
89b6a4cbee
7 changed files with 15 additions and 14 deletions
|
@ -131,9 +131,12 @@ static int GetLayoutHorizontalSpacing(const QGridLayout* layout)
|
|||
// Docs claim this is deprecated, but on macOS with Qt 5.8 this is the only one that actually
|
||||
// works.
|
||||
float pixel_ratio = QGuiApplication::primaryScreen()->devicePixelRatio();
|
||||
#ifdef __APPLE__
|
||||
// TODO is this still required?
|
||||
hspacing = pixel_ratio * style->pixelMetric(QStyle::PM_DefaultLayoutSpacing);
|
||||
if (hspacing >= 0)
|
||||
return hspacing;
|
||||
#endif
|
||||
|
||||
// Ripped from qtbase/src/widgets/styles/qcommonstyle.cpp
|
||||
return pixel_ratio * 6;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue