summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/main.cpp
diff options
context:
space:
mode:
authorKingcom <sorgts@googlemail.com>2015-01-06 16:09:30 +0100
committerKingcom <sorgts@googlemail.com>2015-01-20 22:50:24 +0100
commit76c74ffc9633a9c69062f0477f84592fb899203a (patch)
treeef1f5d5028a0835c4ce794fe0241e6841a4a932c /src/citra_qt/main.cpp
parentMerge pull request #402 from chrisvj/master (diff)
downloadyuzu-76c74ffc9633a9c69062f0477f84592fb899203a.tar
yuzu-76c74ffc9633a9c69062f0477f84592fb899203a.tar.gz
yuzu-76c74ffc9633a9c69062f0477f84592fb899203a.tar.bz2
yuzu-76c74ffc9633a9c69062f0477f84592fb899203a.tar.lz
yuzu-76c74ffc9633a9c69062f0477f84592fb899203a.tar.xz
yuzu-76c74ffc9633a9c69062f0477f84592fb899203a.tar.zst
yuzu-76c74ffc9633a9c69062f0477f84592fb899203a.zip
Diffstat (limited to '')
-rw-r--r--src/citra_qt/main.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index c6671bef1..3e7b5ddfe 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -114,6 +114,9 @@ GMainWindow::GMainWindow()
ui.action_Single_Window_Mode->setChecked(settings.value("singleWindowMode", true).toBool());
ToggleWindowMode();
+ ui.actionDisplay_widget_title_bars->setChecked(settings.value("displayTitleBars", true).toBool());
+ OnDisplayTitleBars(ui.actionDisplay_widget_title_bars->isChecked());
+
// Setup connections
connect(ui.action_Load_File, SIGNAL(triggered()), this, SLOT(OnMenuLoadFile()));
connect(ui.action_Load_Symbol_Map, SIGNAL(triggered()), this, SLOT(OnMenuLoadSymbolMap()));
@@ -156,6 +159,27 @@ GMainWindow::~GMainWindow()
Pica::g_debug_context.reset();
}
+void GMainWindow::OnDisplayTitleBars(bool show)
+{
+ QList<QDockWidget*> widgets = findChildren<QDockWidget*>();
+
+ if (show) {
+ for (QDockWidget* widget: widgets) {
+ QWidget* old = widget->titleBarWidget();
+ widget->setTitleBarWidget(nullptr);
+ if (old != nullptr)
+ delete old;
+ }
+ } else {
+ for (QDockWidget* widget: widgets) {
+ QWidget* old = widget->titleBarWidget();
+ widget->setTitleBarWidget(new QWidget());
+ if (old != nullptr)
+ delete old;
+ }
+ }
+}
+
void GMainWindow::BootGame(std::string filename)
{
LOG_INFO(Frontend, "Citra starting...\n");
@@ -259,6 +283,7 @@ void GMainWindow::closeEvent(QCloseEvent* event)
settings.setValue("state", saveState());
settings.setValue("geometryRenderWindow", render_window->saveGeometry());
settings.setValue("singleWindowMode", ui.action_Single_Window_Mode->isChecked());
+ settings.setValue("displayTitleBars", ui.actionDisplay_widget_title_bars->isChecked());
settings.setValue("firstStart", false);
SaveHotkeys(settings);