mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-28 18:12:44 -06:00
Merge pull request #4489 from FearlessTobi/port-ui-stuff
Port QT interface changes from yuzu.
This commit is contained in:
commit
3ede436053
13 changed files with 21 additions and 21 deletions
|
@ -16,16 +16,15 @@ class ConfigureAudio : public QWidget {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureAudio(QWidget* parent = nullptr);
|
explicit ConfigureAudio(QWidget* parent = nullptr);
|
||||||
~ConfigureAudio();
|
~ConfigureAudio() override;
|
||||||
|
|
||||||
void applyConfiguration();
|
void applyConfiguration();
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
void setConfiguration();
|
void setConfiguration();
|
||||||
|
|
||||||
public slots:
|
private:
|
||||||
void updateAudioDevices(int sink_index);
|
void updateAudioDevices(int sink_index);
|
||||||
|
|
||||||
private:
|
|
||||||
void setOutputSinkFromSinkID();
|
void setOutputSinkFromSinkID();
|
||||||
void setAudioDeviceFromDeviceID();
|
void setAudioDeviceFromDeviceID();
|
||||||
void setVolumeIndicatorText(int percentage);
|
void setVolumeIndicatorText(int percentage);
|
||||||
|
|
|
@ -16,7 +16,7 @@ class ConfigureCamera : public QWidget {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureCamera(QWidget* parent = nullptr);
|
explicit ConfigureCamera(QWidget* parent = nullptr);
|
||||||
~ConfigureCamera();
|
~ConfigureCamera() override;
|
||||||
|
|
||||||
void applyConfiguration();
|
void applyConfiguration();
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
|
|
|
@ -16,12 +16,11 @@ class ConfigureDebug : public QWidget {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureDebug(QWidget* parent = nullptr);
|
explicit ConfigureDebug(QWidget* parent = nullptr);
|
||||||
~ConfigureDebug();
|
~ConfigureDebug() override;
|
||||||
|
|
||||||
void applyConfiguration();
|
void applyConfiguration();
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
void setConfiguration();
|
void setConfiguration();
|
||||||
|
|
||||||
private:
|
|
||||||
std::unique_ptr<Ui::ConfigureDebug> ui;
|
std::unique_ptr<Ui::ConfigureDebug> ui;
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,7 @@ class ConfigureDialog : public QDialog {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureDialog(QWidget* parent, const HotkeyRegistry& registry);
|
explicit ConfigureDialog(QWidget* parent, const HotkeyRegistry& registry);
|
||||||
~ConfigureDialog();
|
~ConfigureDialog() override;
|
||||||
|
|
||||||
void applyConfiguration();
|
void applyConfiguration();
|
||||||
void UpdateVisibleTabs();
|
void UpdateVisibleTabs();
|
||||||
|
@ -34,6 +34,5 @@ private:
|
||||||
void setConfiguration();
|
void setConfiguration();
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
|
|
||||||
private:
|
|
||||||
std::unique_ptr<Ui::ConfigureDialog> ui;
|
std::unique_ptr<Ui::ConfigureDialog> ui;
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,7 @@ class ConfigureGeneral : public QWidget {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureGeneral(QWidget* parent = nullptr);
|
explicit ConfigureGeneral(QWidget* parent = nullptr);
|
||||||
~ConfigureGeneral();
|
~ConfigureGeneral() override;
|
||||||
|
|
||||||
void PopulateHotkeyList(const HotkeyRegistry& registry);
|
void PopulateHotkeyList(const HotkeyRegistry& registry);
|
||||||
void ResetDefaults();
|
void ResetDefaults();
|
||||||
|
|
|
@ -16,13 +16,12 @@ class ConfigureGraphics : public QWidget {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureGraphics(QWidget* parent = nullptr);
|
explicit ConfigureGraphics(QWidget* parent = nullptr);
|
||||||
~ConfigureGraphics();
|
~ConfigureGraphics() override;
|
||||||
|
|
||||||
void applyConfiguration();
|
void applyConfiguration();
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
void setConfiguration();
|
void setConfiguration();
|
||||||
|
|
||||||
private:
|
|
||||||
std::unique_ptr<Ui::ConfigureGraphics> ui;
|
std::unique_ptr<Ui::ConfigureGraphics> ui;
|
||||||
QColor bg_color;
|
QColor bg_color;
|
||||||
};
|
};
|
||||||
|
|
|
@ -221,6 +221,8 @@ ConfigureInput::ConfigureInput(QWidget* parent)
|
||||||
ui->buttonHome->setEnabled(false);
|
ui->buttonHome->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConfigureInput::~ConfigureInput() = default;
|
||||||
|
|
||||||
void ConfigureInput::applyConfiguration() {
|
void ConfigureInput::applyConfiguration() {
|
||||||
std::transform(buttons_param.begin(), buttons_param.end(), Settings::values.buttons.begin(),
|
std::transform(buttons_param.begin(), buttons_param.end(), Settings::values.buttons.begin(),
|
||||||
[](const Common::ParamPackage& param) { return param.Serialize(); });
|
[](const Common::ParamPackage& param) { return param.Serialize(); });
|
||||||
|
|
|
@ -30,6 +30,7 @@ class ConfigureInput : public QWidget {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureInput(QWidget* parent = nullptr);
|
explicit ConfigureInput(QWidget* parent = nullptr);
|
||||||
|
~ConfigureInput() override;
|
||||||
|
|
||||||
/// Save all button configurations to settings file
|
/// Save all button configurations to settings file
|
||||||
void applyConfiguration();
|
void applyConfiguration();
|
||||||
|
|
|
@ -46,7 +46,7 @@ class ConfigureMotionTouch : public QDialog {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureMotionTouch(QWidget* parent = nullptr);
|
explicit ConfigureMotionTouch(QWidget* parent = nullptr);
|
||||||
~ConfigureMotionTouch();
|
~ConfigureMotionTouch() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void applyConfiguration();
|
void applyConfiguration();
|
||||||
|
|
|
@ -16,7 +16,7 @@ class ConfigureUi : public QWidget {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureUi(QWidget* parent = nullptr);
|
explicit ConfigureUi(QWidget* parent = nullptr);
|
||||||
~ConfigureUi();
|
~ConfigureUi() override;
|
||||||
|
|
||||||
void applyConfiguration();
|
void applyConfiguration();
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
|
|
|
@ -17,19 +17,18 @@ class ConfigureWeb : public QWidget {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ConfigureWeb(QWidget* parent = nullptr);
|
explicit ConfigureWeb(QWidget* parent = nullptr);
|
||||||
~ConfigureWeb();
|
~ConfigureWeb() override;
|
||||||
|
|
||||||
void applyConfiguration();
|
void applyConfiguration();
|
||||||
void retranslateUi();
|
void retranslateUi();
|
||||||
void setConfiguration();
|
void setConfiguration();
|
||||||
|
|
||||||
public slots:
|
private:
|
||||||
void RefreshTelemetryID();
|
void RefreshTelemetryID();
|
||||||
void OnLoginChanged();
|
void OnLoginChanged();
|
||||||
void VerifyLogin();
|
void VerifyLogin();
|
||||||
void OnLoginVerified();
|
void OnLoginVerified();
|
||||||
|
|
||||||
private:
|
|
||||||
bool user_verified = true;
|
bool user_verified = true;
|
||||||
QFutureWatcher<bool> verify_watcher;
|
QFutureWatcher<bool> verify_watcher;
|
||||||
|
|
||||||
|
|
|
@ -287,6 +287,7 @@ GameList::GameList(GMainWindow* parent) : QWidget{parent} {
|
||||||
tree_view->setEditTriggers(QHeaderView::NoEditTriggers);
|
tree_view->setEditTriggers(QHeaderView::NoEditTriggers);
|
||||||
tree_view->setUniformRowHeights(true);
|
tree_view->setUniformRowHeights(true);
|
||||||
tree_view->setContextMenuPolicy(Qt::CustomContextMenu);
|
tree_view->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
|
tree_view->setStyleSheet("QTreeView{ border: none; }");
|
||||||
|
|
||||||
item_model->insertColumns(0, COLUMN_COUNT);
|
item_model->insertColumns(0, COLUMN_COUNT);
|
||||||
item_model->setHeaderData(COLUMN_NAME, Qt::Horizontal, tr("Name"));
|
item_model->setHeaderData(COLUMN_NAME, Qt::Horizontal, tr("Name"));
|
||||||
|
|
|
@ -37,12 +37,13 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsign
|
||||||
const auto callback = [this, recursion, parent_dir](u64* num_entries_out,
|
const auto callback = [this, recursion, parent_dir](u64* num_entries_out,
|
||||||
const std::string& directory,
|
const std::string& directory,
|
||||||
const std::string& virtual_name) -> bool {
|
const std::string& virtual_name) -> bool {
|
||||||
std::string physical_name = directory + DIR_SEP + virtual_name;
|
if (stop_processing) {
|
||||||
|
// Breaks the callback loop.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (stop_processing)
|
const std::string physical_name = directory + DIR_SEP + virtual_name;
|
||||||
return false; // Breaks the callback loop.
|
const bool is_dir = FileUtil::IsDirectory(physical_name);
|
||||||
|
|
||||||
bool is_dir = FileUtil::IsDirectory(physical_name);
|
|
||||||
if (!is_dir && HasSupportedFileExtension(physical_name)) {
|
if (!is_dir && HasSupportedFileExtension(physical_name)) {
|
||||||
std::unique_ptr<Loader::AppLoader> loader = Loader::GetLoader(physical_name);
|
std::unique_ptr<Loader::AppLoader> loader = Loader::GetLoader(physical_name);
|
||||||
if (!loader)
|
if (!loader)
|
||||||
|
|
Loading…
Reference in a new issue