Trophy: Save dialog state (#3729)

* Trophy: Save dialog state and add show type settings

* SaveDataManager: Save Dialog State

* SaveDataList: Minor Optimization

* Qt: Save icon size on mouseevent resizes

it's a bit slower than using the slider because it saves every single resize. But better than not saving at all for now

* SaveData: Optimize saving to settings a bit

No Saving needed there

* Qt: get rid of all-uppercase enums and namespaces

* Qt/Linux: adjust remaining DX12 tooltip

* Qt: prevent dockwidget contextmenu
This commit is contained in:
Megamouse 2017-11-22 12:11:59 +01:00 committed by Ivan
parent de465cb941
commit fb52cbb8b2
24 changed files with 607 additions and 436 deletions

View file

@ -87,7 +87,7 @@ void rpcs3_app::Init()
// Create the thumbnail toolbar after the main_window is created
RPCS3MainWin->CreateThumbnailToolbar();
if (guiSettings->GetValue(GUI::ib_show_welcome).toBool())
if (guiSettings->GetValue(gui::ib_show_welcome).toBool())
{
welcome_dialog* welcome = new welcome_dialog();
welcome->exec();
@ -160,13 +160,13 @@ void rpcs3_app::InitializeCallbacks()
int w = size.first;
int h = size.second;
if (guiSettings->GetValue(GUI::gs_resize).toBool())
if (guiSettings->GetValue(gui::gs_resize).toBool())
{
w = guiSettings->GetValue(GUI::gs_width).toInt();
h = guiSettings->GetValue(GUI::gs_height).toInt();
w = guiSettings->GetValue(gui::gs_width).toInt();
h = guiSettings->GetValue(gui::gs_height).toInt();
}
bool disableMouse = guiSettings->GetValue(GUI::gs_disableMouse).toBool();
bool disableMouse = guiSettings->GetValue(gui::gs_disableMouse).toBool();
switch (video_renderer type = g_cfg.video.renderer)
{
@ -292,38 +292,38 @@ void rpcs3_app::OnChangeStyleSheetRequest(const QString& sheetFilePath)
};
// toolbar color stylesheet
QString rgba_tool_bar = rgba(GUI::mw_tool_bar_color);
QString rgba_tool_bar = rgba(gui::mw_tool_bar_color);
QString style_toolbar = QString
(
"QLineEdit#mw_searchbar { margin-left:14px; background-color: " + rgba_tool_bar + " }"
"QToolBar#mw_toolbar { background-color: " + rgba_tool_bar + " }"
"QToolBar#mw_toolbar QSlider { background-color: " + rgba_tool_bar + " }"
"QToolBar#mw_toolbar::separator { background-color: " + rgba(GUI::mw_tool_bar_color, -20) + " width: 1px; margin-top: 2px; margin-bottom: 2px; }"
"QToolBar#mw_toolbar::separator { background-color: " + rgba(gui::mw_tool_bar_color, -20) + " width: 1px; margin-top: 2px; margin-bottom: 2px; }"
);
// toolbar icon color stylesheet
QString style_toolbar_icons = QString
(
"QLabel#toolbar_icon_color { color: " + rgba(GUI::mw_tool_icon_color) + " }"
"QLabel#toolbar_icon_color { color: " + rgba(gui::mw_tool_icon_color) + " }"
);
// thumbnail icon color stylesheet
QString style_thumbnail_icons = QString
(
"QLabel#thumbnail_icon_color { color: " + rgba(GUI::mw_thumb_icon_color) + " }"
"QLabel#thumbnail_icon_color { color: " + rgba(gui::mw_thumb_icon_color) + " }"
);
// gamelist toolbar stylesheet
QString style_gamelist_toolbar = QString
(
"QLineEdit#tb_searchbar { background: transparent; }"
"QLabel#gamelist_toolbar_icon_color { color: " + rgba(GUI::gl_tool_icon_color) + " }"
"QLabel#gamelist_toolbar_icon_color { color: " + rgba(gui::gl_tool_icon_color) + " }"
);
// gamelist icon color stylesheet
QString style_gamelist_icons = QString
(
"QLabel#gamelist_icon_background_color { color: " + rgba(GUI::gl_icon_color) + " }"
"QLabel#gamelist_icon_background_color { color: " + rgba(gui::gl_icon_color) + " }"
);
// log stylesheet
@ -366,7 +366,7 @@ void rpcs3_app::OnChangeStyleSheetRequest(const QString& sheetFilePath)
setStyleSheet(file.readAll());
file.close();
}
GUI::stylesheet = styleSheet();
gui::stylesheet = styleSheet();
RPCS3MainWin->RepaintGui();
}