summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index a784f5b..58f02ef 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -326,22 +326,23 @@ void PMainWindow::slotToggleFullScreen()
326 m_disp->setFullScreen(current); 326 m_disp->setFullScreen(current);
327 odebug << "Current = " << current << oendl; 327 odebug << "Current = " << current << oendl;
328 if (current) { 328 if (current) {
329 odebug << "full" << oendl; 329 odebug << "full" << oendl;
330 m_disp->setBackgroundColor(black); 330 m_disp->setBackgroundColor(black);
331 if (!tFrame) { 331 if (!tFrame) {
332 tFrame = new QWidget(0,0,WType_TopLevel|WStyle_NoBorder|WStyle_StaysOnTop); 332 tFrame = new QWidget(0,0,WStyle_Customize|WStyle_NoBorder);
333 tFrame->resize(qApp->desktop()->width(), qApp->desktop()->height()); 333 tFrame->resize(qApp->desktop()->width(), qApp->desktop()->height());
334 tFrame->setMinimumSize(qApp->desktop()->width(), qApp->desktop()->height()); 334 tFrame->setMinimumSize(qApp->desktop()->width(), qApp->desktop()->height());
335 } 335 }
336 m_disp->reparent(tFrame,QPoint(0,0)); 336 m_disp->reparent(tFrame,QPoint(0,0));
337 m_disp->setVScrollBarMode(QScrollView::AlwaysOff); 337 m_disp->setVScrollBarMode(QScrollView::AlwaysOff);
338 m_disp->setHScrollBarMode(QScrollView::AlwaysOff); 338 m_disp->setHScrollBarMode(QScrollView::AlwaysOff);
339 m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height()); 339 m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height());
340 tFrame->showFullScreen(); 340 tFrame->showFullScreen();
341 } else { 341 } else {
342 setUpdatesEnabled(false);
342 odebug << "window" << oendl; 343 odebug << "window" << oendl;
343 m_disp->reparent(0,QPoint(0,0)); 344 m_disp->reparent(0,QPoint(0,0));
344 m_disp->showNormal(); 345 m_disp->showNormal();
345 /* don't forget it! */ 346 /* don't forget it! */
346 tFrame->hide(); 347 tFrame->hide();
347 m_disp->setBackgroundColor(white); 348 m_disp->setBackgroundColor(white);
@@ -349,12 +350,13 @@ void PMainWindow::slotToggleFullScreen()
349 m_disp->setVScrollBarMode(QScrollView::Auto); 350 m_disp->setVScrollBarMode(QScrollView::Auto);
350 m_disp->setHScrollBarMode(QScrollView::Auto); 351 m_disp->setHScrollBarMode(QScrollView::Auto);
351 m_stack->raiseWidget(m_disp); 352 m_stack->raiseWidget(m_disp);
352 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { 353 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) {
353 m_disp->resize(m_disp->minimumSize()); 354 m_disp->resize(m_disp->minimumSize());
354 } 355 }
356 setUpdatesEnabled(true);
355 } 357 }
356} 358}
357 359
358/** 360/**
359 * With big Screen the plan could be to 'detach' the image 361 * With big Screen the plan could be to 'detach' the image
360 * window if visible and to create a ne wone 362 * window if visible and to create a ne wone
@@ -424,23 +426,26 @@ void PMainWindow::closeEvent( QCloseEvent* ev ) {
424 } 426 }
425 ev->accept(); 427 ev->accept();
426 QTimer::singleShot(0, qApp, SLOT(closeAllWindows())); 428 QTimer::singleShot(0, qApp, SLOT(closeAllWindows()));
427} 429}
428 430
429void PMainWindow::raiseIconView() { 431void PMainWindow::raiseIconView() {
432 setUpdatesEnabled(false);
430 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { 433 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) {
431 prevButton->hide(); 434 prevButton->hide();
432 nextButton->hide(); 435 nextButton->hide();
433 upButton->show(); 436 upButton->show();
434 fsButton->show(); 437 fsButton->show();
435 viewModeButton->show(); 438 viewModeButton->show();
436 } 439 }
437 if (m_disp && m_disp->fullScreen() && m_disp->isVisible()) { 440 if (m_disp && m_disp->fullScreen() && m_disp->isVisible()) {
438 tFrame->hide(); 441 tFrame->hide();
439 } 442 }
440 m_stack->raiseWidget( IconView ); 443 m_stack->raiseWidget( IconView );
444 setUpdatesEnabled(true);
445 repaint();
441} 446}
442 447
443void PMainWindow::setDocument( const QString& showImg ) { 448void PMainWindow::setDocument( const QString& showImg ) {
444 QString file = showImg; 449 QString file = showImg;
445 DocLnk lnk(showImg); 450 DocLnk lnk(showImg);
446 if (lnk.isValid() ) 451 if (lnk.isValid() )