Rssguard now remembers fullscreen settings.
This commit is contained in:
parent
609a0c81b1
commit
ca916c847b
@ -38,12 +38,12 @@ CREATE TABLE IF NOT EXISTS Feeds (
|
||||
DROP TABLE IF EXISTS FeedsData;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS FeedsData (
|
||||
id INTEGER NOT NULL,
|
||||
feed_id INTEGER NOT NULL,
|
||||
key TEXT NOT NULL,
|
||||
value TEXT,
|
||||
|
||||
PRIMARY KEY (id, key),
|
||||
FOREIGN KEY (id) REFERENCES Feeds (id)
|
||||
PRIMARY KEY (feed_id, key),
|
||||
FOREIGN KEY (feed_id) REFERENCES Feeds (id)
|
||||
);
|
||||
-- !
|
||||
DROP TABLE IF EXISTS Messages;
|
||||
|
@ -36,12 +36,12 @@ CREATE TABLE IF NOT EXISTS Feeds (
|
||||
DROP TABLE IF EXISTS FeedsData;
|
||||
-- !
|
||||
CREATE TABLE IF NOT EXISTS FeedsData (
|
||||
id INTEGER NOT NULL,
|
||||
feed_id INTEGER NOT NULL,
|
||||
key TEXT NOT NULL,
|
||||
value TEXT,
|
||||
|
||||
PRIMARY KEY (id, key),
|
||||
FOREIGN KEY (id) REFERENCES Feeds (id)
|
||||
PRIMARY KEY (feed_id, key),
|
||||
FOREIGN KEY (feed_id) REFERENCES Feeds (id)
|
||||
);
|
||||
-- !
|
||||
DROP TABLE IF EXISTS Messages;
|
||||
|
@ -128,8 +128,8 @@ void FormMain::quit() {
|
||||
qApp->quit();
|
||||
}
|
||||
|
||||
void FormMain::switchFullscreenMode(bool turn_fullscreen_on) {
|
||||
if (turn_fullscreen_on) {
|
||||
void FormMain::switchFullscreenMode() {
|
||||
if (!isFullScreen()) {
|
||||
showFullScreen();
|
||||
} else {
|
||||
showNormal();
|
||||
@ -256,6 +256,12 @@ void FormMain::loadSize() {
|
||||
"window_position",
|
||||
screen.center() - rect().center()).toPoint());
|
||||
|
||||
// If user exited the application while in fullsreen mode,
|
||||
// then re-enable it now.
|
||||
if (settings->value(APP_CFG_GUI, "start_in_fullscreen", false).toBool()) {
|
||||
switchFullscreenMode();
|
||||
}
|
||||
|
||||
// Adjust dimensions of "feeds & messages" widget.
|
||||
m_ui->m_tabWidget->feedMessageViewer()->loadSize();
|
||||
}
|
||||
@ -265,6 +271,8 @@ void FormMain::saveSize() {
|
||||
|
||||
settings->setValue(APP_CFG_GUI, "window_position", pos());
|
||||
settings->setValue(APP_CFG_GUI, "window_size", size());
|
||||
settings->setValue(APP_CFG_GUI, "start_in_fullscreen", isFullScreen());
|
||||
|
||||
m_ui->m_tabWidget->feedMessageViewer()->saveSize();
|
||||
}
|
||||
|
||||
@ -283,7 +291,7 @@ void FormMain::createConnections() {
|
||||
connect(m_ui->m_actionQuit, SIGNAL(triggered()), this, SLOT(quit()));
|
||||
|
||||
// Menu "View" connections.
|
||||
connect(m_ui->m_actionFullscreen, SIGNAL(triggered(bool)), this, SLOT(switchFullscreenMode(bool)));
|
||||
connect(m_ui->m_actionFullscreen, SIGNAL(triggered()), this, SLOT(switchFullscreenMode()));
|
||||
|
||||
// Menu "Tools" connections.
|
||||
connect(m_ui->m_actionSettings, SIGNAL(triggered()), this, SLOT(showSettings()));
|
||||
|
@ -77,7 +77,7 @@ class FormMain : public QMainWindow {
|
||||
void switchVisibility();
|
||||
|
||||
// Turns on/off fullscreen mode
|
||||
void switchFullscreenMode(bool turn_fullscreen_on);
|
||||
void switchFullscreenMode();
|
||||
|
||||
protected slots:
|
||||
// Last-minute reactors.
|
||||
|
@ -187,17 +187,14 @@
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_actionFullscreen">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Fullscreen mode</string>
|
||||
<string>Switch &fullscreen/normal mode</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Switch fullscreen mode.</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string notr="true">Ctrl+Shift+F</string>
|
||||
<string>Ctrl+Shift+F</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_actionAddBrowser">
|
||||
|
Loading…
x
Reference in New Issue
Block a user