forked from eden-emu/eden
[desktop] fix random qt annoyances (#226)
Removes that silly QLayout message and improves consistency thereof for other QLayouts Still work to be done but this is all that's needed rn Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: eden-emu/eden#226 Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
This commit is contained in:
parent
ae89b5e1b9
commit
982b171f30
11 changed files with 33 additions and 24 deletions
|
@ -391,14 +391,14 @@ void ProfileManager::ParseUserSaveFile() {
|
||||||
|
|
||||||
if (!save.IsOpen()) {
|
if (!save.IsOpen()) {
|
||||||
LOG_WARNING(Service_ACC, "Failed to load profile data from save data... Generating new "
|
LOG_WARNING(Service_ACC, "Failed to load profile data from save data... Generating new "
|
||||||
"user 'yuzu' with random UUID.");
|
"user 'eden' with random UUID.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProfileDataRaw data;
|
ProfileDataRaw data;
|
||||||
if (!save.ReadObject(data)) {
|
if (!save.ReadObject(data)) {
|
||||||
LOG_WARNING(Service_ACC, "profiles.dat is smaller than expected... Generating new user "
|
LOG_WARNING(Service_ACC, "profiles.dat is smaller than expected... Generating new user "
|
||||||
"'yuzu' with random UUID.");
|
"'eden' with random UUID.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
@ -52,7 +55,7 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(
|
||||||
Core::System& system, QWidget* parent,
|
Core::System& system, QWidget* parent,
|
||||||
const Core::Frontend::ProfileSelectParameters& parameters)
|
const Core::Frontend::ProfileSelectParameters& parameters)
|
||||||
: QDialog(parent), profile_manager{system.GetProfileManager()} {
|
: QDialog(parent), profile_manager{system.GetProfileManager()} {
|
||||||
outer_layout = new QVBoxLayout;
|
outer_layout = new QVBoxLayout(this);
|
||||||
|
|
||||||
instruction_label = new QLabel();
|
instruction_label = new QLabel();
|
||||||
|
|
||||||
|
@ -66,7 +69,7 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(
|
||||||
outer_layout->addWidget(scroll_area);
|
outer_layout->addWidget(scroll_area);
|
||||||
outer_layout->addWidget(buttons);
|
outer_layout->addWidget(buttons);
|
||||||
|
|
||||||
layout = new QVBoxLayout;
|
layout = new QVBoxLayout(scroll_area);
|
||||||
tree_view = new QTreeView;
|
tree_view = new QTreeView;
|
||||||
item_model = new QStandardItemModel(tree_view);
|
item_model = new QStandardItemModel(tree_view);
|
||||||
tree_view->setModel(item_model);
|
tree_view->setModel(item_model);
|
||||||
|
@ -94,8 +97,6 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(
|
||||||
layout->setSpacing(0);
|
layout->setSpacing(0);
|
||||||
layout->addWidget(tree_view);
|
layout->addWidget(tree_view);
|
||||||
|
|
||||||
scroll_area->setLayout(layout);
|
|
||||||
|
|
||||||
connect(tree_view, &QTreeView::clicked, this, &QtProfileSelectionDialog::SelectUser);
|
connect(tree_view, &QTreeView::clicked, this, &QtProfileSelectionDialog::SelectUser);
|
||||||
connect(tree_view, &QTreeView::doubleClicked, this, &QtProfileSelectionDialog::accept);
|
connect(tree_view, &QTreeView::doubleClicked, this, &QtProfileSelectionDialog::accept);
|
||||||
connect(controller_navigation, &ControllerNavigation::TriggerKeyboardEvent,
|
connect(controller_navigation, &ControllerNavigation::TriggerKeyboardEvent,
|
||||||
|
@ -124,7 +125,6 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(
|
||||||
for (const auto& item : list_items)
|
for (const auto& item : list_items)
|
||||||
item_model->appendRow(item);
|
item_model->appendRow(item);
|
||||||
|
|
||||||
setLayout(outer_layout);
|
|
||||||
SetWindowTitle(parameters);
|
SetWindowTitle(parameters);
|
||||||
SetDialogPurpose(parameters);
|
SetDialogPurpose(parameters);
|
||||||
resize(550, 400);
|
resize(550, 400);
|
||||||
|
|
|
@ -287,7 +287,6 @@ GRenderWindow::GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_,
|
||||||
setAttribute(Qt::WA_AcceptTouchEvents);
|
setAttribute(Qt::WA_AcceptTouchEvents);
|
||||||
auto* layout = new QHBoxLayout(this);
|
auto* layout = new QHBoxLayout(this);
|
||||||
layout->setContentsMargins(0, 0, 0, 0);
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
setLayout(layout);
|
|
||||||
input_subsystem->Initialize();
|
input_subsystem->Initialize();
|
||||||
this->setMouseTracking(true);
|
this->setMouseTracking(true);
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>eden Configuration</string>
|
<string>Eden Configuration</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: 2016 Citra Emulator Project
|
// SPDX-FileCopyrightText: 2016 Citra Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
@ -98,8 +101,8 @@ void ConfigureInput::Initialize(InputCommon::InputSubsystem* input_subsystem,
|
||||||
};
|
};
|
||||||
|
|
||||||
for (std::size_t i = 0; i < player_tabs.size(); ++i) {
|
for (std::size_t i = 0; i < player_tabs.size(); ++i) {
|
||||||
player_tabs[i]->setLayout(new QHBoxLayout(player_tabs[i]));
|
QHBoxLayout *tab_layout = new QHBoxLayout(player_tabs[i]);
|
||||||
player_tabs[i]->layout()->addWidget(player_controllers[i]);
|
tab_layout->addWidget(player_controllers[i]);
|
||||||
connect(player_controllers[i], &ConfigureInputPlayer::Connected, [this, i](bool checked) {
|
connect(player_controllers[i], &ConfigureInputPlayer::Connected, [this, i](bool checked) {
|
||||||
// Ensures that connecting a controller changes the number of players
|
// Ensures that connecting a controller changes the number of players
|
||||||
if (connected_controller_checkboxes[i]->isChecked() != checked) {
|
if (connected_controller_checkboxes[i]->isChecked() != checked) {
|
||||||
|
@ -138,8 +141,9 @@ void ConfigureInput::Initialize(InputCommon::InputSubsystem* input_subsystem,
|
||||||
[this](bool is_handheld) { UpdateDockedState(is_handheld); });
|
[this](bool is_handheld) { UpdateDockedState(is_handheld); });
|
||||||
|
|
||||||
advanced = new ConfigureInputAdvanced(hid_core, this);
|
advanced = new ConfigureInputAdvanced(hid_core, this);
|
||||||
ui->tabAdvanced->setLayout(new QHBoxLayout(ui->tabAdvanced));
|
|
||||||
ui->tabAdvanced->layout()->addWidget(advanced);
|
QHBoxLayout* advancedLayout = new QHBoxLayout(ui->tabAdvanced);
|
||||||
|
advancedLayout->addWidget(advanced);
|
||||||
|
|
||||||
connect(advanced, &ConfigureInputAdvanced::CallDebugControllerDialog,
|
connect(advanced, &ConfigureInputAdvanced::CallDebugControllerDialog,
|
||||||
[this, input_subsystem, &hid_core, is_powered_on] {
|
[this, input_subsystem, &hid_core, is_powered_on] {
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: 2016 Citra Emulator Project
|
// SPDX-FileCopyrightText: 2016 Citra Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <QGridLayout>
|
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
@ -13,7 +15,6 @@
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/param_package.h"
|
#include "common/param_package.h"
|
||||||
#include "configuration/qt_config.h"
|
#include "configuration/qt_config.h"
|
||||||
#include "frontend_common/config.h"
|
|
||||||
#include "hid_core/frontend/emulated_controller.h"
|
#include "hid_core/frontend/emulated_controller.h"
|
||||||
#include "hid_core/hid_core.h"
|
#include "hid_core/hid_core.h"
|
||||||
#include "hid_core/hid_types.h"
|
#include "hid_core/hid_types.h"
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: 2018 Citra Emulator Project
|
// SPDX-FileCopyrightText: 2018 Citra Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
@ -19,7 +22,7 @@
|
||||||
CalibrationConfigurationDialog::CalibrationConfigurationDialog(QWidget* parent,
|
CalibrationConfigurationDialog::CalibrationConfigurationDialog(QWidget* parent,
|
||||||
const std::string& host, u16 port)
|
const std::string& host, u16 port)
|
||||||
: QDialog(parent) {
|
: QDialog(parent) {
|
||||||
layout = new QVBoxLayout;
|
layout = new QVBoxLayout(this);
|
||||||
status_label = new QLabel(tr("Communicating with the server..."));
|
status_label = new QLabel(tr("Communicating with the server..."));
|
||||||
cancel_button = new QPushButton(tr("Cancel"));
|
cancel_button = new QPushButton(tr("Cancel"));
|
||||||
connect(cancel_button, &QPushButton::clicked, this, [this] {
|
connect(cancel_button, &QPushButton::clicked, this, [this] {
|
||||||
|
@ -30,7 +33,6 @@ CalibrationConfigurationDialog::CalibrationConfigurationDialog(QWidget* parent,
|
||||||
});
|
});
|
||||||
layout->addWidget(status_label);
|
layout->addWidget(status_label);
|
||||||
layout->addWidget(cancel_button);
|
layout->addWidget(cancel_button);
|
||||||
setLayout(layout);
|
|
||||||
|
|
||||||
using namespace InputCommon::CemuhookUDP;
|
using namespace InputCommon::CemuhookUDP;
|
||||||
job = std::make_unique<CalibrationConfigurationJob>(
|
job = std::make_unique<CalibrationConfigurationJob>(
|
||||||
|
|
|
@ -418,7 +418,7 @@ bool ConfigureProfileManager::LoadAvatarData() {
|
||||||
ConfigureProfileManagerAvatarDialog::ConfigureProfileManagerAvatarDialog(QWidget* parent)
|
ConfigureProfileManagerAvatarDialog::ConfigureProfileManagerAvatarDialog(QWidget* parent)
|
||||||
: QDialog{parent}, avatar_list{new QListWidget(this)}, bg_color_button{new QPushButton(this)} {
|
: QDialog{parent}, avatar_list{new QListWidget(this)}, bg_color_button{new QPushButton(this)} {
|
||||||
auto* main_layout = new QVBoxLayout(this);
|
auto* main_layout = new QVBoxLayout(this);
|
||||||
auto* button_layout = new QHBoxLayout(this);
|
auto* button_layout = new QHBoxLayout();
|
||||||
auto* select_button = new QPushButton(tr("Select"), this);
|
auto* select_button = new QPushButton(tr("Select"), this);
|
||||||
auto* cancel_button = new QPushButton(tr("Cancel"), this);
|
auto* cancel_button = new QPushButton(tr("Cancel"), this);
|
||||||
auto* bg_color_label = new QLabel(tr("Background Color"), this);
|
auto* bg_color_label = new QLabel(tr("Background Color"), this);
|
||||||
|
@ -442,7 +442,6 @@ ConfigureProfileManagerAvatarDialog::ConfigureProfileManagerAvatarDialog(QWidget
|
||||||
button_layout->addWidget(select_button);
|
button_layout->addWidget(select_button);
|
||||||
button_layout->addWidget(cancel_button);
|
button_layout->addWidget(cancel_button);
|
||||||
|
|
||||||
this->setLayout(main_layout);
|
|
||||||
this->setWindowTitle(tr("Select Firmware Avatar"));
|
this->setWindowTitle(tr("Select Firmware Avatar"));
|
||||||
main_layout->addWidget(avatar_list);
|
main_layout->addWidget(avatar_list);
|
||||||
main_layout->addLayout(button_layout);
|
main_layout->addLayout(button_layout);
|
||||||
|
@ -654,4 +653,4 @@ std::vector<uint8_t> ConfigureProfileManager::DecompressYaz0(const FileSys::Virt
|
||||||
}
|
}
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include "core/file_sys/vfs/vfs_types.h"
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
struct UUID;
|
struct UUID;
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: 2015 Citra Emulator Project
|
// SPDX-FileCopyrightText: 2015 Citra Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
@ -28,7 +31,6 @@ ControllerDialog::ControllerDialog(Core::HID::HIDCore& hid_core_,
|
||||||
QLayout* layout = new QVBoxLayout(this);
|
QLayout* layout = new QVBoxLayout(this);
|
||||||
layout->setContentsMargins(0, 0, 0, 0);
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
layout->addWidget(widget);
|
layout->addWidget(widget);
|
||||||
setLayout(layout);
|
|
||||||
|
|
||||||
// Configure focus so that widget is focusable and the dialog automatically forwards focus to
|
// Configure focus so that widget is focusable and the dialog automatically forwards focus to
|
||||||
// it.
|
// it.
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
@ -21,13 +24,11 @@ void LimitableInputDialog::CreateUI() {
|
||||||
text_label_invalid = new QLabel(this);
|
text_label_invalid = new QLabel(this);
|
||||||
buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
|
buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
|
||||||
|
|
||||||
auto* const layout = new QVBoxLayout;
|
auto* const layout = new QVBoxLayout(this);
|
||||||
layout->addWidget(text_label);
|
layout->addWidget(text_label);
|
||||||
layout->addWidget(text_entry);
|
layout->addWidget(text_entry);
|
||||||
layout->addWidget(text_label_invalid);
|
layout->addWidget(text_label_invalid);
|
||||||
layout->addWidget(buttons);
|
layout->addWidget(buttons);
|
||||||
|
|
||||||
setLayout(layout);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LimitableInputDialog::ConnectEvents() {
|
void LimitableInputDialog::ConnectEvents() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue