Merge pull request #4489 from FearlessTobi/port-ui-stuff
Port QT interface changes from yuzu.
This commit is contained in:
commit
3ede436053
@ -16,16 +16,15 @@ class ConfigureAudio : public QWidget {
|
||||
|
||||
public:
|
||||
explicit ConfigureAudio(QWidget* parent = nullptr);
|
||||
~ConfigureAudio();
|
||||
~ConfigureAudio() override;
|
||||
|
||||
void applyConfiguration();
|
||||
void retranslateUi();
|
||||
void setConfiguration();
|
||||
|
||||
public slots:
|
||||
private:
|
||||
void updateAudioDevices(int sink_index);
|
||||
|
||||
private:
|
||||
void setOutputSinkFromSinkID();
|
||||
void setAudioDeviceFromDeviceID();
|
||||
void setVolumeIndicatorText(int percentage);
|
||||
|
@ -16,7 +16,7 @@ class ConfigureCamera : public QWidget {
|
||||
|
||||
public:
|
||||
explicit ConfigureCamera(QWidget* parent = nullptr);
|
||||
~ConfigureCamera();
|
||||
~ConfigureCamera() override;
|
||||
|
||||
void applyConfiguration();
|
||||
void retranslateUi();
|
||||
|
@ -16,12 +16,11 @@ class ConfigureDebug : public QWidget {
|
||||
|
||||
public:
|
||||
explicit ConfigureDebug(QWidget* parent = nullptr);
|
||||
~ConfigureDebug();
|
||||
~ConfigureDebug() override;
|
||||
|
||||
void applyConfiguration();
|
||||
void retranslateUi();
|
||||
void setConfiguration();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::ConfigureDebug> ui;
|
||||
};
|
||||
|
@ -18,7 +18,7 @@ class ConfigureDialog : public QDialog {
|
||||
|
||||
public:
|
||||
explicit ConfigureDialog(QWidget* parent, const HotkeyRegistry& registry);
|
||||
~ConfigureDialog();
|
||||
~ConfigureDialog() override;
|
||||
|
||||
void applyConfiguration();
|
||||
void UpdateVisibleTabs();
|
||||
@ -34,6 +34,5 @@ private:
|
||||
void setConfiguration();
|
||||
void retranslateUi();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::ConfigureDialog> ui;
|
||||
};
|
||||
|
@ -18,7 +18,7 @@ class ConfigureGeneral : public QWidget {
|
||||
|
||||
public:
|
||||
explicit ConfigureGeneral(QWidget* parent = nullptr);
|
||||
~ConfigureGeneral();
|
||||
~ConfigureGeneral() override;
|
||||
|
||||
void PopulateHotkeyList(const HotkeyRegistry& registry);
|
||||
void ResetDefaults();
|
||||
|
@ -16,13 +16,12 @@ class ConfigureGraphics : public QWidget {
|
||||
|
||||
public:
|
||||
explicit ConfigureGraphics(QWidget* parent = nullptr);
|
||||
~ConfigureGraphics();
|
||||
~ConfigureGraphics() override;
|
||||
|
||||
void applyConfiguration();
|
||||
void retranslateUi();
|
||||
void setConfiguration();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::ConfigureGraphics> ui;
|
||||
QColor bg_color;
|
||||
};
|
||||
|
@ -221,6 +221,8 @@ ConfigureInput::ConfigureInput(QWidget* parent)
|
||||
ui->buttonHome->setEnabled(false);
|
||||
}
|
||||
|
||||
ConfigureInput::~ConfigureInput() = default;
|
||||
|
||||
void ConfigureInput::applyConfiguration() {
|
||||
std::transform(buttons_param.begin(), buttons_param.end(), Settings::values.buttons.begin(),
|
||||
[](const Common::ParamPackage& param) { return param.Serialize(); });
|
||||
|
@ -30,6 +30,7 @@ class ConfigureInput : public QWidget {
|
||||
|
||||
public:
|
||||
explicit ConfigureInput(QWidget* parent = nullptr);
|
||||
~ConfigureInput() override;
|
||||
|
||||
/// Save all button configurations to settings file
|
||||
void applyConfiguration();
|
||||
|
@ -46,7 +46,7 @@ class ConfigureMotionTouch : public QDialog {
|
||||
|
||||
public:
|
||||
explicit ConfigureMotionTouch(QWidget* parent = nullptr);
|
||||
~ConfigureMotionTouch();
|
||||
~ConfigureMotionTouch() override;
|
||||
|
||||
public slots:
|
||||
void applyConfiguration();
|
||||
|
@ -16,7 +16,7 @@ class ConfigureUi : public QWidget {
|
||||
|
||||
public:
|
||||
explicit ConfigureUi(QWidget* parent = nullptr);
|
||||
~ConfigureUi();
|
||||
~ConfigureUi() override;
|
||||
|
||||
void applyConfiguration();
|
||||
void retranslateUi();
|
||||
|
@ -17,19 +17,18 @@ class ConfigureWeb : public QWidget {
|
||||
|
||||
public:
|
||||
explicit ConfigureWeb(QWidget* parent = nullptr);
|
||||
~ConfigureWeb();
|
||||
~ConfigureWeb() override;
|
||||
|
||||
void applyConfiguration();
|
||||
void retranslateUi();
|
||||
void setConfiguration();
|
||||
|
||||
public slots:
|
||||
private:
|
||||
void RefreshTelemetryID();
|
||||
void OnLoginChanged();
|
||||
void VerifyLogin();
|
||||
void OnLoginVerified();
|
||||
|
||||
private:
|
||||
bool user_verified = true;
|
||||
QFutureWatcher<bool> verify_watcher;
|
||||
|
||||
|
@ -287,6 +287,7 @@ GameList::GameList(GMainWindow* parent) : QWidget{parent} {
|
||||
tree_view->setEditTriggers(QHeaderView::NoEditTriggers);
|
||||
tree_view->setUniformRowHeights(true);
|
||||
tree_view->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
tree_view->setStyleSheet("QTreeView{ border: none; }");
|
||||
|
||||
item_model->insertColumns(0, COLUMN_COUNT);
|
||||
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 std::string& directory,
|
||||
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)
|
||||
return false; // Breaks the callback loop.
|
||||
|
||||
bool is_dir = FileUtil::IsDirectory(physical_name);
|
||||
const std::string physical_name = directory + DIR_SEP + virtual_name;
|
||||
const bool is_dir = FileUtil::IsDirectory(physical_name);
|
||||
if (!is_dir && HasSupportedFileExtension(physical_name)) {
|
||||
std::unique_ptr<Loader::AppLoader> loader = Loader::GetLoader(physical_name);
|
||||
if (!loader)
|
||||
|
Loading…
Reference in New Issue
Block a user