net gadget: try to improve the theme

* make the 2 monitors fill based on tx/rx percentage vals
* try a more bluish version (still need a bit of love)

Note that this is not working atm (okra need to fix in E)
This commit is contained in:
Davide Andreoli 2017-01-15 16:05:21 +01:00
parent 051013f4e1
commit 262f8dae34
9 changed files with 78 additions and 111 deletions

View File

@ -489,7 +489,6 @@ elementary/themes/img/icon_wallpaper_within.png \
elementary/themes/img/icon_warning.png \ elementary/themes/img/icon_warning.png \
elementary/themes/img/ic_win_move.png \ elementary/themes/img/ic_win_move.png \
elementary/themes/img/ic_win_resize.png \ elementary/themes/img/ic_win_resize.png \
elementary/themes/img/idle.png \
elementary/themes/img/img_example_1.png \ elementary/themes/img/img_example_1.png \
elementary/themes/img/img_example_2.png \ elementary/themes/img/img_example_2.png \
elementary/themes/img/inset_bar_horiz_base.png \ elementary/themes/img/inset_bar_horiz_base.png \
@ -574,6 +573,10 @@ elementary/themes/img/mini_blue_glow_arrow_3.png \
elementary/themes/img/mini_box_bevel_shadow.png \ elementary/themes/img/mini_box_bevel_shadow.png \
elementary/themes/img/mini_box_glow.png \ elementary/themes/img/mini_box_glow.png \
elementary/themes/img/music_control_icon.png \ elementary/themes/img/music_control_icon.png \
elementary/themes/img/netstatus_base.png \
elementary/themes/img/netstatus_over.png \
elementary/themes/img/netstatus_tx.png \
elementary/themes/img/netstatus_rx.png \
elementary/themes/img/outline_glow.png \ elementary/themes/img/outline_glow.png \
elementary/themes/img/packagekit_base.png \ elementary/themes/img/packagekit_base.png \
elementary/themes/img/pointer_entry_bar.png \ elementary/themes/img/pointer_entry_bar.png \
@ -589,7 +592,6 @@ elementary/themes/img/runner_glow_horiz.png \
elementary/themes/img/runner_glow_vert.png \ elementary/themes/img/runner_glow_vert.png \
elementary/themes/img/runner_horiz.png \ elementary/themes/img/runner_horiz.png \
elementary/themes/img/runner_vert.png \ elementary/themes/img/runner_vert.png \
elementary/themes/img/rx.png \
elementary/themes/img/screen_base.png \ elementary/themes/img/screen_base.png \
elementary/themes/img/screen_bg.png \ elementary/themes/img/screen_bg.png \
elementary/themes/img/screen_circular_shadow.png \ elementary/themes/img/screen_circular_shadow.png \
@ -679,7 +681,6 @@ elementary/themes/img/tooltip-edge-bottom-tip.png \
elementary/themes/img/tooltip-edge-left-tip.png \ elementary/themes/img/tooltip-edge-left-tip.png \
elementary/themes/img/tooltip-edge-right-tip.png \ elementary/themes/img/tooltip-edge-right-tip.png \
elementary/themes/img/tooltip-edge-top-tip.png \ elementary/themes/img/tooltip-edge-top-tip.png \
elementary/themes/img/tx.png \
elementary/themes/img/vert_bar_inset.png \ elementary/themes/img/vert_bar_inset.png \
elementary/themes/img/vert_glow_run.png \ elementary/themes/img/vert_glow_run.png \
elementary/themes/img/vert_glow_range.png \ elementary/themes/img/vert_glow_range.png \

View File

