X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-selection-popup-impl.cpp;h=ad9871b500ca58588b96a09a7e54b5d091cf79bd;hp=199c8ef0b1f98f200c3a98700cc01a69f873b474;hb=ff7053b7496f8c841ce0262cdbe2b7bd3fd43ec9;hpb=a258e49346338d1b63d85b0994dbb54f47f8b023 diff --git a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp index 199c8ef..ad9871b 100644 --- a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp @@ -47,10 +47,14 @@ namespace // todo Move this to adaptor?? #define GET_LOCALE_TEXT(string) dgettext("elementary", string) +const std::string TEXT_SELECTION_POPUP_LABEL = "textselectionpopuplabel"; + const Dali::Vector4 DEFAULT_POPUP_DIVIDER_COLOR( Dali::Vector4( 0.23f, 0.72f, 0.8f, 0.11f ) ); const Dali::Vector4 DEFAULT_OPTION_ICON( Dali::Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) ); const Dali::Vector4 DEFAULT_OPTION_PRESSED_COLOR( Dali::Vector4( 0.24f, 0.72f, 0.8f, 0.11f ) ); +const float DEFAULT_CAPTION_POINT_SIZE = 8.0f; // todo This should be from the style sheet not fixed. + const std::string DEFAULT_POPUP_BACKGROUND_IMAGE( DALI_IMAGE_DIR "selection-popup-bg#.png" ); const std::string OPTION_ICON_CLIPBOARD( DALI_IMAGE_DIR "copy_paste_icon_clipboard.png" ); const std::string OPTION_ICON_COPY( DALI_IMAGE_DIR "copy_paste_icon_copy.png" ); @@ -124,7 +128,6 @@ Dali::Toolkit::TextSelectionPopup TextSelectionPopup::New( Toolkit::TextSelectio Dali::Toolkit::TextSelectionPopup handle( *impl ); impl->mEnabledButtons = buttonsToEnable; - // Second-phase init of the implementation // This can only be done after the CustomActor connection has been made... impl->Initialize(); @@ -610,11 +613,15 @@ Dali::Image TextSelectionPopup::GetButtonImage( Toolkit::TextSelectionPopup::But if ( showCaption ) { Toolkit::TextLabel captionTextLabel = Toolkit::TextLabel::New(); + captionTextLabel.SetStyleName( TEXT_SELECTION_POPUP_LABEL ); captionTextLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, caption ); + captionTextLabel.SetProperty( Toolkit::TextLabel::Property::POINT_SIZE, DEFAULT_CAPTION_POINT_SIZE ); captionTextLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); Toolkit::TextLabel pressedCaptionTextLabel = Toolkit::TextLabel::New(); + pressedCaptionTextLabel.SetStyleName( TEXT_SELECTION_POPUP_LABEL ); pressedCaptionTextLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, caption ); + pressedCaptionTextLabel.SetProperty( Toolkit::TextLabel::Property::POINT_SIZE, DEFAULT_CAPTION_POINT_SIZE ); pressedCaptionTextLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); Padding padding;