Revert "[3.0] Added style names for images and text labels of Slider" 62/97762/1
authordongsug.song <dongsug.song@samsung.com>
Tue, 15 Nov 2016 02:51:13 +0000 (11:51 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Tue, 15 Nov 2016 02:51:17 +0000 (11:51 +0900)
This reverts commit 0bf9923dec0832a2fe2629998e608654056c0d7f.

Change-Id: I9da575d77cfd3dfb5a7dd303e24e1d6648f6850d

dali-toolkit/internal/controls/slider/slider-impl.cpp
dali-toolkit/internal/controls/slider/slider-impl.h
dali-toolkit/internal/visuals/image/image-visual.cpp
dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/styles/480x800/dali-toolkit-default-theme.json
dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json

index de7e5c6..915db02 100755 (executable)
@@ -102,6 +102,7 @@ const Vector4 DEFAULT_DISABLED_COLOR( 0.5f, 0.5f, 0.5f, 1.0f );
 const float VALUE_POPUP_MARGIN = 10.0f;
 const float VALUE_POPUP_HEIGHT = 81.0f;
 const float VALUE_POPUP_MIN_WIDTH = 54.0f;
+const Vector2 VALUE_POPUP_ARROW_SIZE( 18.0f, 18.0f );
 
 const float DEFAULT_LOWER_BOUND = 0.0f;
 const float DEFAULT_UPPER_BOUND = 1.0f;
@@ -207,14 +208,9 @@ void Slider::OnInitialize()
 
 void Slider::OnSizeSet( const Vector3& size )
 {
-}
-
-void Slider::OnRelayout( const Vector2& size, RelayoutContainer& container )
-{
+  // Factor in handle overshoot into size of track
   SetHitRegion( Vector2( size.x, GetHitRegion().y ) );
-  // Factor in handle overshoot into size of backing
   SetTrackRegion( Vector2( size.x - GetHandleSize().x, GetTrackRegion().y ) );
-  Control::OnRelayout( size, container );
 }
 
 bool Slider::OnTouch(Actor actor, const TouchData& touch)
@@ -387,9 +383,9 @@ Actor Slider::CreateHitRegion()
 Toolkit::ImageView Slider::CreateTrack()
 {
   Toolkit::ImageView track = Toolkit::ImageView::New();
-  track.SetName("SliderTrack");
   track.SetParentOrigin( ParentOrigin::CENTER );
   track.SetAnchorPoint( AnchorPoint::CENTER );
+
   return track;
 }
 
@@ -449,7 +445,6 @@ std::string Slider::GetTrackVisual()
 Toolkit::ImageView Slider::CreateProgress()
 {
   Toolkit::ImageView progress = Toolkit::ImageView::New();
-  progress.SetName("SliderProgress");
   progress.SetParentOrigin( ParentOrigin::CENTER_LEFT );
   progress.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
 
@@ -573,7 +568,6 @@ void Slider::ResizeProgressRegion( const Vector2& region )
 Toolkit::ImageView Slider::CreateHandle()
 {
   Toolkit::ImageView handle = Toolkit::ImageView::New();
-  handle.SetName("SliderHandle");
   handle.SetParentOrigin( ParentOrigin::CENTER_LEFT );
   handle.SetAnchorPoint( AnchorPoint::CENTER );
 
@@ -583,8 +577,6 @@ Toolkit::ImageView Slider::CreateHandle()
 Toolkit::ImageView Slider::CreatePopupArrow()
 {
   Toolkit::ImageView arrow = Toolkit::ImageView::New();
-  arrow.SetStyleName("SliderPopupArrow");
-  arrow.SetName("SliderPopupArrow");
   arrow.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
   arrow.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
 
@@ -594,8 +586,6 @@ Toolkit::ImageView Slider::CreatePopupArrow()
 Toolkit::TextLabel Slider::CreatePopupText()
 {
   Toolkit::TextLabel textLabel = Toolkit::TextLabel::New();
-  textLabel.SetName( "SliderPopupTextLabel" );
-  textLabel.SetStyleName( "SliderPopupTextLabel" );
   textLabel.SetParentOrigin( ParentOrigin::CENTER );
   textLabel.SetAnchorPoint( AnchorPoint::CENTER );
   textLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
@@ -608,7 +598,6 @@ Toolkit::TextLabel Slider::CreatePopupText()
 Toolkit::ImageView Slider::CreatePopup()
 {
   Toolkit::ImageView popup = Toolkit::ImageView::New();
-  popup.SetName( "SliderPopup" );
   popup.SetParentOrigin( ParentOrigin::TOP_CENTER );
   popup.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
   popup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::WIDTH );
@@ -679,8 +668,6 @@ void Slider::CreateHandleValueDisplay()
   if( mHandle && !mHandleValueTextLabel )
   {
     mHandleValueTextLabel = Toolkit::TextLabel::New();
-    mHandleValueTextLabel.SetName("SliderHandleTextLabel");
-    mHandleValueTextLabel.SetStyleName("SliderHandleTextLabel");
     mHandleValueTextLabel.SetParentOrigin( ParentOrigin::CENTER );
     mHandleValueTextLabel.SetAnchorPoint( AnchorPoint::CENTER );
     mHandleValueTextLabel.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
index 7879f37..f2c81b2 100755 (executable)
@@ -286,12 +286,6 @@ protected:
    */
   virtual void OnSizeSet( const Vector3& size );
 
-  /**
-   * @copydoc CustomActorImpl::OnRelayout
-   */
-  virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
-
-
 private:
 
   /**
index 64b0965..70347ff 100644 (file)
@@ -501,6 +501,7 @@ void ImageVisual::DoSetOnStage( Actor& actor )
   {
     InitializeRenderer( mImage );
   }
+
 }
 
 void ImageVisual::DoSetOffStage( Actor& actor )
index 6ec3673..d54df66 100644 (file)
@@ -755,7 +755,6 @@ void Control::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Ty
   {
     GetImpl( styleManager ).ApplyThemeStyle( Toolkit::Control( GetOwner() ) );
   }
-  RelayoutRequest();
 }
 
 void Control::OnPinch(const PinchGesture& pinch)
index fd8e1a4..a97bab8 100644 (file)
     {
       "pointSize":25
     },
-    "radiobutton":
-    {
-      "unselectedStateImage":"{DALI_IMAGE_DIR}radio-button-unselected.png",
-      "selectedStateImage":"{DALI_IMAGE_DIR}radio-button-selected.png",
-      "disabledUnselectedStateImage":"{DALI_IMAGE_DIR}radio-button-unselected-disabled.png",
-      "disabledSelectedStateImage":"{DALI_IMAGE_DIR}radio-button-selected-disabled.png"
-    },
 
     "textfield":
     {
     "confirmationpopup":
     {
       "popupBackgroundImage":"{DALI_IMAGE_DIR}00_popup_bg.9.png"
-    },
-    "slider":
-    {
-      "showPopup": true,
-      "showValue": true,
-      "valuePrecision": 0,
-      "trackVisual":{
-        "url":"{DALI_IMAGE_DIR}slider-skin.9.png",
-        "size":[27,27]
-      },
-      "progressVisual":{
-        "url":"{DALI_IMAGE_DIR}slider-skin-progress.9.png",
-        "size":[27,27]
-      },
-      "handleVisual":{
-        "url":"{DALI_IMAGE_DIR}slider-skin-handle.png",
-        "size":[72,72]
-      },
-      "popupVisual":"{DALI_IMAGE_DIR}slider-popup.9.png",
-      "popupArrowVisual":"{DALI_IMAGE_DIR}slider-popup-arrow.9.png",
-      "disableColor":[0.5, 0.5, 0.5, 1.0],
-      "popupTextColor":[0.5,0.5,0.5,1.0],
-      "hitRegion":[0, 72],
-      "marks":[],
-      "snapToMarks":false,
-      "markTolerance":0.05
-    },
-    "SliderHandleTextLabel":
-    {
-      "textColor":[0.8,0.8,1,1]
     }
   }
 }
index 0a6f61f..850b3b9 100644 (file)
     {
       "pointSize":25
     },
-    "radiobutton":
-    {
-      "unselectedStateImage":"{DALI_IMAGE_DIR}radio-button-unselected.png",
-      "selectedStateImage":"{DALI_IMAGE_DIR}radio-button-selected.png",
-      "disabledUnselectedStateImage":"{DALI_IMAGE_DIR}radio-button-unselected-disabled.png",
-      "disabledSelectedStateImage":"{DALI_IMAGE_DIR}radio-button-selected-disabled.png"
-    },
 
     "textfield":
     {
       "grabHandleImage" : "{DALI_STYLE_IMAGE_DIR}cursor_handler_drop_center.png",
       "selectionHandleImageLeft" : {"filename":"{DALI_STYLE_IMAGE_DIR}selection_handle_drop_left.png" },
       "selectionHandleImageRight": {"filename":"{DALI_STYLE_IMAGE_DIR}selection_handle_drop_right.png" }
-    },
-    "popup":
-    {
-      "popupBackgroundImage":"{DALI_IMAGE_DIR}00_popup_bg.9.png"
-    },
-    "confirmationpopup":
-    {
-      "popupBackgroundImage":"{DALI_IMAGE_DIR}00_popup_bg.9.png"
-    },
-    "slider":
-    {
-      "showPopup": true,
-      "showValue": true,
-      "valuePrecision": 0,
-      "trackVisual":{
-        "url":"{DALI_IMAGE_DIR}slider-skin.9.png",
-        "size":[27,27]
-      },
-      "progressVisual":{
-        "url":"{DALI_IMAGE_DIR}slider-skin-progress.9.png",
-        "size":[27,27]
-      },
-      "handleVisual":{
-        "url":"{DALI_IMAGE_DIR}slider-skin-handle.png",
-        "size":[72,72]
-      },
-      "popupVisual":"{DALI_IMAGE_DIR}slider-popup.9.png",
-      "popupArrowVisual":"{DALI_IMAGE_DIR}slider-popup-arrow.9.png",
-      "disableColor":[0.5, 0.5, 0.5, 1.0],
-      "popupTextColor":[0.5,0.5,0.5,1.0],
-      "hitRegion":[0, 72],
-      "marks":[],
-      "snapToMarks":false,
-      "markTolerance":0.05
-    },
-    "SliderHandleTextLabel":
-    {
-      "textColor":[0.8,0.8,1,1]
     }
   }
 }