diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG
index b7f2fb910..a6d5e2d82 100644
--- a/resources/text/CHANGELOG
+++ b/resources/text/CHANGELOG
@@ -3,6 +3,7 @@
Fixed:
+- Simplified hiding of main menu - primarily in source code.
- Fixed size of "normal" window display when fullscreen mode is active on application exit.
- Partially fixed bug #33.
- All datetimes fetched from feeds are now considered to be UTC.
diff --git a/src/gui/formmain.cpp b/src/gui/formmain.cpp
index 640aaf949..542d9c6d2 100755
--- a/src/gui/formmain.cpp
+++ b/src/gui/formmain.cpp
@@ -46,7 +46,7 @@
FormMain *FormMain::s_instance;
FormMain::FormMain(QWidget *parent)
- : QMainWindow(parent), m_ui(new Ui::FormMain), m_mainMenuActivated(false) {
+ : QMainWindow(parent), m_ui(new Ui::FormMain) {
m_ui->setupUi(this);
// Initialize singleton.
@@ -184,8 +184,7 @@ void FormMain::switchFullscreenMode() {
}
void FormMain::switchMainMenu() {
- m_mainMenuActivated = !m_mainMenuActivated;
- m_ui->m_menuBar->setVisible(m_mainMenuActivated);
+ m_ui->m_menuBar->setVisible(m_ui->m_actionSwitchMainMenu->isChecked());
}
void FormMain::switchVisibility() {
@@ -333,8 +332,7 @@ void FormMain::loadSize() {
}
// Hide the main menu if user wants it.
- if (!(m_mainMenuActivated = settings->value(APP_CFG_GUI, "main_menu_visible", true).toBool())) {
- m_mainMenuActivated = !m_mainMenuActivated;
+ if (!settings->value(APP_CFG_GUI, "main_menu_visible", true).toBool()) {
m_ui->m_actionSwitchMainMenu->setChecked(false);
}
@@ -350,7 +348,7 @@ void FormMain::saveSize() {
m_ui->m_actionFullscreen->setChecked(false);
}
- settings->setValue(APP_CFG_GUI, "main_menu_visible", m_mainMenuActivated);
+ settings->setValue(APP_CFG_GUI, "main_menu_visible", m_ui->m_actionSwitchMainMenu->isChecked());
settings->setValue(APP_CFG_GUI, "window_position", pos());
settings->setValue(APP_CFG_GUI, "window_size", size());
settings->setValue(APP_CFG_GUI, "start_in_fullscreen", is_fullscreen);
diff --git a/src/gui/formmain.h b/src/gui/formmain.h
index 563f7c2ba..12ba17d6d 100644
--- a/src/gui/formmain.h
+++ b/src/gui/formmain.h
@@ -118,7 +118,6 @@ class FormMain : public QMainWindow {
Ui::FormMain *m_ui;
QMenu *m_trayMenu;
StatusBar *m_statusBar;
- bool m_mainMenuActivated;
static FormMain *s_instance;
};
diff --git a/src/gui/formmain.ui b/src/gui/formmain.ui
index 6fb6da3d4..66771a84c 100644
--- a/src/gui/formmain.ui
+++ b/src/gui/formmain.ui
@@ -211,7 +211,7 @@
Switch fullscreen mode.
- Ctrl+Shift+F
+ F
@@ -399,7 +399,7 @@
Hides or shows the list of feeds/categories.
- F
+ L