This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch devs/devilhorns/apos
in repository efl.

View the commit online.

commit cdbbf0b1e5b7a0a0759ee967ca92e1aff4969d01
Author: Carsten Haitzler <ras...@rasterman.com>
AuthorDate: Sun May 28 23:26:18 2023 +0100

    elm theme - add sort header radio style
---
 data/elementary/themes/edc/elm/radio.edc | 298 +++++++++++++++++++++++++++++++
 src/bin/elementary/test_radio.c          |   9 +
 2 files changed, 307 insertions(+)

diff --git a/data/elementary/themes/edc/elm/radio.edc b/data/elementary/themes/edc/elm/radio.edc
index becfdbee99..c2ecb59a1e 100644
--- a/data/elementary/themes/edc/elm/radio.edc
+++ b/data/elementary/themes/edc/elm/radio.edc
@@ -908,3 +908,301 @@ group { name: "elm/radio/base/icon";
       }
    }
 }
+
+group { name: "elm/radio/base/sort_header";
+   script {
+      BUTTONMODE_SCRIPT
+      public sel;
+      public eval_sel(m) {
+         if (m) {
+            set_state(PART:"ck_check", "selected", 0.0);
+         } else {
+            set_state(PART:"ck_check", "default", 0.0);
+         }
+      }
+   }
+   parts {
+      part { name: "shadow"; type: SPACER;
+         description { state: "default";
+         }
+         desc { "pressed"; inherit;
+         }
+         desc { "disabled"; inherit;
+         }
+      }
+      swallow { "elm.swallow.background"; nomouse;
+         desc { "default";
+            visible: 0;
+         }
+         desc { "visible"; inherit;
+            visible: 1;
+         }
+      }
+      rect { "icon_clip";
+         desc { "default";
+            color: 255 255 255 255; // no cc
+         }
+         desc { "pressed"; inherit;
+            color: 255 255 255 255; // no cc
+         }
+         desc { "disabled"; inherit;
+            color: 255 255 255 64; // no cc
+         }
+      }
+      swallow { "elm.swallow.content"; nomouse;
+         clip_to: "icon_clip";
+         scale: 1;
+         desc { "default";
+            fixed: 1 0;
+            align: 0.0 0.5;
+            rel1.to_x: "base";
+            rel2.to_x: "base";
+            rel1.offset: 4 4;
+            rel1.relative: 1.0 0.0;
+            rel2.relative: 0.0 1.0;
+            rel2.offset: 4 -5;
+            visible: 0;
+            offscale;
+         }
+         desc { "visible"; inherit;
+            fixed: 1 0;
+            aspect: 1.0 1.0;
+            min: ICMIN ICMIN;
+            visible: 1;
+         }
+         desc { "icononly"; inherit;
+            fixed: 0 0;
+            align: 0.5 0.5;
+            rel2.relative: 1.0 1.0;
+            rel2.offset: -5 -5;
+            rel2.to_x: "";
+            visible: 1;
+            min: ICMIN ICMIN;
+         }
+      }
+      part { name: "base"; type: RECT;
+         scale: 1;
+         description { state: "default";
+            fixed: 1 0;
+            align: 0.0 0.5;
+            min: 13 13;
+            max: 13 13;
+            rel1.offset: 4 4;
+            rel2.relative: 0.0 1.0;
+            rel2.offset: 4 -5;
+            aspect: 1.0 1.0; aspect_preference: VERTICAL;
+            offscale;
+            visible: 0;
+            offscale;
+         }
+         desc { "pressed"; inherit;
+         }
+         desc { "disabled"; inherit;
+         }
+      }
+      part { name: "ck_bg";
+         scale: 1;
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            rel.to: "base";
+            image.normal: "i-arrow-d";
+            min: 15 15;
+            max: 15 15;
+            color_class: "/bg/normal/radio/base";
+         }
+         desc { "disabled"; inherit;
+            color_class: "/bg/disabled/radio/base";
+         }
+      }
+      part { name: "ck_check";
+         scale: 1;
+         description { state: "default" 0.0;
+            color_class: "/fg/selected/radio/radio";
+            rel.to: "base";
+            image.normal: "i-arrow-d";
+            min: 15 15;
+            max: 15 15;
+            fixed: 1 1;
+            visible: 0;
+         }
+         description { state: "selected" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+         desc { "disabled"; inherit;
+            visible: 0;
+         }
+      }
+      part { name: "ck_press";
+         scale: 1;
+         description { state: "default" 0.0;
+            color_class: "/fg/pressed/radio/radio";
+            fixed: 1 1;
+            rel.to: "base";
+            image.normal: "i-arrow-d";
+            min: 15 15;
+            max: 15 15;
+            visible: 0;
+         }
+         description { state: "pressed" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+      text { "elm.text"; nomouse;
+         scale: 1;
+         desc { "default";
+            fixed: 0 1;
+            color_class: "/fg/normal/radio/text";
+            rel1.offset: 0 4;
+            rel1.relative: 1.0 0.0;
+            rel1.to_x: "elm.swallow.content";
+            rel2.offset: -5 -5;
+            text { font: FN; size: 10;
+               align: 0.0 0.5;
+               min: 0 0;
+               ellipsis: 0;
+            }
+            visible: 0;
+            offscale;
+            min: 0 ICMIN;
+         }
+         desc { "visible"; inherit;
+            fixed: 0 0;
+            rel1.offset: 4 4;
+//            text.min: 1 1;
+//            text.ellipsis: -1;
+            visible: 1;
+         }
+         desc { "pressed_visible"; inherit;
+            fixed: 0 0;
+            color_class: "/fg/pressed/radio/text";
+            rel1.offset: 4 4;
+//            text.min: 1 1;
+//            text.ellipsis: -1;
+            visible: 1;
+         }
+         desc { "textonly"; inherit;
+            fixed: 0 0;
+//            text.min: 1 1;
+//            text.ellipsis: -1;
+            visible: 1;
+         }
+         desc { "pressed_textonly"; inherit;
+            fixed: 0 0;
+            color_class: "/fg/pressed/radio/text";
+//            text.min: 1 1;
+//            text.ellipsis: -1;
+            visible: 1;
+         }
+         desc { "disabled_visible"; inherit;
+            fixed: 0 0;
+            color_class: "/fg/disabled/radio/text";
+            rel1.offset: 4 4;
+//            text.min: 1 1;
+//            text.ellipsis: -1;
+            visible: 1;
+         }
+         desc { "disabled_textonly"; inherit;
+            fixed: 0 0;
+            color_class: "/fg/disabled/radio/text";
+//            text.min: 1 1;
+//            text.ellipsis: -1;
+            visible: 1;
+         }
+      }
+      rect { "event";
+         ignore_flags: ON_HOLD;
+         desc { "default";
+            color: 0 0 0 0; // no cc
+         }
+         desc { "disabled"; inherit;
+            visible: 0;
+         }
+      }
+   }
+   programs {
+      program { signal: "mouse,clicked,1"; source: "event";
+         action: SIGNAL_EMIT "elm,action,radio,toggle" "elm";
+      }
+      program { signal: "elm,state,radio,on"; source: "elm";
+         script {
+            new m = get_int(sel) | SELECTED;
+            set_int(sel, m);
+            eval_sel(m);
+         }
+      }
+      program { signal: "elm,state,radio,off"; source: "elm";
+         script {
+            new m = get_int(sel) & ~SELECTED;
+            set_int(sel, m);
+            eval_sel(m);
+         }
+      }
+      program { signal: "mouse,down,1"; source: "event";
+         action: SIGNAL_EMIT "elm,action,press" "elm";
+         after: "button_click_anim";
+      }
+      program { name: "button_click_anim";
+         script { flag_set(PRESSED); }
+      }
+      program { signal: "mouse,down,1"; source: "event";
+         script { eval_sel(get_int(sel) | SELECTED); }
+      }
+      program { signal: "mouse,up,1"; source: "event";
+         action: SIGNAL_EMIT "elm,action,unpress" "elm";
+         after: "button_unclick_anim";
+      }
+      program { name: "button_unclick_anim";
+         script { flag_unset(PRESSED); }
+      }
+      program { signal: "mouse,up,1"; source: "event";
+         script { eval_sel(get_int(sel)); }
+      }
+      program { signal: "mouse,clicked,1"; source: "event";
+         action: SIGNAL_EMIT "elm,action,click" "elm";
+      }
+      program { signal: "elm,state,text,visible"; source: "elm";
+         script { flag_set(LABEL); }
+      }
+      program { signal: "elm,state,text,hidden"; source: "elm";
+         script { flag_unset(LABEL); }
+      }
+      program { signal: "elm,state,icon,visible"; source: "elm";
+         script { flag_set(ICON); }
+      }
+      program { signal: "elm,state,icon,hidden"; source: "elm";
+         script { flag_unset(ICON); }
+      }
+      program { signal: "elm,state,background,visible"; source: "elm";
+         script { flag_set(BACKGROUND); }
+      }
+      program { signal: "elm,state,background,hidden"; source: "elm";
+         script { flag_unset(BACKGROUND); }
+      }
+      program { signal: "elm,state,disabled"; source: "elm";
+         script { flag_set(DISABLE); }
+      }
+      program { signal: "elm,state,enabled"; source: "elm";
+         script { flag_unset(DISABLE); }
+      }
+      program { signal: "elm,state,disabled"; source: "elm";
+         action:  STATE_SET "disabled" 0.0;
+         target: "ck_check";
+         target: "ck_bg";
+      }
+      program { signal: "elm,state,enabled"; source: "elm";
+         action:  STATE_SET "default" 0.0;
+         target: "ck_check";
+         target: "ck_bg";
+      }
+      program { signal: "mouse,down,1"; source: "event";
+         action: STATE_SET "pressed" 0.0;
+         target: "ck_press";
+      }
+      program { signal: "mouse,up,1"; source: "event";
+         action: STATE_SET "default" 0.0;
+         target: "ck_press";
+      }
+   }
+}
diff --git a/src/bin/elementary/test_radio.c b/src/bin/elementary/test_radio.c
index d27494f8d9..571c0b9d62 100644
--- a/src/bin/elementary/test_radio.c
+++ b/src/bin/elementary/test_radio.c
@@ -217,5 +217,14 @@ test_radio(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
    _group_1_create(bx, "icon");
    _group_2_create(bx, "icon");
 
+   bx = elm_box_add(win);
+   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   elm_box_horizontal_set(bx, EINA_TRUE);
+   elm_box_pack_end(bx0, bx);
+   evas_object_show(bx);
+
+   _group_1_create(bx, "sort_header");
+   _group_2_create(bx, "sort_header");
+
    evas_object_show(win);
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to