mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-28 16:20:26 +01:00
Remove use of QDesktopWidget in settingsdialog
This commit is contained in:
parent
b5dd90b2d5
commit
8cb1015a35
@ -20,28 +20,22 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QWidget>
|
||||
#include <QApplication>
|
||||
#include <QDialog>
|
||||
#include <QWindow>
|
||||
#include <QScreen>
|
||||
#include <QAbstractItemModel>
|
||||
#include <QAbstractItemView>
|
||||
#include <QDesktopWidget>
|
||||
#include <QVariant>
|
||||
#include <QTreeWidget>
|
||||
#include <QString>
|
||||
#include <QStringBuilder>
|
||||
#include <QIcon>
|
||||
#include <QPainter>
|
||||
#include <QFlags>
|
||||
#include <QFrame>
|
||||
#include <QKeySequence>
|
||||
#include <QLabel>
|
||||
#include <QLayout>
|
||||
#include <QRect>
|
||||
#include <QSize>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QPushButton>
|
||||
#include <QScrollArea>
|
||||
#include <QStackedWidget>
|
||||
#include <QTreeWidget>
|
||||
#include <QComboBox>
|
||||
#include <QPushButton>
|
||||
|
||||
#include "core/application.h"
|
||||
#include "core/player.h"
|
||||
@ -287,7 +281,7 @@ void SettingsDialog::showEvent(QShowEvent *e) {
|
||||
loading_settings_ = false;
|
||||
|
||||
// Resize the dialog if it's too big
|
||||
const QSize available = QApplication::desktop()->availableGeometry(this).size();
|
||||
const QRect available = window()->windowHandle()->screen()->geometry();
|
||||
if (available.height() < height()) {
|
||||
resize(width(), sizeHint().height());
|
||||
}
|
||||
|
@ -24,25 +24,22 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <QObject>
|
||||
#include <QWidget>
|
||||
#include <QDialog>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QMap>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QPainter>
|
||||
#include <QStyleOption>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QAbstractButton>
|
||||
#include <QScrollArea>
|
||||
#include <QTreeWidgetItem>
|
||||
#include <QComboBox>
|
||||
#include <QSettings>
|
||||
|
||||
#include "core/logging.h"
|
||||
#include "widgets/osd.h"
|
||||
|
||||
class QModelIndex;
|
||||
class QTreeWidgetItem;
|
||||
class QComboBox;
|
||||
class QScrollArea;
|
||||
class QAbstractButton;
|
||||
class QStyleOptionViewItem;
|
||||
class QShowEvent;
|
||||
|
||||
class Application;
|
||||
|
Loading…
x
Reference in New Issue
Block a user