forked from enlightenment/enventor
setting: polish gui.
This commit is contained in:
parent
431c055a8f
commit
4725daefd3
|
@ -458,12 +458,13 @@ group { name: "text_setting_layout";
|
||||||
description {
|
description {
|
||||||
rel1.relative: 0 0;
|
rel1.relative: 0 0;
|
||||||
rel2.relative: 1 0;
|
rel2.relative: 1 0;
|
||||||
|
rel1.offset: 0 3;
|
||||||
align: 0.5 0;
|
align: 0.5 0;
|
||||||
min: 0 24;
|
min: 0 24;
|
||||||
fixed: 0 1;
|
fixed: 0 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
part { name: "elm.swallow.preference";
|
part { name: "elm.swallow.font_size";
|
||||||
type: SWALLOW;
|
type: SWALLOW;
|
||||||
scale: 1;
|
scale: 1;
|
||||||
description {
|
description {
|
||||||
|
@ -476,7 +477,7 @@ group { name: "text_setting_layout";
|
||||||
rel1 { to_y: "preference_frame"; relative: 0 1; }
|
rel1 { to_y: "preference_frame"; relative: 0 1; }
|
||||||
rel2 { to_y: "preference_frame"; }
|
rel2 { to_y: "preference_frame"; }
|
||||||
align: 0.5 0;
|
align: 0.5 0;
|
||||||
min: 0 10;
|
min: 0 5;
|
||||||
fixed: 0 1;
|
fixed: 0 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -485,7 +486,7 @@ group { name: "text_setting_layout";
|
||||||
scale: 1;
|
scale: 1;
|
||||||
effect: SHADOW BOTTOM;
|
effect: SHADOW BOTTOM;
|
||||||
description {
|
description {
|
||||||
rel1 { to: "padding1"; relative: 0 1; offset: 5 0; }
|
rel1 { to: "padding1"; relative: 0 1; offset: 2 0; }
|
||||||
rel2 { to: "padding1"; relative: 0.65 1; }
|
rel2 { to: "padding1"; relative: 0.65 1; }
|
||||||
color: COL_NM;
|
color: COL_NM;
|
||||||
min: 0 20;
|
min: 0 20;
|
||||||
|
@ -494,7 +495,7 @@ group { name: "text_setting_layout";
|
||||||
text {
|
text {
|
||||||
font: FN;
|
font: FN;
|
||||||
text: "Double click a keyword to change its color :";
|
text: "Double click a keyword to change its color :";
|
||||||
size: 11;
|
size: 10;
|
||||||
align: 0 0.5;
|
align: 0 0.5;
|
||||||
min: 1 0;
|
min: 1 0;
|
||||||
ellipsis: -1;
|
ellipsis: -1;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
typedef struct preference_setting_s
|
typedef struct preference_setting_s
|
||||||
{
|
{
|
||||||
Evas_Object *scroller;
|
Evas_Object *box;
|
||||||
Evas_Object *view_size_w_entry;
|
Evas_Object *view_size_w_entry;
|
||||||
Evas_Object *view_size_h_entry;
|
Evas_Object *view_size_h_entry;
|
||||||
Evas_Object *toggle_tools;
|
Evas_Object *toggle_tools;
|
||||||
|
@ -113,19 +113,24 @@ preference_setting_content_get(preference_setting_data *psd,
|
||||||
static Elm_Entry_Filter_Limit_Size limit_filter_data;
|
static Elm_Entry_Filter_Limit_Size limit_filter_data;
|
||||||
|
|
||||||
if (!psd) return NULL;
|
if (!psd) return NULL;
|
||||||
if (psd->scroller) return psd->scroller;
|
if (psd->box) return psd->box;
|
||||||
|
|
||||||
//Preference
|
//Preference
|
||||||
Evas_Object *scroller = elm_scroller_add(parent);
|
|
||||||
|
|
||||||
//Box
|
//Box
|
||||||
Evas_Object *box = elm_box_add(scroller);
|
Evas_Object *box = elm_box_add(parent);
|
||||||
elm_box_padding_set(box, 0, 10);
|
elm_box_padding_set(box, 0, ELM_SCALE_SIZE(5));
|
||||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
evas_object_show(box);
|
evas_object_show(box);
|
||||||
|
|
||||||
elm_object_content_set(scroller, box);
|
Evas_Object *rect;
|
||||||
|
|
||||||
|
//Spacer
|
||||||
|
rect = evas_object_rectangle_add(evas_object_evas_get(box));
|
||||||
|
evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, 0);
|
||||||
|
evas_object_size_hint_min_set(rect, 0, ELM_SCALE_SIZE(1));
|
||||||
|
elm_box_pack_end(box, rect);
|
||||||
|
|
||||||
Evas_Object *box2;
|
Evas_Object *box2;
|
||||||
Evas_Object *layout_padding3;
|
Evas_Object *layout_padding3;
|
||||||
|
@ -135,7 +140,7 @@ preference_setting_content_get(preference_setting_data *psd,
|
||||||
//Box for View Size
|
//Box for View Size
|
||||||
box2 = elm_box_add(box);
|
box2 = elm_box_add(box);
|
||||||
elm_box_horizontal_set(box2, EINA_TRUE);
|
elm_box_horizontal_set(box2, EINA_TRUE);
|
||||||
elm_box_padding_set(box2, 5 * elm_config_scale_get(), 0);
|
elm_box_padding_set(box2, ELM_SCALE_SIZE(5), 0);
|
||||||
evas_object_size_hint_weight_set(box2, EVAS_HINT_EXPAND, 0);
|
evas_object_size_hint_weight_set(box2, EVAS_HINT_EXPAND, 0);
|
||||||
evas_object_size_hint_align_set(box2, EVAS_HINT_FILL, 0);
|
evas_object_size_hint_align_set(box2, EVAS_HINT_FILL, 0);
|
||||||
evas_object_show(box2);
|
evas_object_show(box2);
|
||||||
|
@ -158,7 +163,7 @@ preference_setting_content_get(preference_setting_data *psd,
|
||||||
label_view_size);
|
label_view_size);
|
||||||
|
|
||||||
//Spacer
|
//Spacer
|
||||||
Evas_Object *rect = evas_object_rectangle_add(evas_object_evas_get(box2));
|
rect = evas_object_rectangle_add(evas_object_evas_get(box2));
|
||||||
evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
elm_box_pack_end(box2, rect);
|
elm_box_pack_end(box2, rect);
|
||||||
|
@ -235,7 +240,7 @@ preference_setting_content_get(preference_setting_data *psd,
|
||||||
evas_object_size_hint_align_set(toggle_smart_undo_redo, EVAS_HINT_FILL, 0);
|
evas_object_size_hint_align_set(toggle_smart_undo_redo, EVAS_HINT_FILL, 0);
|
||||||
elm_box_pack_end(box, toggle_smart_undo_redo);
|
elm_box_pack_end(box, toggle_smart_undo_redo);
|
||||||
|
|
||||||
psd->scroller = scroller;
|
psd->box = box;
|
||||||
psd->view_size_w_entry = entry_view_size_w;
|
psd->view_size_w_entry = entry_view_size_w;
|
||||||
psd->view_size_h_entry = entry_view_size_h;
|
psd->view_size_h_entry = entry_view_size_h;
|
||||||
psd->toggle_tools = toggle_tools;
|
psd->toggle_tools = toggle_tools;
|
||||||
|
@ -244,7 +249,7 @@ preference_setting_content_get(preference_setting_data *psd,
|
||||||
psd->toggle_autocomp = toggle_autocomp;
|
psd->toggle_autocomp = toggle_autocomp;
|
||||||
psd->toggle_smart_undo_redo = toggle_smart_undo_redo;
|
psd->toggle_smart_undo_redo = toggle_smart_undo_redo;
|
||||||
|
|
||||||
return scroller;
|
return box;
|
||||||
}
|
}
|
||||||
|
|
||||||
preference_setting_data *
|
preference_setting_data *
|
||||||
|
@ -263,6 +268,6 @@ void
|
||||||
preference_setting_term(preference_setting_data *psd)
|
preference_setting_term(preference_setting_data *psd)
|
||||||
{
|
{
|
||||||
if (!psd) return;
|
if (!psd) return;
|
||||||
evas_object_del(psd->scroller);
|
evas_object_del(psd->box);
|
||||||
free(psd);
|
free(psd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -781,17 +781,13 @@ text_setting_content_get(text_setting_data *tsd, Evas_Object *parent)
|
||||||
elm_object_focus_set(entry, EINA_TRUE);
|
elm_object_focus_set(entry, EINA_TRUE);
|
||||||
elm_object_part_content_set(layout, "elm.swallow.text_setting", entry);
|
elm_object_part_content_set(layout, "elm.swallow.text_setting", entry);
|
||||||
|
|
||||||
//Preference
|
|
||||||
Evas_Object *scroller = elm_scroller_add(layout);
|
|
||||||
elm_object_part_content_set(layout, "elm.swallow.preference", scroller);
|
|
||||||
|
|
||||||
//Box
|
//Box
|
||||||
Evas_Object *box = elm_box_add(scroller);
|
Evas_Object *box = elm_box_add(layout);
|
||||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0);
|
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0);
|
||||||
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, 0);
|
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, 0);
|
||||||
evas_object_show(box);
|
evas_object_show(box);
|
||||||
|
|
||||||
elm_object_content_set(scroller, box);
|
elm_object_part_content_set(layout, "elm.swallow.font_size", box);
|
||||||
|
|
||||||
//Font Size (Box)
|
//Font Size (Box)
|
||||||
Evas_Object *box2 = elm_box_add(box);
|
Evas_Object *box2 = elm_box_add(box);
|
||||||
|
@ -821,7 +817,7 @@ text_setting_content_get(text_setting_data *tsd, Evas_Object *parent)
|
||||||
|
|
||||||
//Font Name and Style (Box)
|
//Font Name and Style (Box)
|
||||||
box = elm_box_add(layout);
|
box = elm_box_add(layout);
|
||||||
elm_box_padding_set(box, 0, 10);
|
elm_box_padding_set(box, 0, ELM_SCALE_SIZE(5));
|
||||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_object_part_content_set(layout, "elm.swallow.font", box);
|
elm_object_part_content_set(layout, "elm.swallow.font", box);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue