From b2ecdab1d6b031a40c61033d686e5a8c884cdf38 Mon Sep 17 00:00:00 2001 From: Bhavya Kumili Date: Tue, 16 Apr 2013 14:24:56 +0530 Subject: [PATCH] New GUI changes to colorpicker Change-Id: If26ee564918a963c8969151ccf6b8fe079b5a8da --- src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp | 10 ++++++---- src/ui/inc/FUi_ResourceColorPickerConfig.h | 1 + src/ui/resource/FUi_ResourceColorPickerConfig.cpp | 12 +++++++----- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp b/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp index ef02d05..c2e05cf 100755 --- a/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp +++ b/src/ui/controls/FUiCtrl_ColorPickerPresenter.cpp @@ -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; diff --git a/src/ui/inc/FUi_ResourceColorPickerConfig.h b/src/ui/inc/FUi_ResourceColorPickerConfig.h index d3803a2..c8edec9 100755 --- a/src/ui/inc/FUi_ResourceColorPickerConfig.h +++ b/src/ui/inc/FUi_ResourceColorPickerConfig.h @@ -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); diff --git a/src/ui/resource/FUi_ResourceColorPickerConfig.cpp b/src/ui/resource/FUi_ResourceColorPickerConfig.cpp index d34f772..a5bc6f2 100755 --- a/src/ui/resource/FUi_ResourceColorPickerConfig.cpp +++ b/src/ui/resource/FUi_ResourceColorPickerConfig.cpp @@ -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); } -- 2.7.4