/* * Copyright (c) 2010 Samsung Electronics Co., Ltd All Rights Reserved * * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ group { "elm/colorselector/bg/default"; parts { swallow { "elm.colorbar_0"; desc { "default"; rel2.relative: 1.0 0.0; align: 0.5 0.0; fixed: 0 1; } } swallow { "elm.colorbar_1"; desc { "default"; rel1.to_y: "elm.colorbar_0"; rel1.relative: 0.0 1.0; rel2.to_y: "elm.colorbar_0"; rel2.relative: 1.0 1.0; align: 0.5 0.0; fixed: 0 1; } } swallow { "elm.colorbar_2"; desc { state: "default"; rel1.to_y: "elm.colorbar_1"; rel1.relative: 0.0 1.0; rel2.to_y: "elm.colorbar_1"; rel2.relative: 1.0 1.0; align: 0.5 0.0; fixed: 0 1; } } swallow { "elm.colorbar_3"; desc { "default"; rel1.to_y: "elm.colorbar_2"; rel1.relative: 0.0 1.0; align: 0.5 0.0; } } } } group { "elm/colorselector/item/event/default"; inherit_only: 1; parts { rect { "event"; mouse; repeat; desc { "default"; color: 0 0 0 0; rel.to: "base"; } desc { "disabled"; inherit: "default"; hid; } } } programs { program { "selected"; signal: "elm,state,selected"; source: "elm"; after: "on_selected"; } program { "unselected"; signal: "elm,state,unselected"; source: "elm"; after: "on_unselected"; } program { "unhighlight"; signal: "elm,state,unhighlight"; source: "elm"; after: "on_unhighlight"; } program { "highlight_on"; signal: "elm,highlight,on"; source: "elm"; after: "on_highlight_on"; } program { "highlight_off"; signal: "elm,highlight,off"; source: "elm"; after: "on_highlight_off"; } program { "clicked"; signal: "mouse,clicked,1"; source: "event"; after: "on_clicked"; } } } group { "elm/colorselector/palette/colorplane"; alias: "elm/colorselector/palette/default"; data.item: "horizontal_pad" COLORSELECTOR_PORTRAIT_HOR_PAD_COLORPLANE_INC; data.item: "vertical_pad" COLORSELECTOR_PORTRAIT_VER_PAD_COLORPLANE_INC; parts { spacer { "base"; scale; desc { "default"; min: COLORSELECTOR_PALETTE_COLORPLANE_WIDTH_INC COLORSELECTOR_PALETTE_COLORPLANE_HEIGHT_INC; max: -1 -1; } } rect { "bg"; nomouse; desc { "default"; rel.to: "base"; color_class: "colorselector/default/bg"; } } spacer { "padding_top"; scale; desc { "default"; min: 0 COLORSELECTOR_TOPBOTTOM_PAD_COLORPLANE_INC; fixed: 0 1; rel1 { relative: 0.0 0.0; to: "base"; } rel2 { relative: 1.0 0.0; to: "base"; } align: 0.0 0.0; } } swallow { "palette"; scale; mouse; desc { state: "default"; align: 0.5 0.0; fixed: 0 1; rel1 { relative: 0.0 1.0; to_y: "padding_top"; } rel2.to_y: "padding_top"; } } spacer { "padding_palette"; scale; desc { "default"; min: 0 COLORSELECTOR_TOPBOTTOM_PAD_COLORPLANE_INC; fixed: 0 1; rel1 { relative: 0.0 1.0; to: "palette"; } rel2.to: "palette"; align: 0.0 0.0; } } } } group { "elm/colorselector/item/colorplane"; alias: "elm/colorselector/item/default"; nomouse; images { set { name: "core_color_picker_palette_selected"; image { image: SMALL"images/User_Input_Elements/core_color_picker_palette_selected.png" COMP; } image { image: MEDIUM"images/User_Input_Elements/core_color_picker_palette_selected.png" COMP; } } set { name: "core_color_picker_palette_selected_bg"; image { image: SMALL"images/User_Input_Elements/core_color_picker_palette_selected_bg.png" COMP; } image { image: MEDIUM"images/User_Input_Elements/core_color_picker_palette_selected_bg.png" COMP; } } set { name: "core_color_picker_color_shadow"; image { image: SMALL"images/User_Input_Elements/core_color_picker_color_shadow.png" COMP; } image { image: MEDIUM"images/User_Input_Elements/core_color_picker_color_shadow.png" COMP; } } } parts { spacer { "base"; desc { "default"; } } spacer { "bg_color"; scale; desc { state: "default"; min: COLORSELECTOR_PALETTE_COLORBG_MIN_COLORPLANE_INC; rel.to: "base"; } } swallow { "color_obj"; mouse; desc { "default"; rel1.to: "bg_color"; rel2.to: "bg_color"; } } image { "bg_color_shadow"; repeat; desc { "default"; image.normal: "core_color_picker_color_shadow"; rel1.to: "color_obj"; rel2.to: "color_obj"; } } image { "bg_selected"; desc { "default"; hid; rel1.to: "bg_color"; rel2.to: "bg_color"; image.normal: "core_color_picker_palette_selected_bg"; } desc { "selected"; inherit: "default"; vis; color_class: "color_item/default/bg_icon_selected"; } } image { "icon_selected"; desc { "default"; hid; rel1 { to: "bg_color"; offset: -1 -1; } rel2 { to: "bg_color"; offset: 0 0; } image.normal: "core_color_picker_palette_selected"; } desc { "selected"; inherit: "default"; vis; color_class: "color_item/default/icon_selected"; } } } inherit: "elm/colorselector/item/event/default"; programs { program { "on_selected"; script { set_state(PART:"icon_selected", "selected", 0.0); set_state(PART:"bg_selected", "selected", 0.0); emit("elm,state,up", ""); } } program { "on_unselected"; script { set_state(PART:"icon_selected", "default", 0.0); set_state(PART:"bg_selected", "default", 0.0); } } program { "on_unhighlight"; script { set_state(PART:"icon_selected", "default", 0.0); set_state(PART:"bg_selected", "default", 0.0); } } program { "on_highlight_on"; } program { "on_highlight_off"; } program { "on_clicked"; action: RUN_PLUGIN "touch_sound"; } } } group { "elm/colorselector/item/color/colorplane"; alias: "elm/colorselector/item/color/colorplane_landscape"; alias: "elm/colorselector/item/color/default"; nomouse; images { set { name: "core_color_picker_palette"; image { image: SMALL"images/User_Input_Elements/core_color_picker_palette.png" COMP; } image { image: MEDIUM"images/User_Input_Elements/core_color_picker_palette.png" COMP; } } } parts { spacer { "base"; desc { "default"; } } image { "bg_color_image"; scale; mouse; desc { "default"; rel.to: "base"; image.normal: "core_color_picker_palette"; } } } }