2018-01-27 14:35:02 +01: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 22:16:20 +02:00
|
|
|
Q_OBJECT
|
2018-01-27 14:35:02 +01:00
|
|
|
public:
|
2018-01-31 12:35:09 +01:00
|
|
|
AspectRatioWidget(QWidget* widget, float width, float height, QWidget* parent = nullptr);
|
2018-05-17 22:15:59 +02:00
|
|
|
void resizeEvent(QResizeEvent* event) override;
|
2018-01-27 14:35:02 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
QBoxLayout* m_layout;
|
|
|
|
float m_ar_width;
|
|
|
|
float m_ar_height;
|
|
|
|
};
|