improve resizing

This commit is contained in:
Andrzej Rybczak
2009-02-16 00:37:03 +01:00
parent f9cdfa5d2b
commit ba6c2db0b1
16 changed files with 82 additions and 78 deletions

View File

@@ -56,10 +56,9 @@ void Clock::Resize()
if (Width <= size_t(COLS) && Height <= main_height)
{
w->MoveTo((COLS-Width)/2, (LINES-Height)/2);
if (myScreen == myClock)
if (myScreen == this)
{
myPlaylist->Main()->Hide();
Prepare();
w->Display();
}
}
@@ -75,6 +74,9 @@ void Clock::SwitchTo()
if (myScreen == this)
return;
if (hasToBeResized)
Resize();
CLEAR_FIND_HISTORY;
myScreen = this;
myPlaylist->Main()->Hide();