2018-01-28 00:35:02 +11:00
|
|
|
// Copyright 2018 Dolphin Emulator Project
|
2021-07-05 03:22:19 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-01-28 00:35:02 +11:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
class QBoxLayout;
|
|
|
|
|
|
|
|
class AspectRatioWidget : public QWidget
|
|
|
|
{
|
2018-05-13 16:16:20 -04:00
|
|
|
Q_OBJECT
|
2018-01-28 00:35:02 +11:00
|
|
|
public:
|
2018-01-31 22:35:09 +11:00
|
|
|
AspectRatioWidget(QWidget* widget, float width, float height, QWidget* parent = nullptr);
|
2018-05-17 16:15:59 -04:00
|
|
|
void resizeEvent(QResizeEvent* event) override;
|
2018-01-28 00:35:02 +11:00
|
|
|
|
|
|
|
private:
|
|
|
|
QBoxLayout* m_layout;
|
|
|
|
float m_ar_width;
|
|
|
|
float m_ar_height;
|
|
|
|
};
|