Allow statusbar to be set on or off in full screen mode as a

preference.
This commit is contained in:
Prannoy Pilligundla 2014-02-25 20:48:56 -05:00 committed by Richard Heck
parent bd79001387
commit 214f7ed262
6 changed files with 38 additions and 1 deletions

View File

@ -1339,6 +1339,14 @@ contributors = [
"6 April 2005", "6 April 2005",
u"Better support for serbian and serbocroatian"), u"Better support for serbian and serbocroatian"),
contributor(u"Prannoy Pilligundla",
"prannoy.bits () gmail ! com",
"GPL",
"Contribution license",
"m=139332446711707",
"25 February 2014",
u"Full screen statusbar toggling"),
contributor(u"Geoffroy Piroux", contributor(u"Geoffroy Piroux",
"piroux () fyma ! ucl ! ac ! be", "piroux () fyma ! ucl ! ac ! be",
"", "",

View File

@ -110,6 +110,7 @@ LexerKeyword lyxrcTags[] = {
{ "\\fullscreen_limit", LyXRC::RC_FULL_SCREEN_LIMIT }, { "\\fullscreen_limit", LyXRC::RC_FULL_SCREEN_LIMIT },
{ "\\fullscreen_menubar", LyXRC::RC_FULL_SCREEN_MENUBAR }, { "\\fullscreen_menubar", LyXRC::RC_FULL_SCREEN_MENUBAR },
{ "\\fullscreen_scrollbar", LyXRC::RC_FULL_SCREEN_SCROLLBAR }, { "\\fullscreen_scrollbar", LyXRC::RC_FULL_SCREEN_SCROLLBAR },
{ "\\fullscreen_statusbar", LyXRC::RC_FULL_SCREEN_STATUSBAR },
{ "\\fullscreen_tabbar", LyXRC::RC_FULL_SCREEN_TABBAR }, { "\\fullscreen_tabbar", LyXRC::RC_FULL_SCREEN_TABBAR },
{ "\\fullscreen_toolbars", LyXRC::RC_FULL_SCREEN_TOOLBARS }, { "\\fullscreen_toolbars", LyXRC::RC_FULL_SCREEN_TOOLBARS },
{ "\\fullscreen_width", LyXRC::RC_FULL_SCREEN_WIDTH }, { "\\fullscreen_width", LyXRC::RC_FULL_SCREEN_WIDTH },
@ -1237,6 +1238,9 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format)
case RC_FULL_SCREEN_SCROLLBAR: case RC_FULL_SCREEN_SCROLLBAR:
lexrc >> full_screen_scrollbar; lexrc >> full_screen_scrollbar;
break; break;
case RC_FULL_SCREEN_STATUSBAR:
lexrc >> full_screen_statusbar;
break;
case RC_FULL_SCREEN_TABBAR: case RC_FULL_SCREEN_TABBAR:
lexrc >> full_screen_tabbar; lexrc >> full_screen_tabbar;
break; break;
@ -1945,6 +1949,15 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
} }
if (tag != RC_LAST) if (tag != RC_LAST)
break; break;
case RC_FULL_SCREEN_STATUSBAR:
if (ignore_system_lyxrc ||
full_screen_statusbar != system_lyxrc.full_screen_statusbar) {
os << "\\fullscreen_statusbar "
<< convert<string>(full_screen_statusbar)
<< '\n';
}
if (tag != RC_LAST)
break;
case RC_FULL_SCREEN_TABBAR: case RC_FULL_SCREEN_TABBAR:
if (ignore_system_lyxrc || if (ignore_system_lyxrc ||
full_screen_tabbar != system_lyxrc.full_screen_tabbar) { full_screen_tabbar != system_lyxrc.full_screen_tabbar) {
@ -3061,6 +3074,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
case LyXRC::RC_FULL_SCREEN_LIMIT: case LyXRC::RC_FULL_SCREEN_LIMIT:
case LyXRC::RC_FULL_SCREEN_SCROLLBAR: case LyXRC::RC_FULL_SCREEN_SCROLLBAR:
case LyXRC::RC_FULL_SCREEN_MENUBAR: case LyXRC::RC_FULL_SCREEN_MENUBAR:
case LyXRC::RC_FULL_SCREEN_STATUSBAR:
case LyXRC::RC_FULL_SCREEN_TABBAR: case LyXRC::RC_FULL_SCREEN_TABBAR:
case LyXRC::RC_FULL_SCREEN_TOOLBARS: case LyXRC::RC_FULL_SCREEN_TOOLBARS:
case LyXRC::RC_FULL_SCREEN_WIDTH: case LyXRC::RC_FULL_SCREEN_WIDTH:

View File

@ -86,6 +86,7 @@ public:
RC_FORWARD_SEARCH_PDF, RC_FORWARD_SEARCH_PDF,
RC_FULL_SCREEN_LIMIT, RC_FULL_SCREEN_LIMIT,
RC_FULL_SCREEN_SCROLLBAR, RC_FULL_SCREEN_SCROLLBAR,
RC_FULL_SCREEN_STATUSBAR,
RC_FULL_SCREEN_TABBAR, RC_FULL_SCREEN_TABBAR,
RC_FULL_SCREEN_MENUBAR, RC_FULL_SCREEN_MENUBAR,
RC_FULL_SCREEN_TOOLBARS, RC_FULL_SCREEN_TOOLBARS,
@ -499,6 +500,8 @@ public:
bool full_screen_tabbar; bool full_screen_tabbar;
/// Toggle menubar in fullscreen mode? /// Toggle menubar in fullscreen mode?
bool full_screen_menubar; bool full_screen_menubar;
/// Toggle statusbar in fullscreen mode?
bool full_screen_statusbar;
/// Limit the text width? /// Limit the text width?
bool full_screen_limit; bool full_screen_limit;
/// Width of limited screen (in pixels) in fullscreen mode /// Width of limited screen (in pixels) in fullscreen mode

View File

@ -2723,6 +2723,8 @@ PrefEdit::PrefEdit(GuiPreferences * form)
this, SIGNAL(changed())); this, SIGNAL(changed()));
connect(toggleScrollbarCB, SIGNAL(toggled(bool)), connect(toggleScrollbarCB, SIGNAL(toggled(bool)),
this, SIGNAL(changed())); this, SIGNAL(changed()));
connect(toggleStatusbarCB, SIGNAL(toggled(bool)),
this, SIGNAL(changed()));
connect(toggleToolbarsCB, SIGNAL(toggled(bool)), connect(toggleToolbarsCB, SIGNAL(toggled(bool)),
this, SIGNAL(changed())); this, SIGNAL(changed()));
} }
@ -2743,6 +2745,7 @@ void PrefEdit::apply(LyXRC & rc) const
rc.cursor_width = cursorWidthSB->value(); rc.cursor_width = cursorWidthSB->value();
rc.full_screen_toolbars = toggleToolbarsCB->isChecked(); rc.full_screen_toolbars = toggleToolbarsCB->isChecked();
rc.full_screen_scrollbar = toggleScrollbarCB->isChecked(); rc.full_screen_scrollbar = toggleScrollbarCB->isChecked();
rc.full_screen_statusbar = toggleStatusbarCB->isChecked();
rc.full_screen_tabbar = toggleTabbarCB->isChecked(); rc.full_screen_tabbar = toggleTabbarCB->isChecked();
rc.full_screen_menubar = toggleMenubarCB->isChecked(); rc.full_screen_menubar = toggleMenubarCB->isChecked();
rc.full_screen_width = fullscreenWidthSB->value(); rc.full_screen_width = fullscreenWidthSB->value();
@ -2760,6 +2763,7 @@ void PrefEdit::update(LyXRC const & rc)
macroEditStyleCO->setCurrentIndex(rc.macro_edit_style); macroEditStyleCO->setCurrentIndex(rc.macro_edit_style);
cursorWidthSB->setValue(rc.cursor_width); cursorWidthSB->setValue(rc.cursor_width);
toggleScrollbarCB->setChecked(rc.full_screen_scrollbar); toggleScrollbarCB->setChecked(rc.full_screen_scrollbar);
toggleScrollbarCB->setChecked(rc.full_screen_statusbar);
toggleToolbarsCB->setChecked(rc.full_screen_toolbars); toggleToolbarsCB->setChecked(rc.full_screen_toolbars);
toggleTabbarCB->setChecked(rc.full_screen_tabbar); toggleTabbarCB->setChecked(rc.full_screen_tabbar);
toggleMenubarCB->setChecked(rc.full_screen_menubar); toggleMenubarCB->setChecked(rc.full_screen_menubar);

View File

@ -3879,7 +3879,8 @@ void GuiView::toggleFullScreen()
setContentsMargins(-2, -2, -2, -2); setContentsMargins(-2, -2, -2, -2);
saveLayout(); saveLayout();
setWindowState(windowState() ^ Qt::WindowFullScreen); setWindowState(windowState() ^ Qt::WindowFullScreen);
statusBar()->hide(); if (lyxrc.full_screen_statusbar)
statusBar()->hide();
if (lyxrc.full_screen_menubar) if (lyxrc.full_screen_menubar)
menuBar()->hide(); menuBar()->hide();
if (lyxrc.full_screen_toolbars) { if (lyxrc.full_screen_toolbars) {

View File

@ -197,6 +197,13 @@
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="4" column="0">
<widget class="QCheckBox" name="toggleStatusbarCB">
<property name="text">
<string>Hide sta&amp;tusbar</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QGroupBox" name="fullscreenLimitGB"> <widget class="QGroupBox" name="fullscreenLimitGB">
<property name="title"> <property name="title">
<string>&amp;Limit text width</string> <string>&amp;Limit text width</string>