[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: https://git.eden-emu.dev/eden-emu/eden/pulls/226
Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
This commit is contained in:
crueter 2025-08-08 01:25:00 +02:00
parent ae89b5e1b9
commit 982b171f30
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
11 changed files with 33 additions and 24 deletions

View file

@ -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-License-Identifier: GPL-2.0-or-later
@ -52,7 +55,7 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(
Core::System& system, QWidget* parent,
const Core::Frontend::ProfileSelectParameters& parameters)
: QDialog(parent), profile_manager{system.GetProfileManager()} {
outer_layout = new QVBoxLayout;
outer_layout = new QVBoxLayout(this);
instruction_label = new QLabel();
@ -66,7 +69,7 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(
outer_layout->addWidget(scroll_area);
outer_layout->addWidget(buttons);
layout = new QVBoxLayout;
layout = new QVBoxLayout(scroll_area);
tree_view = new QTreeView;
item_model = new QStandardItemModel(tree_view);
tree_view->setModel(item_model);
@ -94,8 +97,6 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(
layout->setSpacing(0);
layout->addWidget(tree_view);
scroll_area->setLayout(layout);
connect(tree_view, &QTreeView::clicked, this, &QtProfileSelectionDialog::SelectUser);
connect(tree_view, &QTreeView::doubleClicked, this, &QtProfileSelectionDialog::accept);
connect(controller_navigation, &ControllerNavigation::TriggerKeyboardEvent,
@ -124,7 +125,6 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(
for (const auto& item : list_items)
item_model->appendRow(item);
setLayout(outer_layout);
SetWindowTitle(parameters);
SetDialogPurpose(parameters);
resize(550, 400);