mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
DolphinQt: resolve Qt5.15 deprecations
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user