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