browsercore/appfw/Common/FilmstripFlow.cpp
changeset 3 0954f5dd2cd0
parent 0 1450b09d0cfd
child 12 afcd8e6d025b
--- a/browsercore/appfw/Common/FilmstripFlow.cpp	Fri May 14 15:40:36 2010 +0300
+++ b/browsercore/appfw/Common/FilmstripFlow.cpp	Tue Jun 29 00:46:29 2010 -0400
@@ -1,20 +1,24 @@
 /*
 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, version 2.1 of the License.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
 *
-* Description: 
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program.  If not, 
+* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
 *
+* Description:
+*
+*   FilmstripFlow - animated image show widget
 */
-
 #include <QDebug>
 #include <QImage>
 #include <QPainter>
@@ -222,7 +226,8 @@
     QRectF target = m_movie->movieClip(0);
     int w = target.width();
     int h = target.height();
-    m_name =  qtTrId("txt_browser_windows_new_window");
+    if (m_name.isEmpty())
+        m_name =  qtTrId("txt_browser_windows_new_window");
     m_img = QImage(w, h, QImage::Format_RGB32);
 
     QPainter painter(&m_img);
@@ -1250,7 +1255,7 @@
 */
 void GraphicsFilmstripFlow::setCenterIndex(int i)
 {
-    qDebug() << "!!!Set Center Index:" << i;
+    //qDebug() << "!!!Set Center Index:" << i;
     Q_ASSERT(d);
     if (!d->m_films.size())
         return;
@@ -1646,7 +1651,9 @@
         return;
 
     if(event->pos().x() > ( (size().width() - d->m_centerWindowSize.width())/ 2) &&
-       event->pos().x() < ( (size().width() + d->m_centerWindowSize.width())/ 2) )
+       event->pos().x() < ( (size().width() + d->m_centerWindowSize.width())/ 2) &&
+       event->pos().y() > d->m_centerTopSpace &&
+       event->pos().y() < d->m_centerTopSpace + d->m_centerWindowSize.height())
     {
         emit ok(d->m_centerIndex);
     }