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