| 1 | // Copyright 2018 Dolphin Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include <QWidget> |
| 7 | |
| 8 | class QBoxLayout; |
| 9 | |
| 10 | class AspectRatioWidget : public QWidget |
| 11 | { |
| 12 | Q_OBJECT |
| 13 | public: |
| 14 | AspectRatioWidget(QWidget* widget, float width, float height, QWidget* parent = nullptr); |
| 15 | void resizeEvent(QResizeEvent* event) override; |
| 16 | |
| 17 | private: |
| 18 | QBoxLayout* m_layout; |
| 19 | float m_ar_width; |
| 20 | float m_ar_height; |
| 21 | }; |