From: Dave Andreoli Date: Sun, 27 Aug 2017 09:46:39 +0000 (+0200) Subject: Netstatus gadget: a new decent design X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~2932 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39288d12c2f9a12fd9e55c4f676118be7915a2b1;p=platform%2Fupstream%2Fefl.git Netstatus gadget: a new decent design I'm still not really happy with this design, because 2 arrows are not enough to understand it is "network"... but at least it looks good now :) --- diff --git a/data/elementary/themes/edc/netstatus.edc b/data/elementary/themes/edc/netstatus.edc index 53eecc2..c4157d4 100644 --- a/data/elementary/themes/edc/netstatus.edc +++ b/data/elementary/themes/edc/netstatus.edc @@ -14,17 +14,15 @@ group { name: "e/gadget/netstatus/main"; new txper = getarg(6); // new txmax = getarg(7); - new val = rxper + 155; - if (val == 155) val = 0; - custom_state(PART:"rx", "default", 0.0); - set_state_val(PART:"rx", STATE_COLOR, 255, 255, 255, val); - set_state(PART:"rx", "custom", 0.0); + new Float:val = rxper / 100.0; + custom_state(PART:"rx_clip", "default", 0.0); + set_state_val(PART:"rx_clip", STATE_REL2, 1.0, val); + set_state(PART:"rx_clip", "custom", 0.0); - val = txper + 155; - if (val == 155) val = 0; - custom_state(PART:"tx", "default", 0.0); - set_state_val(PART:"tx", STATE_COLOR, 255, 255, 255, val); - set_state(PART:"tx", "custom", 0.0); + val = txper / 100.0; + custom_state(PART:"tx_clip", "default", 0.0); + set_state_val(PART:"tx_clip", STATE_REL1, 0.0, 1.0 - val); + set_state(PART:"tx_clip", "custom", 0.0); } } } @@ -36,19 +34,45 @@ group { name: "e/gadget/netstatus/main"; image.normal: "netstatus_base.png"; } } + part { name: "rx_spacer"; type: SPACER; + description { state: "default" 0.0; + rel1.relative: 0.0 0.09; + rel2.relative: 1.0 0.91; + } + } + part { name: "rx_clip"; type: RECT; + description { state: "default" 0.0; + rel1.to: "rx_spacer"; + rel2.to: "rx_spacer"; + } + } part { name: "rx"; type: IMAGE; - description { state: "default" 0.0; - rel1.to: "base"; - rel2.to: "base"; - image.normal: "netstatus_rx.png"; - } + clip_to: "rx_clip"; + description { state: "default" 0.0; + rel1.to: "base"; + rel2.to: "base"; + image.normal: "netstatus_rx.png"; + } + } + part { name: "tx_spacer"; type: SPACER; + description { state: "default" 0.0; + rel1.relative: 0.0 0.09; + rel2.relative: 1.0 0.91; + } + } + part { name: "tx_clip"; type: RECT; + description { state: "default" 0.0; + rel1.to: "tx_spacer"; + rel2.to: "tx_spacer"; + } } part { name: "tx"; type: IMAGE; - description { state: "default" 0.0; - rel1.to: "base"; - rel2.to: "base"; - image.normal: "netstatus_tx.png"; - } + clip_to: "tx_clip"; + description { state: "default" 0.0; + rel1.to: "base"; + rel2.to: "base"; + image.normal: "netstatus_tx.png"; + } } part { name: "over"; description { state: "default" 0.0; diff --git a/data/elementary/themes/img/netstatus_base.png b/data/elementary/themes/img/netstatus_base.png index cdc8e20..44340ce 100644 Binary files a/data/elementary/themes/img/netstatus_base.png and b/data/elementary/themes/img/netstatus_base.png differ diff --git a/data/elementary/themes/img/netstatus_over.png b/data/elementary/themes/img/netstatus_over.png index fdd2f9d..df208a6 100644 Binary files a/data/elementary/themes/img/netstatus_over.png and b/data/elementary/themes/img/netstatus_over.png differ diff --git a/data/elementary/themes/img/netstatus_rx.png b/data/elementary/themes/img/netstatus_rx.png index 1fa2655..49df2ce 100644 Binary files a/data/elementary/themes/img/netstatus_rx.png and b/data/elementary/themes/img/netstatus_rx.png differ diff --git a/data/elementary/themes/img/netstatus_tx.png b/data/elementary/themes/img/netstatus_tx.png index ef23e11..cdc5254 100644 Binary files a/data/elementary/themes/img/netstatus_tx.png and b/data/elementary/themes/img/netstatus_tx.png differ diff --git a/data/elementary/themes/orig/netstatus.xcf.gz b/data/elementary/themes/orig/netstatus.xcf.gz new file mode 100644 index 0000000..94f3cd1 Binary files /dev/null and b/data/elementary/themes/orig/netstatus.xcf.gz differ