Apply custom scale rate when showing magnifier window 53/137853/1
authorInHong Han <inhong1.han@samsung.com>
Fri, 7 Jul 2017 05:13:05 +0000 (14:13 +0900)
committerInHong Han <inhong1.han@samsung.com>
Mon, 10 Jul 2017 06:26:21 +0000 (15:26 +0900)
Change-Id: I12117980227aea4a8a8b740f8154d078c65b37ae

scl/sclresourcecache.cpp
scl/scluibuilder.cpp

index 143c311..fbc3a8e 100644 (file)
@@ -1057,19 +1057,19 @@ CSCLResourceCache::recompute_layout(sclwindow window)
                         focus_handler->finalize_key_navigation_info(window);
                     }
                 }
-            }
 
-            /* Apply the custom scale rate value */
-            (*pCurLayout).width *= utils->get_custom_scale_rate_x();
-            (*pCurLayout).height *= utils->get_custom_scale_rate_y();
+                /* Apply the custom scale rate value */
+                (*pCurLayout).width *= utils->get_custom_scale_rate_x();
+                (*pCurLayout).height *= utils->get_custom_scale_rate_y();
 
-            (*pCurLayout).add_grab_left *= utils->get_custom_scale_rate_x();
-            (*pCurLayout).add_grab_right *= utils->get_custom_scale_rate_x();
-            (*pCurLayout).add_grab_top *= utils->get_custom_scale_rate_y();
-            (*pCurLayout).add_grab_bottom *= utils->get_custom_scale_rate_y();
+                (*pCurLayout).add_grab_left *= utils->get_custom_scale_rate_x();
+                (*pCurLayout).add_grab_right *= utils->get_custom_scale_rate_x();
+                (*pCurLayout).add_grab_top *= utils->get_custom_scale_rate_y();
+                (*pCurLayout).add_grab_bottom *= utils->get_custom_scale_rate_y();
 
-            (*pCurLayout).mouse_manipulate_x *= utils->get_custom_scale_rate_x();
-            (*pCurLayout).mouse_manipulate_y *= utils->get_custom_scale_rate_y();
+                (*pCurLayout).mouse_manipulate_x *= utils->get_custom_scale_rate_x();
+                (*pCurLayout).mouse_manipulate_y *= utils->get_custom_scale_rate_y();
+            }
 
             /* Resize window */
             if (windows->is_base_window(window)) {
index 014f3d6..e859241 100644 (file)
@@ -1119,39 +1119,38 @@ CSCLUIBuilder::show_magnifier(const sclwindow window, scldrawctx draw_ctx)
                         0, 0, decoration_size, decoration_size);
                     break;
                 case WND_DECORATOR_TOP_CENTER:
-                    m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL,
-                        decoration_size, 0, magnifier_configure->width - (2 * decoration_size), decoration_size);
+                    m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, decoration_size, 0,
+                        magnifier_configure->width * utils->get_custom_scale_rate_x()- (2 * decoration_size), decoration_size);
                     break;
                 case WND_DECORATOR_TOP_RIGHT:
                     m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL,
-                        magnifier_configure->width - decoration_size, 0, decoration_size, decoration_size);
+                        magnifier_configure->width * utils->get_custom_scale_rate_x() - decoration_size, 0, decoration_size, decoration_size);
                     break;
                 case WND_DECORATOR_MIDDLE_LEFT:
-                    m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL,
-                        0, decoration_size, decoration_size, magnifier_configure->height - (2 * decoration_size));
+                    m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, 0,
+                        decoration_size, decoration_size, magnifier_configure->height * utils->get_custom_scale_rate_y() - (2 * decoration_size));
                     break;
                 case WND_DECORATOR_MIDDLE_CENTER:
-                    m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL,
-                        0, 0, magnifier_configure->width, magnifier_configure->height);
+                    m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, 0, 0,
+                        magnifier_configure->width * utils->get_custom_scale_rate_x(), magnifier_configure->height * utils->get_custom_scale_rate_y());
                     break;
                 case WND_DECORATOR_MIDDLE_RIGHT:
                     m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL,
-                        magnifier_configure->width - decoration_size, decoration_size,
-                        decoration_size, magnifier_configure->height - (2 * decoration_size));
+                        magnifier_configure->width * utils->get_custom_scale_rate_x() - decoration_size, decoration_size,
+                        decoration_size, magnifier_configure->height * utils->get_custom_scale_rate_y() - (2 * decoration_size));
                     break;
                 case WND_DECORATOR_BOTTOM_LEFT:
-                    m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL,
-                        0, magnifier_configure->height - decoration_size, decoration_size, decoration_size);
+                    m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, 0,
+                        magnifier_configure->height * utils->get_custom_scale_rate_y() - decoration_size, decoration_size, decoration_size);
                     break;
                 case WND_DECORATOR_BOTTOM_CENTER:
                     m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL,
-                        decoration_size, magnifier_configure->height - decoration_size,
-                        magnifier_configure->width - (2 * decoration_size), decoration_size);
+                        decoration_size, magnifier_configure->height * utils->get_custom_scale_rate_y() - decoration_size,
+                        magnifier_configure->width * utils->get_custom_scale_rate_x() - (2 * decoration_size), decoration_size);
                     break;
                 case WND_DECORATOR_BOTTOM_RIGHT:
-                    m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL,
-                        magnifier_configure->width - decoration_size, magnifier_configure->height - decoration_size,
-                        decoration_size, decoration_size);
+                    m_gwes->m_graphics->draw_image(window, draw_ctx, composed_path, NULL, magnifier_configure->width * utils->get_custom_scale_rate_x()
+                        - decoration_size, magnifier_configure->height * utils->get_custom_scale_rate_y() - decoration_size, decoration_size, decoration_size);
                     break;
                 }
             }