mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 11:52:25 +00:00
- Cleanup splash screen
- fix bug when no Buffer. - hide scrollbar when no buffer git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15862 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6791434f05
commit
e34ad6ade0
@ -129,20 +129,12 @@ void WorkArea::startBlinkingCursor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void WorkArea::checkAndGreyOut()
|
|
||||||
{
|
|
||||||
if (greyed_out_)
|
|
||||||
greyOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void WorkArea::redraw(bool singlePar)
|
void WorkArea::redraw(bool singlePar)
|
||||||
{
|
{
|
||||||
if (!buffer_view_)
|
if (!buffer_view_ || !buffer_view_->buffer()) {
|
||||||
return;
|
greyed_out_ = true;
|
||||||
|
// The argument here are meaningless.
|
||||||
if (!buffer_view_->buffer()) {
|
expose(1,1,1,1);
|
||||||
checkAndGreyOut();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,13 +249,6 @@ void WorkArea::scrollBufferView(int position)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void WorkArea::greyOut()
|
|
||||||
{
|
|
||||||
greyed_out_ = true;
|
|
||||||
expose(4, 5, 3, 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void WorkArea::showCursor()
|
void WorkArea::showCursor()
|
||||||
{
|
{
|
||||||
if (cursor_visible_)
|
if (cursor_visible_)
|
||||||
|
@ -85,14 +85,10 @@ public:
|
|||||||
/// redraw the screen, without using existing pixmap
|
/// redraw the screen, without using existing pixmap
|
||||||
virtual void redraw(bool singlePar = false);
|
virtual void redraw(bool singlePar = false);
|
||||||
///
|
///
|
||||||
void checkAndGreyOut();
|
|
||||||
///
|
|
||||||
void stopBlinkingCursor();
|
void stopBlinkingCursor();
|
||||||
void startBlinkingCursor();
|
void startBlinkingCursor();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// grey out (no buffer)
|
|
||||||
virtual void greyOut();
|
|
||||||
///
|
///
|
||||||
void processKeySym(LyXKeySymPtr key, key_modifier::state state);
|
void processKeySym(LyXKeySymPtr key, key_modifier::state state);
|
||||||
/// cause the display of the given area of the work area
|
/// cause the display of the given area of the work area
|
||||||
|
@ -545,7 +545,6 @@ void GuiWorkArea::update(int x, int y, int w, int h)
|
|||||||
|
|
||||||
void GuiWorkArea::doGreyOut(QLPainter & pain)
|
void GuiWorkArea::doGreyOut(QLPainter & pain)
|
||||||
{
|
{
|
||||||
greyed_out_ = true;
|
|
||||||
pain.fillRectangle(0, 0, width(), height(),
|
pain.fillRectangle(0, 0, width(), height(),
|
||||||
LColor::bottomarea);
|
LColor::bottomarea);
|
||||||
|
|
||||||
@ -600,26 +599,19 @@ void GuiWorkArea::paintEvent(QPaintEvent * ev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void GuiWorkArea::expose(int x, int y, int w, int h)
|
void GuiWorkArea::expose(int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
QLPainter pain(&screen_);
|
QLPainter pain(&screen_);
|
||||||
|
|
||||||
if (w == 3) { // FIXME HACK
|
if (greyed_out_) {
|
||||||
// Assume splash screen drawing is requested when
|
|
||||||
// width == 3
|
|
||||||
lyxerr << "splash screen requested" << endl;
|
lyxerr << "splash screen requested" << endl;
|
||||||
|
verticalScrollBar()->hide();
|
||||||
doGreyOut(pain);
|
doGreyOut(pain);
|
||||||
}
|
update(0, 0, width(), height());
|
||||||
else if (!buffer_view_->buffer()) {
|
return;
|
||||||
lyxerr << "no buffer: " << endl;
|
|
||||||
doGreyOut(pain);
|
|
||||||
updateScrollbar();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
paintText(*buffer_view_, pain);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
paintText(*buffer_view_, pain);
|
||||||
update(x, y, w, h);
|
update(x, y, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user