Skip to content

Commit

Permalink
Adjust temp size to the gadcon when desciption is hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
thewaiter committed Nov 30, 2020
1 parent e4aaa96 commit 06ceb88
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
18 changes: 18 additions & 0 deletions forecasts.edc
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@ collections {
}
}
description {
state: "hidden" 0.0;
inherit: "default" 0.0;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
to: "icon";
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
to: "icon";
}
text.align: 0.5 1.0;
}
description {
state: "float" 0.0;
inherit: "default" 0.0;
rel1 {
Expand Down Expand Up @@ -659,20 +674,23 @@ collections {
source: "e";
action: STATE_SET "hidden" 0.0;
target: "e.text.description";
target: "e.text.temp";
}
program {
name: "text_show_default";
signal: "e,state,description,show,default";
source: "e";
action: STATE_SET "default" 0.0;
target: "e.text.description";
target: "e.text.temp";
}
program {
name: "text_show_float";
signal: "e,state,description,show,float";
source: "e";
action: STATE_SET "float" 0.0;
target: "e.text.description";
target: "e.text.temp";
}
program {
name: "float";
Expand Down
6 changes: 3 additions & 3 deletions src/e_mod_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,9 +670,9 @@ _fc_display_set(Instance *inst, Eina_Bool ok __UNUSED__)
else
if (inst->gcc->gadcon->orient == E_GADCON_ORIENT_FLOAT)
edje_object_signal_emit(inst->forecasts_obj, "e,state,description,show,float", "e");
else
edje_object_signal_emit(inst->forecasts_obj, "e,state,description,show,def", "e");
else
edje_object_signal_emit(inst->forecasts_obj, "e,state,description,show,default", "e");

if (inst->gcc->gadcon->orient == E_GADCON_ORIENT_FLOAT)
snprintf(buf, sizeof(buf), "%d °%c", inst->condition.temp, inst->units.temp);
else
Expand Down

0 comments on commit 06ceb88

Please sign in to comment.