This commit is contained in:
Boris Faure 2019-10-10 21:16:54 +02:00
parent e21be6619b
commit fc865e97b0
2 changed files with 34 additions and 9 deletions

View File

@ -1287,6 +1287,7 @@ collections {
target: "tableft";
target: "tabmiddle";
target: "tabright";
target: "tab_btn";
target: "bevel";
target: "glintclip";
target: "tab_bevel_bottom";
@ -1313,6 +1314,7 @@ collections {
target: "tableft";
target: "tabmiddle";
target: "tabright";
target: "tab_btn";
target: "bevel";
target: "glintclip";
target: "tab_bevel_bottom";
@ -1332,6 +1334,21 @@ collections {
target: "tabtitle";
target: "tabclose";
}
part { name: "tab_btn"; type: RECT;
mouse_events: 0;
description { state: "default" 0.0;
rel1.relative: 1.0 0.0;
rel2.to_y: "tabmiddle";
color: 250 0 250 255;
visible: 0;
min: 64 16;
fixed: 1 1;
}
description { state: "tab" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
part { name: "terminology.tab"; type: SWALLOW;
mouse_events: 0;
@ -1348,11 +1365,12 @@ collections {
// some slot for dragable parts to stay in along top edge of bg
part { name: "tabdrag"; type: SPACER;
description { state: "default" 0.0;
rel2.relative: 1.0 0.0;
rel2.relative: 0.0 0.0;
rel2.to_x: "tab_btn";
fixed: 1 1;
}
}
// left boundary of the active tab (ragable 0.0 -> 1.0)
// left boundary of the active tab (dragable 0.0 -> 1.0)
part { name: "terminology.tabl"; type: SPACER;
dragable.x: 1 1 0;
dragable.confine: "tabdrag";
@ -1362,12 +1380,13 @@ collections {
fixed: 1 1;
}
}
// right boundary of the active tab (ragable 0.0 -> 1.0)
// right boundary of the active tab (dragable 0.0 -> 1.0)
part { name: "terminology.tabr"; type: SPACER;
dragable.x: 1 1 0;
dragable.confine: "tabdrag";
description { state: "default" 0.0;
rel2.relative: 1.0 0.0;
rel2.relative: 0.0 0.0;
rel2.to_x: "tab_btn";
max: 1 1;
fixed: 1 1;
}
@ -1461,12 +1480,15 @@ collections {
visible: 1;
}
}
/*TODO boris */
part { name: "tabright"; type: RECT;
mouse_events: 0;
description { state: "default" 0.0;
rel1.to: "terminology.tab";
rel1.relative: 1.0 0.0;
rel2.to_x: "tab_btn";
rel2.to_y: "tabmiddle";
rel2.relative: 0.0 1.0;
color: 0 0 0 0;
visible: 0;
fixed: 1 1;

View File

@ -2899,7 +2899,7 @@ _tabbar_fill(Tabs *tabs)
edje_object_part_swallow(term->bg, "terminology.tabl.content", o);
evas_object_show(o);
}
if (i < (n - 1))
//if (i < (n - 1))
{
term->tabbar.r.box = o = elm_box_add(tabs->tc.wn->win);
elm_box_horizontal_set(o, EINA_TRUE);
@ -2925,6 +2925,7 @@ _tabbar_fill(Tabs *tabs)
edje_object_part_text_set(o, "terminology.title",
tab_item->tc->title);
edje_object_size_min_calc(o, &w, &h);
ERR("back: w:%d h:%d", w, h);
evas_object_size_hint_min_set(o, w, h);
assert(i != j);
if (j < i)
@ -3884,7 +3885,6 @@ _tabs_refresh(Tabs *tabs)
term->tabcount_spacer);
edje_object_part_text_set(term->bg, "terminology.tabcount.label", buf);
edje_object_part_text_set(term->bg, "terminology.tabmissed.label", bufmissed);
edje_object_signal_emit(term->bg, "tabcount,on", "terminology");
// this is all below just for tab bar at the top
if (term->config->show_tabs)
{
@ -3892,12 +3892,14 @@ _tabs_refresh(Tabs *tabs)
v1 = (double)(i-1) / (double)n;
v2 = (double)i / (double)n;
edje_object_signal_emit(term->bg, "tabcount,off", "terminology");
elm_coords_finger_size_adjust(1, &w, 1, &h);
if (!term->tab_spacer)
{
term->tab_spacer = evas_object_rectangle_add(
evas_object_evas_get(term->bg));
evas_object_color_set(term->tab_spacer, 0, 0, 0, 0);
elm_coords_finger_size_adjust(1, &w, 1, &h);
evas_object_size_hint_min_set(term->tab_spacer, w, h);
edje_object_part_swallow(term->bg, "terminology.tab", term->tab_spacer);
edje_object_part_drag_value_set(term->bg, "terminology.tabl", v1, 0.0);
@ -3905,24 +3907,24 @@ _tabs_refresh(Tabs *tabs)
edje_object_part_text_set(term->bg, "terminology.tab.title",
solo->tc.title);
edje_object_signal_emit(term->bg, "tabbar,on", "terminology");
edje_object_message_signal_process(term->bg);
}
else
{
edje_object_part_drag_value_set(term->bg, "terminology.tabl", v1, 0.0);
edje_object_part_drag_value_set(term->bg, "terminology.tabr", v2, 0.0);
edje_object_message_signal_process(term->bg);
}
_tabbar_fill(tabs);
}
else
{
edje_object_signal_emit(term->bg, "tabcount,on", "terminology");
_tabbar_clear(term);
}
if (missed > 0)
edje_object_signal_emit(term->bg, "tabmissed,on", "terminology");
else
edje_object_signal_emit(term->bg, "tabmissed,off", "terminology");
edje_object_message_signal_process(term->bg);
}
static Tab_Item*
@ -5788,6 +5790,7 @@ _cb_tabregion_change(void *data,
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
evas_object_size_hint_min_set(term->tab_region_base, w, h);
ERR("tab region %d %d", w ,h);
elm_layout_content_set(term->base, "terminology.tabregion",
term->tab_region_base);
}