Qt/TAS: Fix slightly off-center default values

This commit is contained in:
spycrab 2018-06-29 11:38:37 +02:00
parent bd28bf6b1e
commit eac5d3d089
2 changed files with 8 additions and 4 deletions

View File

@ -4,6 +4,8 @@
#include "DolphinQt2/TAS/Shared.h"
#include <cmath>
#include <QGroupBox>
#include <QHBoxLayout>
#include <QLabel>
@ -47,8 +49,8 @@ QGroupBox* CreateStickInputs(QDialog* window, QString name, QSpinBox*& x_value,
window->connect(visual, &StickWidget::ChangedX, x_value, &QSpinBox::setValue);
window->connect(visual, &StickWidget::ChangedY, y_value, &QSpinBox::setValue);
x_value->setValue(max_x / 2);
y_value->setValue(max_y / 2);
x_value->setValue(static_cast<int>(std::round(max_x / 2.)));
y_value->setValue(static_cast<int>(std::round(max_y / 2.)));
auto* visual_ar = new AspectRatioWidget(visual, max_x, max_y);

View File

@ -4,6 +4,8 @@
#include "DolphinQt2/TAS/WiiTASInputWindow.h"
#include <cmath>
#include <QCheckBox>
#include <QGroupBox>
#include <QHBoxLayout>
@ -55,8 +57,8 @@ WiiTASInputWindow::WiiTASInputWindow(QWidget* parent, int num) : QDialog(parent)
connect(visual, &IRWidget::ChangedX, m_ir_x_value, &QSpinBox::setValue);
connect(visual, &IRWidget::ChangedY, m_ir_y_value, &QSpinBox::setValue);
m_ir_x_value->setValue(ir_max_x / 2);
m_ir_y_value->setValue(ir_max_y / 2);
m_ir_x_value->setValue(static_cast<int>(std::round(ir_max_x / 2.)));
m_ir_y_value->setValue(static_cast<int>(std::round(ir_max_y / 2.)));
auto* visual_ar = new AspectRatioWidget(visual, ir_max_x, ir_max_y);