mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Qt: Implement Wii TAS input window
This commit is contained in:
@ -23,10 +23,10 @@ AspectRatioWidget::AspectRatioWidget(QWidget* widget, float width, float height,
|
||||
|
||||
void AspectRatioWidget::resizeEvent(QResizeEvent* event)
|
||||
{
|
||||
float this_aspect_ratio = (float)event->size().width() / event->size().height();
|
||||
float aspect_ratio = static_cast<float>(event->size().width()) / event->size().height();
|
||||
int widget_stretch, outer_stretch;
|
||||
|
||||
if (this_aspect_ratio > (m_ar_width / m_ar_height)) // too wide
|
||||
if (aspect_ratio > (m_ar_width / m_ar_height)) // too wide
|
||||
{
|
||||
m_layout->setDirection(QBoxLayout::LeftToRight);
|
||||
widget_stretch = height() * (m_ar_width / m_ar_height); // i.e., my width
|
||||
|
@ -11,7 +11,7 @@ class QBoxLayout;
|
||||
class AspectRatioWidget : public QWidget
|
||||
{
|
||||
public:
|
||||
AspectRatioWidget(QWidget* widget, float width, float height, QWidget* parent = 0);
|
||||
AspectRatioWidget(QWidget* widget, float width, float height, QWidget* parent = nullptr);
|
||||
void resizeEvent(QResizeEvent* event);
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user