@ -1,118 +1,84 @@
group { name: "e/modules/netstatus/main"; group { name: "e/modules/netstatus/main";
image: "rx.png" COMP; image: "netstatus_rx.png" COMP;
image: "tx.png" COMP; image: "netstatus_tx.png" COMP;
image: "idle.png" COMP; image: "netstatus_base.png" COMP;
parts { image: "netstatus_over.png" COMP;
part { name: "fade_clip"; type: RECT; script {
description { state: "default" 0.0; public message(Msg_Type:type, id, ...) {
color: 255 255 255 255; if ((type == MSG_INT_SET) && (id == 1)) {
} // new rxcur = getarg(2);
} new rxper = getarg(3);
part { name: "rx"; type: IMAGE; // new rxmax = getarg(4);
mouse_events: 0; // new txcur = getarg(5);
description { state: "default" 0.0; new txper = getarg(6);
aspect: 1.0 1.0; // new txmax = getarg(7);
aspect_preference: BOTH;
visible: 0; new Float:val = rxper / 100.0;
rel1.to: "base"; custom_state(PART:"rx_clip", "default", 0.0);
rel2.to: "base"; set_state_val(PART:"rx_clip", STATE_REL1, 0.0, 1.0 - val);
image.normal: "rx.png"; set_state(PART:"rx_clip", "custom", 0.0);
color: 255 255 255 0;
} val = txper / 100.0;
description { state: "active" 0.0; custom_state(PART:"tx_clip", "default", 0.0);
inherit: "default" 0.0; set_state_val(PART:"tx_clip", STATE_REL1, 0.0, 1.0 - val);
visible: 1; set_state(PART:"tx_clip", "custom", 0.0);
color: 255 255 255 255;
}
}
part { name: "tx"; type: IMAGE;
mouse_events: 0;
description { state: "default" 0.0;
aspect: 1.0 1.0;
aspect_preference: BOTH;
visible: 0;
rel1.to: "base";
rel2.to: "base";
image.normal: "tx.png";
color: 255 255 255 0;
}
description { state: "active" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part { name: "base";
clip_to: "fade_clip";
description { state: "default" 0.0;
aspect: 1.0 1.0;
aspect_preference: BOTH;
image.normal: "idle.png";
}
}
part { name: "e.text.received"; type: TEXT; mouse_events: 0;
scale: 1;
effect: SHADOW BOTTOM;
clip_to: "fade_clip";
description { state: "default" 0.0;
color_class: "module_label";
color3: 255 255 255 255;
rel1.relative: 0.1 0.0;
rel2.relative: 0.9 0.5;
text { font: FNBOLD;
fit: 1 1;
elipsis: -1;
align: 0.5 0.5;
text_class: "module_small";
}
}
}
part { name: "e.text.transmitted"; type: TEXT; mouse_events: 0;
scale: 1;
effect: SHADOW BOTTOM;
clip_to: "fade_clip";
description { state: "default" 0.0;
color_class: "module_label";
color3: 255 255 255 255;
rel1.relative: 0.1 0.5;
rel2.relative: 0.9 1.0;
text { font: FNBOLD;
fit: 1 1;
elipsis: -1;
align: 0.5 0.5;
text_class: "module_small";
}
} }
} }
} }
programs { parts {
program { name: "received"; part { name: "base";
signal: "e,state,received,active"; description { state: "default" 0.0;
source: "e"; aspect: 1.0 1.0;
action: STATE_SET "active" 0.0; aspect_preference: BOTH;
target: "rx"; image.normal: "netstatus_base.png";
transition: SINUSOIDAL 0.25; }
} }
program { name: "received_idle"; part { name: "rx_spacer"; type: SPACER;
signal: "e,state,received,idle"; description { state: "default" 0.0;
source: "e"; rel1.relative: 0.32 0.33;
action: STATE_SET "default" 0.0; rel2.relative: 0.98 0.78;
target: "rx"; }
transition: SINUSOIDAL 0.25;
} }
program { name: "transmitted"; part { name: "rx_clip"; type: RECT;
signal: "e,state,transmitted,active"; description { state: "default" 0.0;
source: "e"; rel1.to: "rx_spacer";
action: STATE_SET "active" 0.0; rel2.to: "rx_spacer";
target: "tx"; }
transition: SINUSOIDAL 0.25;
} }
program { name: "transmitted_idle"; part { name: "rx"; type: IMAGE;
signal: "e,state,transmitted,idle"; clip_to: "rx_clip";
source: "e"; description { state: "default" 0.0;
action: STATE_SET "default" 0.0; rel1.to: "base";
target: "tx"; rel2.to: "base";
transition: SINUSOIDAL 0.25; image.normal: "netstatus_rx.png";
}
}
part { name: "tx_spacer"; type: SPACER;
description { state: "default" 0.0;
rel1.relative: 0.04 0.08;
rel2.relative: 0.68 0.50;
}
}
part { name: "tx_clip"; type: RECT;
description { state: "default" 0.0;
rel1.to: "tx_spacer";
rel2.to: "tx_spacer";
}
}
part { name: "tx"; type: IMAGE;
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;
rel1.to: "base";
rel2.to: "base";
image.normal: "netstatus_over.png";
}
} }
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB