forked from enlightenment/enlightenment
Tiling2: Implemented window padding.
Thanks to cippp for the feature request + some code.
This commit is contained in:
parent
b4df3d18a1
commit
d83e18f21e
|
@ -364,7 +364,8 @@ _reapply_tree(void)
|
||||||
{
|
{
|
||||||
e_zone_useful_geometry_get(_G.tinfo->desk->zone, &zx, &zy, &zw, &zh);
|
e_zone_useful_geometry_get(_G.tinfo->desk->zone, &zx, &zy, &zw, &zh);
|
||||||
|
|
||||||
tiling_window_tree_apply(_G.tinfo->tree, zx, zy, zw, zh);
|
tiling_window_tree_apply(_G.tinfo->tree, zx, zy, zw, zh,
|
||||||
|
tiling_g.config->nb_space);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -256,7 +256,7 @@ tiling_window_tree_client_find(Window_Tree * root, E_Client * client)
|
||||||
|
|
||||||
void
|
void
|
||||||
_tiling_window_tree_level_apply(Window_Tree * root, Evas_Coord x, Evas_Coord y,
|
_tiling_window_tree_level_apply(Window_Tree * root, Evas_Coord x, Evas_Coord y,
|
||||||
Evas_Coord w, Evas_Coord h, int level)
|
Evas_Coord w, Evas_Coord h, int level, Evas_Coord padding)
|
||||||
{
|
{
|
||||||
Window_Tree *itr;
|
Window_Tree *itr;
|
||||||
Tiling_Split_Type split_type = level % 2;
|
Tiling_Split_Type split_type = level % 2;
|
||||||
|
@ -264,7 +264,8 @@ _tiling_window_tree_level_apply(Window_Tree * root, Evas_Coord x, Evas_Coord y,
|
||||||
|
|
||||||
if (root->client)
|
if (root->client)
|
||||||
{
|
{
|
||||||
tiling_e_client_move_resize_extra(root->client, x, y, w, h);
|
tiling_e_client_move_resize_extra(root->client, x, y,
|
||||||
|
w - padding, h - padding);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +276,7 @@ _tiling_window_tree_level_apply(Window_Tree * root, Evas_Coord x, Evas_Coord y,
|
||||||
Evas_Coord itw = w * itr->weight;
|
Evas_Coord itw = w * itr->weight;
|
||||||
|
|
||||||
total_weight += itr->weight;
|
total_weight += itr->weight;
|
||||||
_tiling_window_tree_level_apply(itr, x, y, itw, h, level + 1);
|
_tiling_window_tree_level_apply(itr, x, y, itw, h, level + 1, padding);
|
||||||
x += itw;
|
x += itw;
|
||||||
}
|
}
|
||||||
} else if (split_type == TILING_SPLIT_VERTICAL)
|
} else if (split_type == TILING_SPLIT_VERTICAL)
|
||||||
|
@ -285,7 +286,7 @@ _tiling_window_tree_level_apply(Window_Tree * root, Evas_Coord x, Evas_Coord y,
|
||||||
Evas_Coord ith = h * itr->weight;
|
Evas_Coord ith = h * itr->weight;
|
||||||
|
|
||||||
total_weight += itr->weight;
|
total_weight += itr->weight;
|
||||||
_tiling_window_tree_level_apply(itr, x, y, w, ith, level + 1);
|
_tiling_window_tree_level_apply(itr, x, y, w, ith, level + 1, padding);
|
||||||
y += ith;
|
y += ith;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -296,9 +297,10 @@ _tiling_window_tree_level_apply(Window_Tree * root, Evas_Coord x, Evas_Coord y,
|
||||||
|
|
||||||
void
|
void
|
||||||
tiling_window_tree_apply(Window_Tree * root, Evas_Coord x, Evas_Coord y,
|
tiling_window_tree_apply(Window_Tree * root, Evas_Coord x, Evas_Coord y,
|
||||||
Evas_Coord w, Evas_Coord h)
|
Evas_Coord w, Evas_Coord h, Evas_Coord padding)
|
||||||
{
|
{
|
||||||
_tiling_window_tree_level_apply(root, x, y, w, h, 0);
|
_tiling_window_tree_level_apply(root, x + padding, y + padding,
|
||||||
|
w - padding, h - padding, 0, padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Window_Tree *
|
static Window_Tree *
|
||||||
|
|
|
@ -43,7 +43,7 @@ Window_Tree *tiling_window_tree_client_find(Window_Tree * root,
|
||||||
E_Client * client);
|
E_Client * client);
|
||||||
|
|
||||||
void tiling_window_tree_apply(Window_Tree * root, Evas_Coord x, Evas_Coord y,
|
void tiling_window_tree_apply(Window_Tree * root, Evas_Coord x, Evas_Coord y,
|
||||||
Evas_Coord w, Evas_Coord h);
|
Evas_Coord w, Evas_Coord h, Evas_Coord padding);
|
||||||
|
|
||||||
Eina_Bool tiling_window_tree_node_resize(Window_Tree * node, int w_dir,
|
Eina_Bool tiling_window_tree_node_resize(Window_Tree * node, int w_dir,
|
||||||
double w_diff, int h_dir, double h_diff);
|
double w_diff, int h_dir, double h_diff);
|
||||||
|
|
Loading…
Reference in New Issue