From 98606e2ff70d5e478747dad931be4b672e0fb33d Mon Sep 17 00:00:00 2001 From: Wonseop Kim Date: Tue, 30 Apr 2013 20:18:12 +0900 Subject: [PATCH] Handler: Adjust the latest GUI Change-Id: Id943db93feee26ae0c373bb42f7ba73175e32e66 --- .../jquery.mobile.tizen.scrollview.handler.js | 20 ++++++------- .../jquery.mobile.tizen.scrollview.handler.less | 33 ++++++++++++++------- .../tizen-black/images/00_scroll_bar_handler.png | Bin 2881 -> 2867 bytes .../images/00_scroll_bar_handler_hor.png | Bin 2864 -> 2856 bytes src/themes/tizen/tizen-black/style.less | 3 +- .../tizen-white/images/00_scroll_bar_handler.png | Bin 2881 -> 2867 bytes .../images/00_scroll_bar_handler_hor.png | Bin 2864 -> 2856 bytes src/themes/tizen/tizen-white/style.less | 3 +- 8 files changed, 37 insertions(+), 22 deletions(-) diff --git a/src/js/widgets/jquery.mobile.tizen.scrollview.handler.js b/src/js/widgets/jquery.mobile.tizen.scrollview.handler.js index b2b1352..67eafe3 100644 --- a/src/js/widgets/jquery.mobile.tizen.scrollview.handler.js +++ b/src/js/widgets/jquery.mobile.tizen.scrollview.handler.js @@ -98,7 +98,7 @@ define( [ '../jquery.mobile.tizen.core', '../jquery.mobile.tizen.scrollview' ], createHandler = function ( target ) { var $view = target, prefix = "
", + suffix = "\">
", scrollview = $view.data( "scrollview" ), options = scrollview.options, direction = options.direction, @@ -109,7 +109,7 @@ define( [ '../jquery.mobile.tizen.core', '../jquery.mobile.tizen.scrollview' ], _$clip = scrollview._$clip, scrollbar = $view.find( ".ui-scrollbar" ), handler = null, - handlerThumb = null, + handlerHandle = null, viewLength = 0, clipLength = 0, handlerHeight = 0, @@ -128,7 +128,7 @@ define( [ '../jquery.mobile.tizen.core', '../jquery.mobile.tizen.scrollview' ], }, setHanderPostion = function ( scrollPos ) { var handlerPos = Math.round( ( isHorizontal ? scrollPos.x : scrollPos.y ) / viewLength * trackLength ); - handlerThumb[0].style[ ( isHorizontal ? "left" : "top" ) ] = handlerPos + "px"; + handlerHandle[0].style[ ( isHorizontal ? "left" : "top" ) ] = handlerPos + "px"; }, stopHandlerScroll = function () { $( document ).unbind( ".handler" ); @@ -136,16 +136,16 @@ define( [ '../jquery.mobile.tizen.core', '../jquery.mobile.tizen.scrollview' ], _$view.trigger( "scrollstop" ); }; - if ( $view.find( ".ui-handler-thumb" ).length !== 0 || typeof direction !== "string" ) { + if ( $view.find( ".ui-handler-handle" ).length !== 0 || typeof direction !== "string" ) { return; } handler = $( [ prefix, direction, suffix ].join( "" ) ).appendTo( $view.addClass( " ui-handler-" + theme ) ); - handlerThumb = $view.find( ".ui-handler-thumb" ).attr( { + handlerHandle = $view.find( ".ui-handler-handle" ).attr( { "tabindex" : "0", "aria-label" : ( isHorizontal ? "Horizontal handler, double tap and move to scroll" : "Verticalhandler, double tap and move to scroll" ) }).hide(); - handlerHeight = ( isHorizontal ? handlerThumb.width() : handlerThumb.height() ); + handlerHeight = ( isHorizontal ? handlerHandle.width() : handlerHandle.height() ); handlerMargin = ( isHorizontal ? parseInt( handler.css( "right" ), 10 ) : parseInt( handler.css( "bottom" ), 10 ) ); $.extend( $view, { @@ -153,8 +153,8 @@ define( [ '../jquery.mobile.tizen.core', '../jquery.mobile.tizen.scrollview' ], }); // handler drag - handlerThumb.bind( dragStartEvt, { - e : handlerThumb[0] + handlerHandle.bind( dragStartEvt, { + e : handlerHandle[0] }, function ( event ) { scrollview._stopMScroll(); @@ -238,7 +238,7 @@ define( [ '../jquery.mobile.tizen.core', '../jquery.mobile.tizen.scrollview' ], } handler.addClass( "ui-handler-visible" ); - handlerThumb.stop( true, true ) + handlerHandle.stop( true, true ) .fadeIn(); }).bind( "scrollupdate", function ( event, data ) { if ( !scrollview.enableHandler() || viewLength < 0 || clipLength < handlerHeight ) { @@ -265,7 +265,7 @@ define( [ '../jquery.mobile.tizen.core', '../jquery.mobile.tizen.scrollview' ], } scrollview._handlerTimer = setTimeout( function () { if ( scrollview._timerID === 0 && $view.moveData === null ) { - handlerThumb.stop( true, true ) + handlerHandle.stop( true, true ) .css( "opacity", 1.0 ) .fadeOut( function () { handler.removeClass( "ui-handler-visible" ); diff --git a/src/themes/tizen/common/jquery.mobile.tizen.scrollview.handler.less b/src/themes/tizen/common/jquery.mobile.tizen.scrollview.handler.less index bdcb4d4..0981c68 100644 --- a/src/themes/tizen/common/jquery.mobile.tizen.scrollview.handler.less +++ b/src/themes/tizen/common/jquery.mobile.tizen.scrollview.handler.less @@ -9,21 +9,21 @@ } .ui-handler-visible { - opacity: 1; + opacity: 1; } .ui-handler-direction-y { top : 10 * @unit_base_handler; - right : 10 * @unit_base_handler; + right : 0 * @unit_base_handler; bottom : 10 * @unit_base_handler; - width : 48 * @unit_base_handler; + width : 36 * @unit_base_handler; } .ui-handler-direction-x { right : 10 * @unit_base_handler; - bottom : 10 * @unit_base_handler; + bottom : 0 * @unit_base_handler; left : 10 * @unit_base_handler; - height : 48 * @unit_base_handler; + height : 36 * @unit_base_handler; } .ui-handler-track { @@ -32,19 +32,32 @@ height : 100%; } -.ui-handler-thumb { +.ui-handler-handle { position : absolute; top : 0; left : 0; +} + +.ui-handler-direction-x .ui-handler-handle { + width : 234 * @unit_base_handler; + height : 36 * @unit_base_handler; +} + +.ui-handler-direction-y .ui-handler-handle { + width : 36 * @unit_base_handler; + height : 234 * @unit_base_handler; +} + +.ui-handler-thumb { background-position : center; background-repeat : no-repeat; - .LESSborder-radius-all(5 * @unit_base_handler); + .LESSborder-radius-all(11 * @unit_base_handler); } .ui-handler-direction-y .ui-handler-thumb { - width : 48 * @unit_base_handler; - height : 214 * @unit_base_handler; - background-size : 48 * @unit_base_handler 40 * @unit_base_handler; + width : 23 * @unit_base_handler; + height : 229 * @unit_base_handler; + background-size : 23 * @unit_base_handler 37 * @unit_base_handler; } .ui-handler-direction-x .ui-handler-thumb { diff --git a/src/themes/tizen/tizen-black/images/00_scroll_bar_handler.png b/src/themes/tizen/tizen-black/images/00_scroll_bar_handler.png index 52ffbeff48be9c62cef564838a12a5965ac15342..399413eb605e8a6bd12d2639960addfc9a6cd5c0 100644 GIT binary patch delta 158 zcmX>owpmQEGr-TCmrII^fq{Y7)59eQNQ(opDhC^oTsfnNZKL9RuHraP7srr_TSu6`SNv(qD4y6qDfkA60QGr-TCmrII^fq{Y7)59eQNE-mL1_v9E+|gcHxKVLFSACABi(^Q|tvA;; z@*Ys&VR7g%inzA$q(Npx``J0H9x7Hkcc)({@R+vW&E@2r#VY&^3=W^>#Eb8>PhQ@> ztt@`?=U0dHS4Oa>i(^Q|t)xHy z|JxrFVdQ&MBb@0K5M)mjD0& delta 155 zcmZ1>wn0p>Gr-TCmrII^fq{Y7)59eQNNWJG0S6n9Os=+=y-{&KS3$I=i(^Q|tv5F} zavm_?VL4F#ZT+PR*?hJ26OJjg|BkX@*QyT*wR-OPnSp5=+qs|XR9owpmQEGr-TCmrII^fq{Y7)59eQNQ(opDhC^oTsfnNZKL9RuHraP7srr_TSu6`SNv(qD4y6qDfkA60QGr-TCmrII^fq{Y7)59eQNE-mL1_v9E+|gcHxKVLFSACABi(^Q|tvA;; z@*Ys&VR7g%inzA$q(Npx``J0H9x7Hkcc)({@R+vW&E@2r#VY&^3=W^>#Eb8>PhQ@> ztt@`?=U0dHS4Oa>i(^Q|t)xHy z|JxrFVdQ&MBb@0K5M)mjD0& delta 155 zcmZ1>wn0p>Gr-TCmrII^fq{Y7)59eQNNWJG0S6n9Os=+=y-{&KS3$I=i(^Q|tv5F} zavm_?VL4F#ZT+PR*?hJ26OJjg|BkX@*QyT*wR-OPnSp5=+qs|XR9