TizenRefApp-9195 [Gallery] Fix issue with starting with wrong image on 03/145703/1
authorIgor Nazarov <i.nazarov@samsung.com>
Tue, 22 Aug 2017 15:47:39 +0000 (18:47 +0300)
committerIgor Nazarov <i.nazarov@samsung.com>
Wed, 23 Aug 2017 09:57:06 +0000 (12:57 +0300)
operation VIEW

Change-Id: Iea19539a92b30e02f541223b922e938824bd9072

gallery/model/impl/helpers.cpp
gallery/presenters/Instance.cpp
ucl/include/ucl/gui/Window.h
ucl/include/ucl/gui/Window.hpp
ucl/source/gui/Window.cpp

index 8f44793e4134c27d28fb7ad24a913c2b602e045a..829005b1072c4cc025e3305b215ef906bbdfea77 100644 (file)
@@ -22,8 +22,6 @@
 
 namespace gallery { namespace { namespace impl {
 
-       constexpr auto UNIQUE_PATH_RESERVE = 10;
-
        int MEDIA_DB_CONNECTION_COUNTER = 0;
 }}}
 
index eb3365afb123639bcad120451b012bc8bacebafc..39c7112bf27245342c488d00a019812a09d6cce6 100644 (file)
@@ -170,6 +170,7 @@ namespace gallery {
 
                if (!m_win->isVisible()) {
                        DLOG("Show the window.");
+                       m_win->resizeToScreen();
                        show(*m_win);
                }
 
index 9aa598d7e55fa7bc799d3a76c31b2dfeba5e2133..84a15da5acb90180566be7d8008f3223cc110be0 100644 (file)
@@ -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<int> value);
 
                        Builder &setIsOwner(bool value);
@@ -77,6 +77,7 @@ namespace ucl {
                bool isRotationsSupported() const;
                void setRotations(const std::vector<int> &value);
 
+               void resizeToScreen();
                void lower();
 
        private:
index d5b18286a1456a830d10987008ecb67fb8ff9e5b..144a5ad0ccdfe1b164c17d78ba99b7b451259dad 100644 (file)
@@ -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;
index 3f74e9ec29b8526e734ba698a000b2820a670e6e..cfa53fdc728f65d1041f885957a012527f0e01f6 100644 (file)
@@ -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);
+               }
+       }
 }