/* * efl-theme-tizen * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /////////////////////////////////////////////////////////////////////////////////////// // // diskselector // /////////////////////////////////////////////////////////////////////////////////////// group { name: "elm/diskselector/base/default"; alias: "elm/diskselector/base/datetime/default"; alias: "elm/diskselector/base/timepicker"; parts { part { name: "bg"; type: RECT; mouse_events: 0; description { state: "default" 0.0; color: 0 0 0 0; } } part { name: "elm.swallow.content"; type: SWALLOW; description { state: "default" 0.0; rel1.to: "bg"; rel2.to: "bg"; } } } } group { name: "elm/diskselector/item/default"; alias: "elm/diskselector/item/datetime/default"; alias: "elm/diskselector/item/timepicker"; data { item: "len_threshold" "14"; item: "min_height" DISKSELECTOR_DF_DATA_MIN_HEIGHT_INC; } parts { part { name: "elm.text"; type: TEXT; mouse_events: 0; scale: 1; description { state: "default" 0.0; min: DISKSELECTOR_DF_ITEM_MIN_SIZE_INC; fixed: 1 1; align: 0 0; color: DISKSELECTOR_DF_FONT_COLOR_INC; visible: 1; text { font: "Tizen:style=Medium"; size: DISKSELECTOR_DF_FONT_SIZE_INC; min: 1 1; text_class: "tizen"; } } description { state: "selected" 0.0; min: DISKSELECTOR_DF_ITEM_MIN_SIZE_INC; fixed: 1 1; align: 0 0; color: 255 255 255 255; visible: 1; text { font: "Tizen:style=Medium"; size: DISKSELECTOR_DF_FONT_SIZE_INC; min: 1 1; text_class: "tizen"; } } description { state: "show" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "default_small" 0.0; inherit: "default" 0.0; visible: 1; text.size: 10; } description { state: "left_side" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "right_side" 0.0; inherit: "default" 0.0; visible: 1; } description { state: "mouse_down" 0.0; inherit: "default" 0.0; color: DISKSELECTOR_DF_FONT_MOUSE_DOWN_COLOR_INC; visible: 1; } description { state: "selected_mouse_down" 0.0; inherit: "default" 0.0; color: DISKSELECTOR_DF_FONT_MOUSE_DOWN_COLOR_INC; visible: 1; } } part { name: "over1"; type: RECT; mouse_events: 1; repeat_events: 1; description { state: "default" 0.0; color: 0 0 0 0; } } } programs { program { name: "elm,state,selected"; signal: "elm,state,selected"; source: "elm"; action: STATE_SET "selected" 0.0; target: "elm.text"; } program { name: "elm,state,default"; signal: "elm,state,default"; source: "elm"; action: STATE_SET "default" 0.0; target: "elm.text"; } program { name: "item_click"; signal: "mouse,clicked,1"; source: "over1"; action: SIGNAL_EMIT "elm,action,click" ""; } program { name: "item_mouse_down"; signal: "mouse,down,1"; source: "over1"; script { new st[30]; new Float:vl; get_state(PART:"elm.text", st, 30, vl) if (!strncmp(st, "selected", 8)) { set_state(PART:"elm.text", "selected_mouse_down", 0.0); } else { set_state(PART:"elm.text", "mouse_down", 0.0); } } } program { name: "item_mouse_up"; signal: "mouse,up,1"; source: "over1"; script { new st[30]; new Float:vl; get_state(PART:"elm.text", st, 30, vl) if (!strncmp(st, "mouse_down", 10)) { set_state(PART:"elm.text", "default", 0.0); } else if (!strncmp(st, "selected_mouse_down", 19)) { set_state(PART:"elm.text", "selected", 0.0); } } } } }