browser - make it more spacey with less padding wasted
This commit is contained in:
parent
fe95c8db8b
commit
459cd830ed
|
@ -474,21 +474,31 @@ collections {
|
|||
}
|
||||
}
|
||||
|
||||
part { name: "browser2"; type: SPACER;
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
rel2.relative: 1.0 0.0;
|
||||
rel2.to_y: "controlbar";
|
||||
fixed: 1 1;
|
||||
}
|
||||
description { state: "fs" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1.offset: 40 0;
|
||||
rel2.offset: -41 -1;
|
||||
}
|
||||
}
|
||||
part { name: "rage.browser"; type: SWALLOW;
|
||||
description { state: "default" 0.0;
|
||||
rel.to: "browser2";
|
||||
rel1.relative: 1.0 0.0;
|
||||
rel1.offset: 40 0;
|
||||
rel2.relative: 2.0 0.0;
|
||||
rel2.offset: -41 -1;
|
||||
rel2.to_y: "controlbar";
|
||||
rel2.relative: 2.0 1.0;
|
||||
fixed: 1 1;
|
||||
visible: 0;
|
||||
}
|
||||
description { state: "visible" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1.relative: 0.0 0.0;
|
||||
rel2.relative: 1.0 0.0;
|
||||
color: 255 255 255 255;
|
||||
rel2.relative: 1.0 1.0;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
|
@ -526,6 +536,16 @@ collections {
|
|||
pos_show();
|
||||
}
|
||||
}
|
||||
program {
|
||||
signal: "state,win,fullscreen"; source: "rage";
|
||||
action: STATE_SET "fs" 0.0;
|
||||
target: "browser2";
|
||||
}
|
||||
program {
|
||||
signal: "state,win,normal"; source: "rage";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "browser2";
|
||||
}
|
||||
|
||||
part { name: "rage.list"; type: SWALLOW;
|
||||
description { state: "default" 0.0;
|
||||
|
@ -2035,8 +2055,8 @@ collections {
|
|||
description { state: "default" 0.0;
|
||||
fixed: 0 1;
|
||||
align: 0.0 0.0;
|
||||
rel1.offset: 0 10;
|
||||
rel2.offset: -1 10;
|
||||
rel1.offset: 20 10;
|
||||
rel2.offset: -21 10;
|
||||
rel2.relative: 1.0 0.0;
|
||||
color: 255 255 255 255;
|
||||
text { font: "Sans:style=Bold"; size: 10;
|
||||
|
@ -2044,20 +2064,23 @@ collections {
|
|||
min: 0 1;
|
||||
elipsis: 0;
|
||||
}
|
||||
offscale;
|
||||
}
|
||||
description { state: "fullscreen" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1.offset: 0 40;
|
||||
rel2.offset: -1 40;
|
||||
rel1.offset: 40 40;
|
||||
rel2.offset: -41 40;
|
||||
text.size: 40;
|
||||
}
|
||||
}
|
||||
part { name: "rage.content"; type: SWALLOW;
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
rel1.to_y: "rage.title";
|
||||
rel1.relative: 0.0 1.0;
|
||||
rel1.offset: 0 10;
|
||||
rel2.offset: -1 -1;
|
||||
offscale;
|
||||
}
|
||||
description { state: "fullscreen" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
|
@ -2115,70 +2138,9 @@ collections {
|
|||
rel2.to: "clip";
|
||||
}
|
||||
}
|
||||
part { name: "glow"; type: RECT; mouse_events: 0;
|
||||
description { state: "default" 0.0;
|
||||
rel1.to: "clip";
|
||||
rel2.to: "clip";
|
||||
color: 51 153 255 0;
|
||||
visible: 0;
|
||||
}
|
||||
description { state: "selected" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
rel1.to: "p1";
|
||||
rel1.relative: 0.75 0.75;
|
||||
rel2.to: "p2";
|
||||
rel2.relative: 0.25 0.25;
|
||||
color: 51 153 255 255;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
program {
|
||||
signal: "rage,state,selected"; source: "rage";
|
||||
action: STATE_SET "selected" 0.0;
|
||||
transition: SINUSOIDAL 0.1;
|
||||
target: "glow";
|
||||
target: "clip";
|
||||
}
|
||||
program {
|
||||
signal: "rage,state,unselected"; source: "rage";
|
||||
action: STATE_SET "default" 0.0;
|
||||
transition: SINUSOIDAL 0.3;
|
||||
target: "glow";
|
||||
target: "clip";
|
||||
}
|
||||
|
||||
part { name: "p1"; type: SPACER;
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
rel2.relative: 0.0 0.0;
|
||||
align: 0.0 0.0;
|
||||
min: 8 8;
|
||||
fixed: 1 1;
|
||||
}
|
||||
description { state: "fullscreen" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
min: 16 16;
|
||||
}
|
||||
}
|
||||
part { name: "p2"; type: SPACER;
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
rel1.relative: 1.0 1.0;
|
||||
align: 1.0 1.0;
|
||||
min: 8 8;
|
||||
fixed: 1 1;
|
||||
}
|
||||
description { state: "fullscreen" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
min: 16 16;
|
||||
}
|
||||
}
|
||||
part { name: "clip"; type: RECT;
|
||||
description { state: "default" 0.0;
|
||||
rel1.to: "p1";
|
||||
rel1.relative: 1.0 1.0;
|
||||
rel2.to: "p2";
|
||||
rel2.relative: 0.0 0.0;
|
||||
color: 192 192 192 255;
|
||||
}
|
||||
description { state: "selected" 0.0;
|
||||
|
@ -2208,9 +2170,9 @@ collections {
|
|||
description { state: "default" 0.0;
|
||||
fixed: 1 1;
|
||||
align: 0.0 1.0;
|
||||
rel1.offset: 2 2;
|
||||
rel1.offset: 5 5;
|
||||
rel1.to: "clip";
|
||||
rel2.offset: -3 -3;
|
||||
rel2.offset: -6 -10;
|
||||
rel2.to: "clip";
|
||||
color: 255 255 255 255;
|
||||
text { font: "Sans"; size: 20;
|
||||
|
@ -2219,6 +2181,7 @@ collections {
|
|||
min: 0 1;
|
||||
elipsis: 0;
|
||||
}
|
||||
offscale;
|
||||
}
|
||||
description { state: "fullscreen" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
|
@ -2227,6 +2190,36 @@ collections {
|
|||
text.style: "browser_item_label_fullscreen";
|
||||
}
|
||||
}
|
||||
part { name: "glow"; type: RECT; mouse_events: 0;
|
||||
scale: 1;
|
||||
description { state: "default" 0.0;
|
||||
rel.to: "clip";
|
||||
rel1.relative: 0.0 1.0;
|
||||
align: 0.0 1.0;
|
||||
color: 51 153 255 0;
|
||||
visible: 0;
|
||||
}
|
||||
description { state: "selected" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
min: 0 5;
|
||||
color: 51 153 255 255;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
program {
|
||||
signal: "rage,state,selected"; source: "rage";
|
||||
action: STATE_SET "selected" 0.0;
|
||||
transition: SINUSOIDAL 0.1;
|
||||
target: "glow";
|
||||
target: "clip";
|
||||
}
|
||||
program {
|
||||
signal: "rage,state,unselected"; source: "rage";
|
||||
action: STATE_SET "default" 0.0;
|
||||
transition: SINUSOIDAL 0.3;
|
||||
target: "glow";
|
||||
target: "clip";
|
||||
}
|
||||
part { name: "event"; type: RECT;
|
||||
ignore_flags: ON_HOLD;
|
||||
description { state: "default" 0.0;
|
||||
|
@ -2242,14 +2235,10 @@ collections {
|
|||
program { signal: "state,fullscreen"; source: "rage";
|
||||
action: STATE_SET "fullscreen" 0.0;
|
||||
target: "rage.title";
|
||||
target: "p1";
|
||||
target: "p2";
|
||||
}
|
||||
program { signal: "state,normal"; source: "rage";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "rage.title";
|
||||
target: "p1";
|
||||
target: "p2";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,8 +65,8 @@ static void
|
|||
_item_size_get(Evas_Object *win, Evas_Coord *w, Evas_Coord *h)
|
||||
{
|
||||
Evas_Coord sz = 0;
|
||||
Evas_Coord minw = 80, minh = 80;
|
||||
Evas_Coord maxw = 120, maxh = 120;
|
||||
Evas_Coord minw = 100, minh = 100;
|
||||
Evas_Coord maxw = 140, maxh = 140;
|
||||
|
||||
minw = elm_config_scale_get() * (double)minw;
|
||||
minh = elm_config_scale_get() * (double)minh;
|
||||
|
@ -90,7 +90,7 @@ _item_size_get(Evas_Object *win, Evas_Coord *w, Evas_Coord *h)
|
|||
if (*h < minh) *h = minh;
|
||||
if ((maxw > 0) && (*w > maxw)) *w = maxw;
|
||||
if ((maxh > 0) && (*h > maxh)) *h = maxh;
|
||||
if (((*w * 100) / *h) < 50) *w = (*h * 50) / 100;
|
||||
if (((*w * 100) / *h) < 50) *w = (*h * 50) / 100;
|
||||
else if (((*w * 100) / *h) > 150) *w = (*h * 150) / 100;
|
||||
if (*w < minw) *w = minw;
|
||||
if (*h < minh) *h = minh;
|
||||
|
@ -286,6 +286,7 @@ _cb_file_selected(void *data, Evas_Object *obj, const char *sig EINA_UNUSED, con
|
|||
const char *file = evas_object_data_get(obj, "file");
|
||||
|
||||
elm_layout_signal_emit(obj, "rage,state,selected", "rage");
|
||||
evas_object_raise(obj);
|
||||
_activate(win, entry, file);
|
||||
snprintf(buf, sizeof(buf), "%s/%s", entry->path, file);
|
||||
if (selfile) free(selfile);
|
||||
|
@ -356,7 +357,10 @@ _entry_files_pop(Evas_Object *win, Entry *entry)
|
|||
evas_object_show(o);
|
||||
|
||||
if ((entry->sel) && (entry->sel_x == i) && (entry->sel_y == j))
|
||||
elm_layout_signal_emit(base, "rage,state,selected", "rage");
|
||||
{
|
||||
elm_layout_signal_emit(base, "rage,state,selected", "rage");
|
||||
evas_object_raise(base);
|
||||
}
|
||||
|
||||
i++;
|
||||
if (i == entry->cols)
|
||||
|
@ -735,6 +739,7 @@ _sel_go(Evas_Object *win EINA_UNUSED, Entry *base_entry, int x, int y)
|
|||
entry->sel_y = 0;
|
||||
o = _sel_object_find(entry);
|
||||
elm_layout_signal_emit(o, "rage,state,selected", "rage");
|
||||
evas_object_raise(o);
|
||||
eina_lock_release(&(entry->lock));
|
||||
eina_list_free(flatlist);
|
||||
}
|
||||
|
@ -784,7 +789,11 @@ _sel_go(Evas_Object *win EINA_UNUSED, Entry *base_entry, int x, int y)
|
|||
o = _sel_object_find(entry);
|
||||
if (o) elm_layout_signal_emit(o, "rage,state,unselected", "rage");
|
||||
o = _sel_object_find(subentry);
|
||||
if (o) elm_layout_signal_emit(o, "rage,state,selected", "rage");
|
||||
if (o)
|
||||
{
|
||||
elm_layout_signal_emit(o, "rage,state,selected", "rage");
|
||||
evas_object_raise(o);
|
||||
}
|
||||
elm_scroller_region_bring_in
|
||||
(sc,
|
||||
(tbx - bxx) + (subentry->sel_x * subentry->iw),
|
||||
|
@ -819,7 +828,11 @@ _sel_go(Evas_Object *win EINA_UNUSED, Entry *base_entry, int x, int y)
|
|||
o = _sel_object_find(entry);
|
||||
if (o) elm_layout_signal_emit(o, "rage,state,unselected", "rage");
|
||||
o = _sel_object_find(subentry);
|
||||
if (o) elm_layout_signal_emit(o, "rage,state,selected", "rage");
|
||||
if (o)
|
||||
{
|
||||
elm_layout_signal_emit(o, "rage,state,selected", "rage");
|
||||
evas_object_raise(o);
|
||||
}
|
||||
elm_scroller_region_bring_in
|
||||
(sc,
|
||||
(tbx - bxx) + (subentry->sel_x * subentry->iw),
|
||||
|
@ -838,7 +851,11 @@ _sel_go(Evas_Object *win EINA_UNUSED, Entry *base_entry, int x, int y)
|
|||
entry->sel_y = sel_y;
|
||||
evas_object_geometry_get(entry->table, &tbx, &tby, NULL, NULL);
|
||||
o = _sel_object_find(entry);
|
||||
if (o) elm_layout_signal_emit(o, "rage,state,selected", "rage");
|
||||
if (o)
|
||||
{
|
||||
elm_layout_signal_emit(o, "rage,state,selected", "rage");
|
||||
evas_object_raise(o);
|
||||
}
|
||||
elm_scroller_region_bring_in
|
||||
(sc,
|
||||
(tbx - bxx) + (entry->sel_x * entry->iw),
|
||||
|
@ -879,6 +896,7 @@ _sel_do(Evas_Object *win, Entry *base_entry)
|
|||
char buf[PATH_MAX];
|
||||
|
||||
elm_layout_signal_emit(o, "rage,state,selected", "rage");
|
||||
evas_object_raise(o);
|
||||
_activate(win, entry, file);
|
||||
snprintf(buf, sizeof(buf), "%s/%s", entry->path, file);
|
||||
if (selfile) free(selfile);
|
||||
|
|
Loading…
Reference in New Issue