author | alwin <alwin> | 2005-03-23 18:26:46 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-23 18:26:46 (UTC) |
commit | 76ea5ee6e306a4ee9fe6831dbe4c13ee53f6cdf5 (patch) (side-by-side diff) | |
tree | 8269bc37e5d3addf36194e231e84bce8a9e49e8b | |
parent | 73928229c1ed258a78e815d9089667f0d99e72d8 (diff) | |
download | opie-76ea5ee6e306a4ee9fe6831dbe4c13ee53f6cdf5.zip opie-76ea5ee6e306a4ee9fe6831dbe4c13ee53f6cdf5.tar.gz opie-76ea5ee6e306a4ee9fe6831dbe4c13ee53f6cdf5.tar.bz2 |
dirty hack let opie-eye crash
fixed display problems the right way now I hope
ToDo:
fix flicker when switching images in fullscreen mode while window is
visible
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.cpp | 2 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 25 |
2 files changed, 7 insertions, 20 deletions
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index 03df321..6c3f9cb 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp @@ -263,24 +263,24 @@ void ImageView::focusInEvent(QFocusEvent *) void ImageView::hide() { if (fullScreen()) { m_ignore_next_in = true; showNormal(); } QWidget::hide(); } void ImageView::enableFullscreen() { if (!fullScreen()) return; if (m_ignore_next_in) {m_ignore_next_in = false;return;} setUpdatesEnabled(false); // This is needed because showNormal() forcefully changes the window // style to WSTyle_TopLevel. - reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0)); + reparent(0, WStyle_Customize | WStyle_NoBorderEx, QPoint(0,0)); // Enable fullscreen. /* this is the trick - I don't now why, but after a showFullScreen QTE toggles the focus * so we must block it here! */ m_ignore_next_in = true; showFullScreen(); setUpdatesEnabled(true); } diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index 3a89dfd..d11e4e1 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp @@ -294,33 +294,33 @@ void PMainWindow::slotFullScreenButton(bool current) if (autoSave) { m_cfg->writeEntry("fullscreen",current); } if (!m_disp) return; if (m_disp->isVisible()) { setupViewWindow(current, true); } } void PMainWindow::setupViewWindow(bool current, bool forceDisplay) { if (!m_disp) { return; } if (current) { m_disp->setBackgroundColor(black); - m_disp->reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0)); + m_disp->reparent(0, WStyle_Customize | WStyle_NoBorderEx, QPoint(0,0)); m_disp->setVScrollBarMode(QScrollView::AlwaysOff); m_disp->setHScrollBarMode(QScrollView::AlwaysOff); m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height()); m_disp->setFullScreen(current,forceDisplay); } else { setUpdatesEnabled(false); #if 0 if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { //m_disp->setMinimumSize(QApplication::desktop()->size()/2); } else { //m_disp->setMinimumSize(10,10); } #endif m_disp->setBackgroundColor(white); m_stack->addWidget(m_disp,ImageDisplay); @@ -362,72 +362,59 @@ void PMainWindow::slotShowInfo( const QString& inf ) { if (m_SmallWindow) { m_aNext->removeFrom(toolBar); m_aPrevious->removeFrom(toolBar); fsButton->hide(); } m_aNext->setEnabled(false); m_aPrevious->setEnabled(false); m_aDirUp->setEnabled(false); m_aShowInfo->setEnabled(false); m_aViewfile->setEnabled(true); m_aStartSlide->setEnabled(false); m_stack->raiseWidget( ImageInfo ); } void PMainWindow::slotDisplay( const QString& inf ) { bool nwindow = false; - bool disp_hack = false; - int lb; - if (m_disp && m_disp->fullScreen()) { - lb = m_disp->Intensity(); - delete m_disp; - m_disp = 0; - - disp_hack = true; - } if ( !m_disp ) { nwindow = true; initDisp(); - m_disp->setIntensity((disp_hack?lb:m_Intensity)); - } + m_disp->setIntensity(m_Intensity); m_setCurrentBrightness->setEnabled(true); - - Opie::Ui::OWait wdlg; - wdlg.setTimerLength(30); - wdlg.show(); - //qApp->processEvents(20); + } m_disp->setImage( inf ); - wdlg.hide(); - //qApp->processEvents(20); if (m_SmallWindow) { if (m_gPrevNext->isEnabled()==false) { m_gPrevNext->addTo(toolBar); fsButton->hide(); } } m_gPrevNext->setEnabled(true); m_aDirUp->setEnabled(false); m_aShowInfo->setEnabled(true); m_aViewfile->setEnabled(false); m_aStartSlide->setEnabled(false); if (!nwindow && m_disp->fullScreen()!=m_aFullScreen->isOn()) { slotFullScreenToggled(m_aFullScreen->isOn()); } if (m_disp->fullScreen()) { + if (!m_disp->isVisible()) { + m_disp->showFullScreen(); qwsDisplay()->requestFocus( m_disp->winId(), TRUE); + } } else { m_stack->raiseWidget( ImageDisplay ); } } void PMainWindow::raiseIconView() { setUpdatesEnabled(false); if (m_SmallWindow) { m_gPrevNext->removeFrom(toolBar); fsButton->show(); } m_gPrevNext->setEnabled(false); m_aDirUp->setEnabled(true); m_aShowInfo->setEnabled(true); m_aViewfile->setEnabled(true); m_aStartSlide->setEnabled(true); |