New GUI changes to colorpicker
authorBhavya Kumili <bhavya.k@samsung.com>
Tue, 16 Apr 2013 08:54:56 +0000 (14:24 +0530)
committerBhavya Kumili <bhavya.k@samsung.com>
Tue, 16 Apr 2013 09:03:58 +0000 (14:33 +0530)
Change-Id: If26ee564918a963c8969151ccf6b8fe079b5a8da

src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp
src/ui/inc/FUi_ResourceColorPickerConfig.h
src/ui/resource/FUi_ResourceColorPickerConfig.cpp

index ef02d05..c2e05cf 100755 (executable)
@@ -226,7 +226,7 @@ _ColorPickerPresenter::CreateHandlerN(_VisualElement& rootElement, _ColorPickerC
 
        pHandler->SetImplicitAnimationEnabled(false);
 
-       pHandler->SetBounds(FloatRectangle(bounds.x + handlerBounds.x, bounds.y + handlerBounds.y, handlerWidth, handlerHeight));
+       pHandler->SetBounds(CoordinateSystem::AlignToDevice(FloatRectangle(bounds.x + handlerBounds.x, bounds.y + handlerBounds.y, handlerWidth, handlerHeight)));
        pHandler->SetShowState(true);
        pHandler->SetBackBufferEnabled(true);
 
@@ -365,6 +365,7 @@ _ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds
        float arrowButtonTopMargin = 0.0f;
        float barTopMargin = 0.0f;
        float barLeftMargin = 0.0f;
+       float barRightMargin = 0.0f;
        float sliderHeight = 0.0f;
        float sliderWidth = 0.0f;
 
@@ -374,6 +375,7 @@ _ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds
        GET_SHAPE_CONFIG(COLORPICKER::ARROW_BUTON_TOP_MARGIN, orientation, arrowButtonTopMargin);
        GET_SHAPE_CONFIG(COLORPICKER::BAR_TOP_MARGIN, orientation, barTopMargin);
        GET_SHAPE_CONFIG(COLORPICKER::BAR_LEFT_MARGIN, orientation, barLeftMargin);
+       GET_SHAPE_CONFIG(COLORPICKER::BAR_RIGHT_MARGIN, orientation, barRightMargin);
        GET_SHAPE_CONFIG(COLORPICKER::SLIDER_HEIGHT, orientation, sliderHeight);
        GET_FIXED_VALUE_CONFIG(COLORPICKER::BLOCK_MARGIN, orientation, __blockMargin);
        GET_SHAPE_CONFIG(COLORPICKER::BLOCK_HEIGHT, orientation, __blockHeight);
@@ -412,7 +414,7 @@ _ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds
 
        __componentBounds[HUE_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftMargin, barStartY, sliderWidth, sliderHeight);
 
-       __componentBounds[HUE_ARROWRIGHT].SetBounds(__componentBounds[HUE_BAR].x + sliderWidth + barLeftMargin, btnStartY,
+       __componentBounds[HUE_ARROWRIGHT].SetBounds(__componentBounds[HUE_BAR].x + sliderWidth + barRightMargin, btnStartY,
                        arrowButtonWidth, arrowButtonHeight);
 
        btnStartY += __blockHeight;
@@ -421,7 +423,7 @@ _ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds
        __componentBounds[SAT_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftMargin, barStartY + __blockHeight,
                        sliderWidth, sliderHeight);
 
-       __componentBounds[SAT_ARROWRIGHT].SetBounds(__componentBounds[SAT_BAR].x + sliderWidth + barLeftMargin, btnStartY,
+       __componentBounds[SAT_ARROWRIGHT].SetBounds(__componentBounds[SAT_BAR].x + sliderWidth + barRightMargin, btnStartY,
                        arrowButtonWidth, arrowButtonHeight);
 
        btnStartY += __blockHeight;
@@ -430,7 +432,7 @@ _ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds
        __componentBounds[LUM_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftMargin, barStartY + __blockHeight * 2,
                        sliderWidth, sliderHeight);
 
-       __componentBounds[LUM_ARROWRIGHT].SetBounds(__componentBounds[LUM_BAR].x + sliderWidth + barLeftMargin, btnStartY,
+       __componentBounds[LUM_ARROWRIGHT].SetBounds(__componentBounds[LUM_BAR].x + sliderWidth + barRightMargin, btnStartY,
                        arrowButtonWidth, arrowButtonHeight);
 
        float differentialY = (handlerHeight - sliderHeight) / 2.0f;
index d3803a2..c8edec9 100755 (executable)
@@ -70,6 +70,7 @@ DECLARE_UI_CONFIG(COLORPICKER);
        DECLARE_SHAPE_CONFIG(BAR_WIDTH, 11);
        DECLARE_SHAPE_CONFIG(DIVIDER_MARGIN, 12);
        DECLARE_SHAPE_CONFIG(DIVIDER_WIDTH, 13);
+       DECLARE_SHAPE_CONFIG(BAR_RIGHT_MARGIN, 14);
 //Fixed Value config
        DECLARE_FIXED_VALUE_CONFIG(BLOCK_MARGIN, 1);
 DECLARE_END_UI_CONFIG(COLORPICKER);
index d34f772..a5bc6f2 100755 (executable)
@@ -68,14 +68,15 @@ START_UI_CONFIG(COLORPICKER);
                ADD_SHAPE_CONFIG(ARROW_BUTON_TOP_MARGIN, 19);
                ADD_SHAPE_CONFIG(BAR_TOP_MARGIN, 26);
                ADD_SHAPE_CONFIG(BAR_LEFT_MARGIN, 16);
-               ADD_SHAPE_CONFIG(SLIDER_HEIGHT, 60);
+               ADD_SHAPE_CONFIG(BAR_RIGHT_MARGIN, 15);
+               ADD_SHAPE_CONFIG(SLIDER_HEIGHT, 63);
                ADD_SHAPE_CONFIG(ARROW_BUTTON_WIDTH, 74);
                ADD_SHAPE_CONFIG(ARROW_BUTTON_HEIGHT, 74);
-               ADD_SHAPE_CONFIG(HANDLER_WIDTH, 22);
-               ADD_SHAPE_CONFIG(HANDLER_HEIGHT, 70);
+               ADD_SHAPE_CONFIG(HANDLER_WIDTH, 27);
+               ADD_SHAPE_CONFIG(HANDLER_HEIGHT, 72);
                ADD_SHAPE_CONFIG(BLOCK_HEIGHT, 112);
                ADD_FIXED_VALUE_CONFIG(BLOCK_MARGIN, 1);
-               ADD_SHAPE_CONFIG(BAR_WIDTH, 476);
+               ADD_SHAPE_CONFIG(BAR_WIDTH, 477);
                ADD_SHAPE_CONFIG(DIVIDER_MARGIN, 16);
                ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 656);
                ADD_DIMENSION_CONFIG(ARROW_BUTTON_ARROW_ICON_SIZE, 45, 45);
@@ -86,7 +87,8 @@ START_UI_CONFIG(COLORPICKER);
        START_UI_CONFIG_MODE(1280x720);
        {
                ADD_SHAPE_CONFIG(ARROW_BUTTON_LEFT_MARGIN, 184);
-               ADD_SHAPE_CONFIG(BAR_WIDTH, 700);
+               ADD_SHAPE_CONFIG(BAR_WIDTH, 702);
+               ADD_SHAPE_CONFIG(BAR_RIGHT_MARGIN, 14);
                ADD_SHAPE_CONFIG(DIVIDER_WIDTH, 1216);
                ADD_DIMENSION_CONFIG(DEFAULT_SIZE, 1248, 336);
        }