From: Igor Nazarov Date: Tue, 22 Aug 2017 15:47:39 +0000 (+0300) Subject: TizenRefApp-9195 [Gallery] Fix issue with starting with wrong image on X-Git-Tag: submit/tizen_4.0/20170911.091032^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c1c4fb659870ba03397e10e11a27c0b0079d4d4;p=profile%2Fwearable%2Fapps%2Fnative%2Fgallery.git TizenRefApp-9195 [Gallery] Fix issue with starting with wrong image on operation VIEW Change-Id: Iea19539a92b30e02f541223b922e938824bd9072 --- diff --git a/gallery/model/impl/helpers.cpp b/gallery/model/impl/helpers.cpp index 8f44793..829005b 100644 --- a/gallery/model/impl/helpers.cpp +++ b/gallery/model/impl/helpers.cpp @@ -22,8 +22,6 @@ namespace gallery { namespace { namespace impl { - constexpr auto UNIQUE_PATH_RESERVE = 10; - int MEDIA_DB_CONNECTION_COUNTER = 0; }}} diff --git a/gallery/presenters/Instance.cpp b/gallery/presenters/Instance.cpp index eb3365a..39c7112 100644 --- a/gallery/presenters/Instance.cpp +++ b/gallery/presenters/Instance.cpp @@ -170,6 +170,7 @@ namespace gallery { if (!m_win->isVisible()) { DLOG("Show the window."); + m_win->resizeToScreen(); show(*m_win); } diff --git a/ucl/include/ucl/gui/Window.h b/ucl/include/ucl/gui/Window.h index 9aa598d..84a15da 100644 --- a/ucl/include/ucl/gui/Window.h +++ b/ucl/include/ucl/gui/Window.h @@ -43,7 +43,7 @@ namespace ucl { Builder &setName(std::string value); Builder &setTitle(std::string value); - Builder &setSetIndicatorVisible(bool value); + Builder &setIndicatorVisible(bool value); Builder &setRotations(std::vector value); Builder &setIsOwner(bool value); @@ -77,6 +77,7 @@ namespace ucl { bool isRotationsSupported() const; void setRotations(const std::vector &value); + void resizeToScreen(); void lower(); private: diff --git a/ucl/include/ucl/gui/Window.hpp b/ucl/include/ucl/gui/Window.hpp index d5b1828..144a5ad 100644 --- a/ucl/include/ucl/gui/Window.hpp +++ b/ucl/include/ucl/gui/Window.hpp @@ -55,7 +55,7 @@ namespace ucl { return *this; } - inline Window::Builder &Window::Builder::setSetIndicatorVisible( + inline Window::Builder &Window::Builder::setIndicatorVisible( const bool value) { m_isIndicatorVisible = value; diff --git a/ucl/source/gui/Window.cpp b/ucl/source/gui/Window.cpp index 3f74e9e..cfa53fd 100644 --- a/ucl/source/gui/Window.cpp +++ b/ucl/source/gui/Window.cpp @@ -75,4 +75,17 @@ namespace ucl { return result; } + + // Window // + + void Window::resizeToScreen() + { + int w = 0; + int h = 0; + getScreenSize(&w, &h); + if ((w > 0) && (h > 0)) { + setGeometry(0, 0, w, h); + m_conform.setGeometry(0, 0, w, h); + } + } }