mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 18:24:48 +00:00
Fullscreen mode fixes:
- tabbar & frames respect fullscreen mode when adding/removing new tab. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23291 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f3e89bc3c9
commit
f8ba8db758
@ -1066,6 +1066,12 @@ void GuiWorkArea::setReadOnly(bool)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool GuiWorkArea::isFullScreen()
|
||||||
|
{
|
||||||
|
return lyx_view_ && lyx_view_->isFullScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// TabWorkArea
|
// TabWorkArea
|
||||||
@ -1192,12 +1198,17 @@ GuiWorkArea * TabWorkArea::addWorkArea(Buffer & buffer, GuiView & view)
|
|||||||
wa->setUpdatesEnabled(false);
|
wa->setUpdatesEnabled(false);
|
||||||
// Hide tabbar if there's no tab (avoid a resize and a flashing tabbar
|
// Hide tabbar if there's no tab (avoid a resize and a flashing tabbar
|
||||||
// when hiding it again below).
|
// when hiding it again below).
|
||||||
|
if (!(currentWorkArea() && currentWorkArea()->isFullScreen()))
|
||||||
showBar(count() > 0);
|
showBar(count() > 0);
|
||||||
addTab(wa, wa->windowTitle());
|
addTab(wa, wa->windowTitle());
|
||||||
QObject::connect(wa, SIGNAL(titleChanged(GuiWorkArea *)),
|
QObject::connect(wa, SIGNAL(titleChanged(GuiWorkArea *)),
|
||||||
this, SLOT(updateTabText(GuiWorkArea *)));
|
this, SLOT(updateTabText(GuiWorkArea *)));
|
||||||
|
if (currentWorkArea() && currentWorkArea()->isFullScreen())
|
||||||
|
setFullScreen(true);
|
||||||
|
else
|
||||||
// Hide tabbar if there's only one tab.
|
// Hide tabbar if there's only one tab.
|
||||||
showBar(count() > 1);
|
showBar(count() > 1);
|
||||||
|
|
||||||
return wa;
|
return wa;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1216,6 +1227,9 @@ bool TabWorkArea::removeWorkArea(GuiWorkArea * work_area)
|
|||||||
if (count()) {
|
if (count()) {
|
||||||
// make sure the next work area is enabled.
|
// make sure the next work area is enabled.
|
||||||
currentWidget()->setUpdatesEnabled(true);
|
currentWidget()->setUpdatesEnabled(true);
|
||||||
|
if ((currentWorkArea() && currentWorkArea()->isFullScreen()))
|
||||||
|
setFullScreen(true);
|
||||||
|
else
|
||||||
// Hide tabbar if there's only one tab.
|
// Hide tabbar if there's only one tab.
|
||||||
showBar(count() > 1);
|
showBar(count() > 1);
|
||||||
}
|
}
|
||||||
|
@ -116,6 +116,8 @@ public:
|
|||||||
|
|
||||||
///
|
///
|
||||||
void setFullScreen(bool full_screen);
|
void setFullScreen(bool full_screen);
|
||||||
|
/// is LyXView in fullscreen mode?
|
||||||
|
bool isFullScreen();
|
||||||
///
|
///
|
||||||
void scheduleRedraw() { schedule_redraw_ = true; }
|
void scheduleRedraw() { schedule_redraw_ = true; }
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user