mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-25 11:34:55 +00:00
qt: Save button label setting
This commit is contained in:
parent
23710f397e
commit
70673102fa
@ -180,10 +180,6 @@ bool getShowLabelsUnderIcons() {
|
||||
return showLabelsUnderIcons;
|
||||
}
|
||||
|
||||
bool setShowLabelsUnderIcons() {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string getFullscreenMode() {
|
||||
return fullscreenMode;
|
||||
}
|
||||
@ -431,7 +427,8 @@ void setVblankDiv(u32 value) {
|
||||
void setIsFullscreen(bool enable) {
|
||||
isFullscreen = enable;
|
||||
}
|
||||
static void setShowLabelsUnderIcons(bool enable) {
|
||||
|
||||
void setShowLabelsUnderIcons(bool enable) {
|
||||
showLabelsUnderIcons = enable;
|
||||
}
|
||||
|
||||
@ -882,6 +879,7 @@ void load(const std::filesystem::path& path) {
|
||||
emulator_language = toml::find_or<std::string>(gui, "emulatorLanguage", "en_US");
|
||||
backgroundImageOpacity = toml::find_or<int>(gui, "backgroundImageOpacity", 50);
|
||||
showBackgroundImage = toml::find_or<bool>(gui, "showBackgroundImage", true);
|
||||
showLabelsUnderIcons = toml::find_or<bool>(gui, "showLabels", true);
|
||||
}
|
||||
|
||||
if (data.contains("Settings")) {
|
||||
@ -1096,6 +1094,7 @@ void saveMainWindow(const std::filesystem::path& path) {
|
||||
data["GUI"]["geometry_h"] = main_window_geometry_h;
|
||||
data["GUI"]["elfDirs"] = m_elf_viewer;
|
||||
data["GUI"]["recentFiles"] = m_recent_files;
|
||||
data["GUI"]["showLabels"] = showLabelsUnderIcons;
|
||||
|
||||
// Sorting of TOML sections
|
||||
sortTomlSections(data);
|
||||
|
@ -27,7 +27,6 @@ std::filesystem::path GetSaveDataPath();
|
||||
void setLoadGameSizeEnabled(bool enable);
|
||||
bool getIsFullscreen();
|
||||
bool getShowLabelsUnderIcons();
|
||||
bool setShowLabelsUnderIcons();
|
||||
std::string getFullscreenMode();
|
||||
bool isNeoModeConsole();
|
||||
bool isDevKitConsole();
|
||||
@ -157,6 +156,7 @@ void setMainWindowHeight(u32 height);
|
||||
void setElfViewer(const std::vector<std::string>& elfList);
|
||||
void setRecentFiles(const std::vector<std::string>& recentFiles);
|
||||
void setEmulatorLanguage(std::string language);
|
||||
void setShowLabelsUnderIcons(bool enable);
|
||||
|
||||
u32 getMainWindowGeometryX();
|
||||
u32 getMainWindowGeometryY();
|
||||
|
@ -138,9 +138,8 @@ void MainWindow::PauseGame() {
|
||||
}
|
||||
|
||||
void MainWindow::toggleLabelsUnderIcons() {
|
||||
bool showLabels = ui->toggleLabelsAct->isChecked();
|
||||
Config::setShowLabelsUnderIcons();
|
||||
UpdateToolbarLabels();
|
||||
Config::setShowLabelsUnderIcons(ui->toggleLabelsAct->isChecked());
|
||||
AddUiWidgets();
|
||||
if (isGameRunning) {
|
||||
UpdateToolbarButtons();
|
||||
}
|
||||
@ -187,7 +186,7 @@ void MainWindow::AddUiWidgets() {
|
||||
// add toolbar widgets
|
||||
QApplication::setStyle("Fusion");
|
||||
|
||||
bool showLabels = ui->toggleLabelsAct->isChecked();
|
||||
bool showLabels = Config::getShowLabelsUnderIcons();
|
||||
ui->toolBar->clear();
|
||||
|
||||
ui->toolBar->addWidget(createSpacer(this));
|
||||
@ -280,10 +279,6 @@ void MainWindow::UpdateToolbarButtons() {
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::UpdateToolbarLabels() {
|
||||
AddUiWidgets();
|
||||
}
|
||||
|
||||
void MainWindow::CreateDockWindows() {
|
||||
// place holder widget is needed for good health they say :)
|
||||
QWidget* phCentralWidget = new QWidget(this);
|
||||
|
@ -52,7 +52,6 @@ private Q_SLOTS:
|
||||
private:
|
||||
Ui_MainWindow* ui;
|
||||
void AddUiWidgets();
|
||||
void UpdateToolbarLabels();
|
||||
void UpdateToolbarButtons();
|
||||
QWidget* createButtonWithLabel(QPushButton* button, const QString& labelText, bool showLabel);
|
||||
void CreateActions();
|
||||
|
Loading…
Reference in New Issue
Block a user