mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-28 21:26:07 +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
|
@ -28,7 +28,7 @@ void DualShockUDPClientWidget::CreateWidgets()
|
|||
|
||||
m_servers_enabled = new QCheckBox(tr("Enable"));
|
||||
m_servers_enabled->setChecked(Config::Get(ciface::DualShockUDPClient::Settings::SERVERS_ENABLED));
|
||||
main_layout->addWidget(m_servers_enabled, 0, 0);
|
||||
main_layout->addWidget(m_servers_enabled, 0, {});
|
||||
|
||||
m_server_list = new QListWidget();
|
||||
main_layout->addWidget(m_server_list);
|
||||
|
|
|
@ -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