/*
Copyright (C) 2008,2009 INdT - Instituto Nokia de Tecnologia
Copyright (C) 2009,2010 ProFUSION embedded systems
- Copyright (C) 2009,2010 Samsung Electronics
+ Copyright (C) 2009,2013 Samsung Electronics
This file is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
Boston, MA 02110-1301, USA.
*/
- group {
- name: "webkit/widget/radio";
- min: 12 12;
+group { name: "webkit/widget/radio";
+ data { item: "scale" "4.5"; } /* original size is 12,12 */
+ min: 54 54;
- images {
- image: "widget/radio/img_radio_bg_enabled.png" COMP;
- image: "widget/radio/img_radio_bg_disabled.png" COMP;
- image: "widget/radio/img_radio_on.png" COMP;
- image: "widget/radio/img_radio_off.png" COMP;
- image: "widget/radio/img_radio_on_focus.png" COMP;
- image: "widget/radio/img_radio_off_focus.png" COMP;
- }
+ images {
+ image: "widget/radio/00_button_radio_activated.png" COMP;
+ image: "widget/radio/00_button_radio_activated_dim.png" COMP;
+ image: "widget/radio/00_button_radio_bg.png" COMP;
+ image: "widget/radio/00_button_radio_dim_bg.png" COMP;
+ image: "widget/radio/00_button_radio_focus.png" COMP;
+ }
- script {
- public isEnabled;
- public isPressed;
- public isChecked;
- public isFocused;
+ script {
+ public isEnabled;
+ public isPressed;
+ public isChecked;
+ public isFocused;
- public show() {
- if (get_int(isEnabled) == 1) {
- set_state(PART:"radio_button", "default", 0.0);
- set_state(PART:"bg", "enabled", 0.0);
- if (get_int(isChecked) == 1) {
- set_state(PART:"radio_button", "enabled_checked", 0.0);
- if (get_int(isFocused) == 1)
- set_state(PART:"radio_button", "focus_checked", 0.0);
- }
- else {
- if (get_int(isFocused) == 1)
- set_state(PART:"radio_button", "focused", 0.0);
- }
- }
- else {
- set_state(PART:"radio_button", "disabled", 0.0);
- set_state(PART:"bg", "disabled", 0.0);
- if (get_int(isChecked) == 1)
- set_state(PART:"radio_button", "disabled_checked", 0.0);
- }
- }
- }
-
- parts {
- part {
- name: "bg";
- type: IMAGE;
- description {
- state: "default" 0.0;
- min: 12 12;
- max: 12 12;
- image {
- normal: "widget/radio/img_radio_bg_enabled.png";
+ public show() {
+ if (get_int(isChecked) == 1) {
+ if (get_int(isEnabled) == 1) {
+ set_state(PART:"bg", "enabled", 0.0);
+ set_state(PART:"radio", "enabled_checked", 0.0);
+ } else {
+ set_state(PART:"bg", "disabled", 0.0);
+ set_state(PART:"radio", "disabled_checked", 0.0);
}
- }
- description {
- state: "enabled" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "disabled" 0.0;
- inherit: "default" 0.0;
- image {
- normal: "widget/radio/img_radio_bg_disabled.png";
+ if (get_int(isFocused) == 1) {
+ set_state(PART:"focus", "focused", 0.0);
+ } else {
+ set_state(PART:"focus", "default", 0.0);
}
- }
- }
- part {
- name: "radio_button";
- type: IMAGE;
- description {
- state: "default" 0.0;
- min: 12 12;
- max: 12 12;
- image {
- normal: "widget/radio/img_radio_off.png";
- }
- }
- description {
- state: "enabled_checked" 0.0;
- inherit: "default" 0.0;
- image {
- normal: "widget/radio/img_radio_on.png";
+ } else {
+ if (get_int(isEnabled) == 1) {
+ set_state(PART:"bg", "enabled", 0.0);
+ } else {
+ set_state(PART:"bg", "disabled", 0.0);
}
+ set_state(PART:"radio", "default", 0.0);
+ set_state(PART:"focus", "default", 0.0);
+ }
+ }
+ }
+
+ parts {
+ part { name: "bg";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ min: 54 54;
+ max: 54 54;
+ image {
+ normal: "widget/radio/00_button_radio_bg.png";
}
- description {
- state: "disabled_checked" 0.0;
- inherit: "enabled_checked" 0.0;
- color: 255 255 255 150;
+ }
+ description {
+ state: "enabled" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ image {
+ normal: "widget/radio/00_button_radio_dim_bg.png";
}
- description {
- state: "disabled" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 150;
+ }
+ }
+ part { name: "radio";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ min: 54 54;
+ max: 54 54;
+ visible: 0;
+ }
+ description {
+ state: "enabled_checked" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "widget/radio/00_button_radio_activated.png";
}
- description {
- state: "focus_checked" 0.0;
- inherit: "default" 0.0;
- image {
- normal: "widget/radio/img_radio_on_focus.png";
- }
+ }
+ description {
+ state: "disabled_checked" 0.0;
+ inherit: "enabled_checked" 0.0;
+ visible: 1;
+ color: 255 255 255 150;
+ image {
+ normal: "widget/radio/00_button_radio_activated.png";
}
- description {
- state: "focused" 0.0;
- inherit: "default" 0.0;
- image {
- normal: "widget/radio/img_radio_off_focus.png";
- }
+ }
+ }
+ part { name: "focus";
+ type: IMAGE;
+ description {
+ state: "default" 0.0;
+ min: 54 54;
+ max: 54 54;
+ visible: 0;
+ }
+ description {
+ state: "focused" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ image {
+ normal: "widget/radio/00_button_radio_focus.png";
}
}
}
+ }
- programs {
- program {
- name: "enabled";
- signal: "enabled";
- script {
- set_int(isEnabled, 1);
- show();
- }
+ programs {
+ program {
+ name: "enabled";
+ signal: "enabled";
+ script {
+ set_int(isEnabled, 1);
+ show();
}
- program {
- name: "pressed";
- signal: "pressed";
- script {
- set_int(isPressed, 1);
- show();
- }
+ }
+ program {
+ name: "pressed";
+ signal: "pressed";
+ script {
+ set_int(isPressed, 1);
+ show();
}
- program {
- name: "checked";
- signal: "checked";
- script {
- set_int(isChecked, 1);
- show();
- }
+ }
+ program {
+ name: "checked";
+ signal: "checked";
+ script {
+ set_int(isChecked, 1);
+ show();
}
- program {
- name: "focused";
- signal: "focused";
- script {
- set_int(isFocused, 1);
- show();
- }
+ }
+ program {
+ name: "focused";
+ signal: "focused";
+ script {
+ set_int(isFocused, 1);
+ show();
+ }
+ }
+ program {
+ name: "hovered";
+ signal: "hovered";
+ script {
}
- program {
- name: "reset";
- signal: "reset";
- script {
- set_int(isEnabled, 0);
- set_int(isPressed, 0);
- set_int(isChecked, 0);
- set_int(isFocused, 0);
- show();
- }
+ }
+ program {
+ name: "reset";
+ signal: "reset";
+ script {
+ set_int(isEnabled, 0);
+ set_int(isPressed, 0);
+ set_int(isChecked, 0);
+ set_int(isFocused, 0);
+ show();
}
}
}
+}