author | zecke <zecke> | 2005-03-06 14:04:57 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-03-06 14:04:57 (UTC) |
commit | 125fa91f604cf9b7f3272798e72b6725fca9e23f (patch) (unidiff) | |
tree | f7d328df5173a56254b6d5c8627eb53f897d9ebe | |
parent | fe51b2ed0ec3bccbcac880623123d2abc5d71a4e (diff) | |
download | opie-125fa91f604cf9b7f3272798e72b6725fca9e23f.zip opie-125fa91f604cf9b7f3272798e72b6725fca9e23f.tar.gz opie-125fa91f604cf9b7f3272798e72b6725fca9e23f.tar.bz2 |
-When going back from BigScreen to SmallScreen we resize the widgetstack,
show it and raise the 'main widget'
This should fix all bugs alwin spotted while deploying OWidgetStack
on Opie-Eye
-rw-r--r-- | libopie2/opieui/big-screen/owidgetstack.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libopie2/opieui/big-screen/owidgetstack.cpp b/libopie2/opieui/big-screen/owidgetstack.cpp index 00194b4..ac46cca 100644 --- a/libopie2/opieui/big-screen/owidgetstack.cpp +++ b/libopie2/opieui/big-screen/owidgetstack.cpp | |||
@@ -308,9 +308,9 @@ void OWidgetStack::hideWidget( QWidget* wid) { | |||
308 | raiseWidget( wid ); | 308 | raiseWidget( wid ); |
309 | } | 309 | } |
310 | 310 | ||
311 | 311 | ||
312 | bool OWidgetStack::eventFilter( QObject* obj, QEvent* e) { | 312 | bool OWidgetStack::eventFilter( QObject*, QEvent* e) { |
313 | if ( e->type() == QEvent::Resize && !m_forced ) { | 313 | if ( e->type() == QEvent::Resize && !m_forced ) { |
314 | QResizeEvent *res = static_cast<QResizeEvent*>( e ); | 314 | QResizeEvent *res = static_cast<QResizeEvent*>( e ); |
315 | QSize size = res->size(); | 315 | QSize size = res->size(); |
316 | if ( size.width() >= mode_size ) | 316 | if ( size.width() >= mode_size ) |
@@ -387,8 +387,10 @@ void OWidgetStack::switchStack() { | |||
387 | } | 387 | } |
388 | 388 | ||
389 | m_mode = SmallScreen; | 389 | m_mode = SmallScreen; |
390 | m_stack = new QWidgetStack(this); | 390 | m_stack = new QWidgetStack(this); |
391 | m_stack->setGeometry( frameRect() ); | ||
392 | m_stack->show(); | ||
391 | 393 | ||
392 | connect(m_stack, SIGNAL(aboutToShow(QWidget*) ), | 394 | connect(m_stack, SIGNAL(aboutToShow(QWidget*) ), |
393 | this, SIGNAL(aboutToShow(QWidget*) ) ); | 395 | this, SIGNAL(aboutToShow(QWidget*) ) ); |
394 | connect(m_stack, SIGNAL(aboutToShow(int) ), | 396 | connect(m_stack, SIGNAL(aboutToShow(int) ), |
@@ -401,8 +403,11 @@ void OWidgetStack::switchStack() { | |||
401 | QMap<int, QWidget*>::Iterator it = m_list.begin(); | 403 | QMap<int, QWidget*>::Iterator it = m_list.begin(); |
402 | for ( ; it != m_list.end(); ++it ) | 404 | for ( ; it != m_list.end(); ++it ) |
403 | m_stack->addWidget( it.data(), it.key() ); | 405 | m_stack->addWidget( it.data(), it.key() ); |
404 | 406 | ||
407 | if ( m_mWidget ) | ||
408 | m_stack->raiseWidget( m_mWidget ); | ||
409 | |||
405 | 410 | ||
406 | } | 411 | } |
407 | 412 | ||
408 | /* | 413 | /* |