1 // Copyright 2018 Dolphin Emulator Project
2 // Licensed under GPLv2+
3 // Refer to the license.txt file included.
4 
5 #pragma once
6 
7 #include <QWidget>
8 
9 class QBoxLayout;
10 
11 class AspectRatioWidget : public QWidget
12 {
13   Q_OBJECT
14 public:
15   AspectRatioWidget(QWidget* widget, float width, float height, QWidget* parent = nullptr);
16   void resizeEvent(QResizeEvent* event) override;
17 
18 private:
19   QBoxLayout* m_layout;
20   float m_ar_width;
21   float m_ar_height;
22 };
23