mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
Qt: add reset button to game window title and center the label
This commit is contained in:
parent
c1bdaccd8c
commit
b5ed73ebe0
2 changed files with 32 additions and 8 deletions
|
@ -1355,6 +1355,13 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
|
|||
}
|
||||
});
|
||||
|
||||
connect(ui->reset_button_game_window_title_format, &QAbstractButton::clicked, [this, game]()
|
||||
{
|
||||
const std::string default_game_title_format = xemu_settings->GetSettingDefault(emu_settings::WindowTitleFormat);
|
||||
xemu_settings->SetSetting(emu_settings::WindowTitleFormat, default_game_title_format);
|
||||
ui->label_game_window_title_format->setText(qstr(default_game_title_format));
|
||||
});
|
||||
|
||||
// Load and apply the configured game window title format
|
||||
ui->label_game_window_title_format->setText(qstr(xemu_settings->GetSetting(emu_settings::WindowTitleFormat)));
|
||||
|
||||
|
|
|
@ -2271,17 +2271,34 @@
|
|||
<property name="text">
|
||||
<string>FPS: 60 | Renderer | Version | Game [ID]</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="edit_button_game_window_title_format">
|
||||
<property name="toolTip">
|
||||
<string>Reset the title to default</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="layout_buttons_game_window_title">
|
||||
<item>
|
||||
<widget class="QPushButton" name="reset_button_game_window_title_format">
|
||||
<property name="toolTip">
|
||||
<string>Reset the game window title to default</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="edit_button_game_window_title_format">
|
||||
<property name="toolTip">
|
||||
<string>Edit the game window title</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
|
Loading…
Add table
Reference in a new issue