2018-01-28 00:35:02 +11:00
|
|
|
// Copyright 2018 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#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;
|
|
|
|
};
|