Modified GUI to colorpicker
authorBhavya Kumili <bhavya.k@samsung.com>
Wed, 17 Apr 2013 05:06:02 +0000 (10:36 +0530)
committerBhavya Kumili <bhavya.k@samsung.com>
Wed, 17 Apr 2013 06:02:54 +0000 (11:32 +0530)
Change-Id: I9611e6ddfa081cf84d124f83f0922ddbe5bf7f54

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

index c2e05cf..2bd81fc 100755 (executable)
@@ -364,8 +364,7 @@ _ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds
        float arrowButtonLeftMargin = 0.0f;
        float arrowButtonTopMargin = 0.0f;
        float barTopMargin = 0.0f;
-       float barLeftMargin = 0.0f;
-       float barRightMargin = 0.0f;
+       float barLeftRightMargin = 0.0f;
        float sliderHeight = 0.0f;
        float sliderWidth = 0.0f;
 
@@ -374,8 +373,7 @@ _ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds
        GET_SHAPE_CONFIG(COLORPICKER::ARROW_BUTTON_LEFT_MARGIN, orientation, arrowButtonLeftMargin);
        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::BAR_LEFT_RIGHT_MARGIN, orientation, barLeftRightMargin);
        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,27 +410,27 @@ _ColorPickerPresenter::LoadDrawingProperties(const FloatRectangle& controlBounds
        //Set contents position
        __componentBounds[HUE_ARROWLEFT].SetBounds(arrowButtonLeftMargin, btnStartY, arrowButtonWidth, arrowButtonHeight);
 
-       __componentBounds[HUE_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftMargin, barStartY, sliderWidth, sliderHeight);
+       __componentBounds[HUE_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftRightMargin, barStartY, sliderWidth, sliderHeight);
 
-       __componentBounds[HUE_ARROWRIGHT].SetBounds(__componentBounds[HUE_BAR].x + sliderWidth + barRightMargin, btnStartY,
+       __componentBounds[HUE_ARROWRIGHT].SetBounds(__componentBounds[HUE_BAR].x + sliderWidth + barLeftRightMargin, btnStartY,
                        arrowButtonWidth, arrowButtonHeight);
 
        btnStartY += __blockHeight;
        __componentBounds[SAT_ARROWLEFT].SetBounds(arrowButtonLeftMargin, btnStartY, arrowButtonWidth, arrowButtonHeight);
 
-       __componentBounds[SAT_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftMargin, barStartY + __blockHeight,
+       __componentBounds[SAT_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftRightMargin, barStartY + __blockHeight,
                        sliderWidth, sliderHeight);
 
-       __componentBounds[SAT_ARROWRIGHT].SetBounds(__componentBounds[SAT_BAR].x + sliderWidth + barRightMargin, btnStartY,
+       __componentBounds[SAT_ARROWRIGHT].SetBounds(__componentBounds[SAT_BAR].x + sliderWidth + barLeftRightMargin, btnStartY,
                        arrowButtonWidth, arrowButtonHeight);
 
        btnStartY += __blockHeight;
        __componentBounds[LUM_ARROWLEFT].SetBounds(arrowButtonLeftMargin, btnStartY, arrowButtonWidth, arrowButtonHeight);
 
-       __componentBounds[LUM_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftMargin, barStartY + __blockHeight * 2,
+       __componentBounds[LUM_BAR].SetBounds(arrowButtonLeftMargin + arrowButtonWidth + barLeftRightMargin, barStartY + __blockHeight * 2,
                        sliderWidth, sliderHeight);
 
-       __componentBounds[LUM_ARROWRIGHT].SetBounds(__componentBounds[LUM_BAR].x + sliderWidth + barRightMargin, btnStartY,
+       __componentBounds[LUM_ARROWRIGHT].SetBounds(__componentBounds[LUM_BAR].x + sliderWidth + barLeftRightMargin, btnStartY,
                        arrowButtonWidth, arrowButtonHeight);
 
        float differentialY = (handlerHeight - sliderHeight) / 2.0f;
index c8edec9..6838466 100755 (executable)
@@ -60,7 +60,7 @@ DECLARE_UI_CONFIG(COLORPICKER);
        DECLARE_SHAPE_CONFIG(ARROW_BUTTON_LEFT_MARGIN, 1);
        DECLARE_SHAPE_CONFIG(ARROW_BUTON_TOP_MARGIN, 2);
        DECLARE_SHAPE_CONFIG(BAR_TOP_MARGIN, 3);
-       DECLARE_SHAPE_CONFIG(BAR_LEFT_MARGIN, 4);
+       DECLARE_SHAPE_CONFIG(BAR_LEFT_RIGHT_MARGIN, 4);
        DECLARE_SHAPE_CONFIG(SLIDER_HEIGHT, 5);
        DECLARE_SHAPE_CONFIG(ARROW_BUTTON_WIDTH, 6);
        DECLARE_SHAPE_CONFIG(ARROW_BUTTON_HEIGHT, 7);
@@ -70,7 +70,6 @@ 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 a5bc6f2..913367a 100755 (executable)
@@ -67,8 +67,7 @@ START_UI_CONFIG(COLORPICKER);
                ADD_SHAPE_CONFIG(ARROW_BUTTON_LEFT_MARGIN, 16);
                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(BAR_RIGHT_MARGIN, 15);
+               ADD_SHAPE_CONFIG(BAR_LEFT_RIGHT_MARGIN, 15);
                ADD_SHAPE_CONFIG(SLIDER_HEIGHT, 63);
                ADD_SHAPE_CONFIG(ARROW_BUTTON_WIDTH, 74);
                ADD_SHAPE_CONFIG(ARROW_BUTTON_HEIGHT, 74);
@@ -88,7 +87,6 @@ START_UI_CONFIG(COLORPICKER);
        {
                ADD_SHAPE_CONFIG(ARROW_BUTTON_LEFT_MARGIN, 184);
                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);
        }