statusbar - ellipsis group name when the string is long.

This commit is contained in:
ChunEon Park 2014-02-04 19:18:43 +09:00
parent 21e992a341
commit 13d1a9f2c8
2 changed files with 20 additions and 4 deletions

View File

@ -1,6 +1,6 @@
styles {
style { name: "entry_statusbar_style";
base: "font="FN" font_size=11 text_class=entry color=#ffffff style=shadow,bottom shadow_color=#00000080 glow_color=#3399ff18 valign=0.5";
base: "font="FN" font_size=11 text_class=entry color=#ffffff style=shadow,bottom shadow_color=#00000080 glow_color=#3399ff18 valign=0.5 ellipsis=1.0 wrap=none";
}
}
@ -163,7 +163,7 @@ group { name: "statusbar_layout";
text.style: "entry_statusbar_style";
}
}
part { name: "elm.text.file_group_name";
part { name: "elm.text.group_name";
type: TEXTBLOCK;
scale: 1;
clip_to: "base_clip";
@ -178,6 +178,22 @@ group { name: "statusbar_layout";
text.style: "entry_statusbar_style";
}
}
part { name: "elm.text.group_name_bracket";
type: TEXTBLOCK;
scale: 1;
clip_to: "base_clip";
description {
rel1.to_x: "elm.text.group_name";
rel1.relative: 1 0.0;
rel2.to_x: "elm.text.group_name";
rel2.relative: 1 1.0;
min: 3 14;
align: 0 0.5;
fixed: 1 1;
text.style: "entry_statusbar_style";
text.text: "]";
}
}
part { name: "elm.text.line";
type: TEXTBLOCK;
scale: 1;

View File

@ -24,8 +24,8 @@ void
stats_edc_group_set(stats_data *sd, Eina_Stringshare *group_name)
{
char buf[1028];
snprintf(buf, sizeof(buf), "<align=right>Group [<style=glow><color=#3399ff>%s</color></style>]</align>", group_name);
elm_object_part_text_set(sd->layout, "elm.text.file_group_name", buf);
snprintf(buf, sizeof(buf), "<align=right>Group [<style=glow><color=#3399ff>%s</color></style></align>", group_name);
elm_object_part_text_set(sd->layout, "elm.text.group_name", buf);
sd->group_name = eina_stringshare_add(group_name);
}