forked from enlightenment/enventor
bin/console: improve the console usage.
show the console with the default size if it's size is 0 when toggle is clicked. this is improvement for those people who doesn't understand that nothing is happened when console toggle is clicked.
This commit is contained in:
parent
fb6c3be3c2
commit
d8f471fd02
|
@ -143,7 +143,7 @@ config_load(void)
|
||||||
}
|
}
|
||||||
cd->font_scale = 1.0f;
|
cd->font_scale = 1.0f;
|
||||||
cd->view_scale = 1;
|
cd->view_scale = 1;
|
||||||
cd->console_size = 0.175;
|
cd->console_size = DEFAULT_CONSOLE_SIZE;
|
||||||
cd->stats_bar = EINA_TRUE;
|
cd->stats_bar = EINA_TRUE;
|
||||||
cd->linenumber = EINA_TRUE;
|
cd->linenumber = EINA_TRUE;
|
||||||
cd->part_highlight = EINA_TRUE;
|
cd->part_highlight = EINA_TRUE;
|
||||||
|
|
|
@ -60,6 +60,9 @@ v_unpress_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
|
||||||
double size = elm_panes_content_right_size_get(obj);
|
double size = elm_panes_content_right_size_get(obj);
|
||||||
if (pd->vert.last_size[0] != size) pd->vert.last_size[1] = size;
|
if (pd->vert.last_size[0] != size) pd->vert.last_size[1] = size;
|
||||||
config_console_size_set(size);
|
config_console_size_set(size);
|
||||||
|
|
||||||
|
double origin = elm_panes_content_right_size_get(pd->vert.obj);
|
||||||
|
if (origin == 0.0) pd->vert.state = PANES_EDITORS_EXPAND;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -98,6 +101,13 @@ panes_v_full_view_cancel(panes_data *pd)
|
||||||
pd->vert.origin = elm_panes_content_right_size_get(pd->vert.obj);
|
pd->vert.origin = elm_panes_content_right_size_get(pd->vert.obj);
|
||||||
pd->vert.delta = pd->vert.last_size[1] - pd->vert.origin;
|
pd->vert.delta = pd->vert.last_size[1] - pd->vert.origin;
|
||||||
|
|
||||||
|
//init console size to default
|
||||||
|
if (pd->vert.delta == 0.0)
|
||||||
|
{
|
||||||
|
pd->vert.delta = DEFAULT_CONSOLE_SIZE;
|
||||||
|
config_console_size_set(DEFAULT_CONSOLE_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
Elm_Transit *transit = elm_transit_add();
|
Elm_Transit *transit = elm_transit_add();
|
||||||
elm_transit_effect_add(transit, transit_op_v, pd, NULL);
|
elm_transit_effect_add(transit, transit_op_v, pd, NULL);
|
||||||
elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE);
|
elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_DECELERATE);
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#define DEFAULT_CONSOLE_SIZE 0.175
|
||||||
|
|
||||||
Evas_Object *console_create(Evas_Object *parent);
|
Evas_Object *console_create(Evas_Object *parent);
|
||||||
void console_text_set(Evas_Object *console, const char *text);
|
void console_text_set(Evas_Object *console, const char *text);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue