summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiemm/oimagescrollview.cpp5
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.cpp5
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp13
3 files changed, 15 insertions, 8 deletions
diff --git a/libopie2/opiemm/oimagescrollview.cpp b/libopie2/opiemm/oimagescrollview.cpp
index 10da823..76f50e1 100644
--- a/libopie2/opiemm/oimagescrollview.cpp
+++ b/libopie2/opiemm/oimagescrollview.cpp
@@ -206,4 +206,5 @@ void OImageScrollView::setAutoScale(bool how)
loadJpeg(true);
}
+ _newImage = true;
generateImage();
}
@@ -349,6 +350,8 @@ void OImageScrollView::rotate_into_data(Rotation r)
void OImageScrollView::apply_gamma(int aValue)
{
- if (!_image_data.size().isValid()) return;
+ if (aValue==0 || !_image_data.size().isValid()) return;
float percent = ((float)aValue/100.0);
+ /* make sure working on a copy */
+ _image_data.detach();
int segColors = _image_data.depth() > 8 ? 256 : _image_data.numColors();
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp
index 994fe12..b919ca8 100644
--- a/noncore/graphics/opie-eye/gui/imageview.cpp
+++ b/noncore/graphics/opie-eye/gui/imageview.cpp
@@ -47,4 +47,5 @@ ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name
connect( m_sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ),
this, SLOT( systemMessage(const QCString&,const QByteArray&) ) );
+ setKeyCompression(true);
}
@@ -67,9 +68,7 @@ void ImageView::systemMessage( const QCString& msg, const QByteArray& data )
int _newrotation;
QDataStream stream( data, IO_ReadOnly );
- odebug << "received system message: " << msg << oendl;
if ( msg == "setCurrentRotation(int)" )
{
stream >> _newrotation;
- odebug << "received setCurrentRotation(" << _newrotation << ")" << oendl;
if (!fullScreen()) {
m_rotation = _newrotation;
@@ -237,5 +236,4 @@ void ImageView::contentsMousePressEvent ( QMouseEvent * e)
return OImageScrollView::contentsMousePressEvent(e);
}
- odebug << "Popup " << oendl;
QPopupMenu *m = new QPopupMenu(this);
if (!m) return;
@@ -290,5 +288,4 @@ void ImageView::focusInEvent(QFocusEvent *)
{
// Always do it here, no matter the size.
- odebug << "Focus in (view)" << oendl;
//if (fullScreen()) parentWidget()->showNormal();
if (m_ignore_next_in){m_ignore_next_in=false;return;}
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 4ee252f..3efbb53 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -650,4 +650,5 @@ void PMainWindow::setupActions()
m_DecBrightness = new QAction(tr("Decrease brightness by 5"),Resource::loadIconSet( "down" ),0, 0, this, 0, false);
m_hBright = new QActionGroup(this,"actioncollection",false),
+ m_hBright->insert(m_setCurrentBrightness);
m_hBright->insert(m_IncBrightness);
m_hBright->insert(m_DecBrightness);
@@ -659,8 +660,17 @@ void PMainWindow::setupBrightness()
return;
}
+ bool reshow=false;
+ if (m_disp->isVisible()&&m_disp->fullScreen()) {
+ m_disp->hide();
+ reshow = true;
+ }
int lb = m_disp->Intensity();
if (Valuebox(0,-100,100,lb,lb)) {
m_disp->setIntensity(lb,true);
}
+ if (reshow) {
+ m_disp->showFullScreen();
+ qwsDisplay()->requestFocus( m_disp->winId(), TRUE);
+ }
}
@@ -684,5 +694,4 @@ void PMainWindow::setupToolbar()
m_aShowInfo->addTo(toolBar);
m_aTrash->addTo(toolBar);
-// m_aSetup->addTo(toolBar);
m_gDisplayType->addTo(toolBar);
@@ -731,6 +740,4 @@ void PMainWindow::setupMenu()
dispMenu->insertSeparator();
m_gPrevNext->addTo(dispMenu);
- m_setCurrentBrightness->addTo(dispMenu);
- m_setCurrentBrightness->setEnabled(false);
dispMenu->insertSeparator();
m_hBright->addTo(dispMenu);