forked from enlightenment/enlightenment
polish up icon only and text only options in tasks - mentioned by
zmike. needed code changes. SVN revision: 81320
This commit is contained in:
parent
911e610feb
commit
ed479f04ab
|
@ -115,7 +115,7 @@ group { name:"e/modules/tasks/item";
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
rel1.relative: 1.0 0.0;
|
rel1.relative: 1.0 0.0;
|
||||||
rel1.offset: 2 3;
|
rel1.offset: 2 3;
|
||||||
rel1.to_x: "icon";
|
rel1.to_x: "icon2";
|
||||||
rel1.to_y: "sel_base";
|
rel1.to_y: "sel_base";
|
||||||
rel2.offset: -5 -5;
|
rel2.offset: -5 -5;
|
||||||
rel2.to: "sel_base";
|
rel2.to: "sel_base";
|
||||||
|
@ -144,6 +144,31 @@ group { name:"e/modules/tasks/item";
|
||||||
rel2.offset: 3 -4;
|
rel2.offset: 3 -4;
|
||||||
rel2.to: "sel_base";
|
rel2.to: "sel_base";
|
||||||
}
|
}
|
||||||
|
description { state: "icon_only" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
align: 0.5 0.5;
|
||||||
|
rel1.offset: 2 2;
|
||||||
|
rel2.relative: 1.0 1.0;
|
||||||
|
rel2.offset: -3 -3;
|
||||||
|
}
|
||||||
|
description { state: "text_only" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
fixed: 1 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part { name: "icon2"; type: SPACER;
|
||||||
|
description { state: "default" 0.0;
|
||||||
|
rel1.to: "icon";
|
||||||
|
rel2.to: "icon";
|
||||||
|
}
|
||||||
|
description { state: "icon_only" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
}
|
||||||
|
description { state: "text_only" 0.0;
|
||||||
|
inherit: "default" 0.0;
|
||||||
|
fixed: 1 1;
|
||||||
|
rel2.relative: 0.0 1.0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
part { name: "icon_clip"; type: RECT;
|
part { name: "icon_clip"; type: RECT;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
|
@ -317,6 +342,18 @@ group { name:"e/modules/tasks/item";
|
||||||
target: "e.text.label";
|
target: "e.text.label";
|
||||||
target: "icon_clip";
|
target: "icon_clip";
|
||||||
}
|
}
|
||||||
|
program {
|
||||||
|
signal: "e,state,icon_only"; source: "e";
|
||||||
|
action: STATE_SET "icon_only" 0.0;
|
||||||
|
target: "icon";
|
||||||
|
target: "icon2";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
signal: "e,state,text_only"; source: "e";
|
||||||
|
action: STATE_SET "text_only" 0.0;
|
||||||
|
target: "icon";
|
||||||
|
target: "icon2";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -390,13 +390,16 @@ _tasks_refill(Tasks *tasks)
|
||||||
{
|
{
|
||||||
item = tasks->items->data;
|
item = tasks->items->data;
|
||||||
edje_object_size_min_calc(item->o_item, &w, &h);
|
edje_object_size_min_calc(item->o_item, &w, &h);
|
||||||
if (tasks->horizontal)
|
if (!tasks->config->icon_only)
|
||||||
{
|
{
|
||||||
if (w < tasks->config->minw) w = tasks->config->minw;
|
if (tasks->horizontal)
|
||||||
}
|
{
|
||||||
else
|
if (w < tasks->config->minw) w = tasks->config->minw;
|
||||||
{
|
}
|
||||||
if (h < tasks->config->minh) h = tasks->config->minh;
|
else
|
||||||
|
{
|
||||||
|
if (h < tasks->config->minh) h = tasks->config->minh;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!tasks->gcc->resizable)
|
if (!tasks->gcc->resizable)
|
||||||
{
|
{
|
||||||
|
@ -506,6 +509,16 @@ _tasks_item_new(Tasks *tasks, E_Border *border)
|
||||||
"base/theme/modules/tasks",
|
"base/theme/modules/tasks",
|
||||||
"e/modules/tasks/item");
|
"e/modules/tasks/item");
|
||||||
}
|
}
|
||||||
|
if (tasks->config->text_only)
|
||||||
|
{
|
||||||
|
edje_object_signal_emit(item->o_item, "e,state,text_only", "e");
|
||||||
|
edje_object_message_signal_process(item->o_item);
|
||||||
|
}
|
||||||
|
else if (tasks->config->icon_only)
|
||||||
|
{
|
||||||
|
edje_object_signal_emit(item->o_item, "e,state,icon_only", "e");
|
||||||
|
edje_object_message_signal_process(item->o_item);
|
||||||
|
}
|
||||||
evas_object_event_callback_add(item->o_item, EVAS_CALLBACK_MOUSE_DOWN,
|
evas_object_event_callback_add(item->o_item, EVAS_CALLBACK_MOUSE_DOWN,
|
||||||
_tasks_cb_item_mouse_down, item);
|
_tasks_cb_item_mouse_down, item);
|
||||||
evas_object_event_callback_add(item->o_item, EVAS_CALLBACK_MOUSE_UP,
|
evas_object_event_callback_add(item->o_item, EVAS_CALLBACK_MOUSE_UP,
|
||||||
|
|
Loading…
Reference in New Issue