Ephoto: Hide controls on edit, fix a bug with undo+redo, improve settings popup.

master
Stephen 'Okra' Houston 6 years ago
parent f207845f10
commit f9b35bfd45
  1. 6
      src/bin/ephoto_bcg.c
  2. 6
      src/bin/ephoto_color.c
  3. 21
      src/bin/ephoto_config.c
  4. 4
      src/bin/ephoto_cropper.c
  5. 2
      src/bin/ephoto_directory_browser.c
  6. 6
      src/bin/ephoto_editor.c
  7. 16
      src/bin/ephoto_file.c
  8. 6
      src/bin/ephoto_filters.c
  9. 6
      src/bin/ephoto_hsv.c
  10. 12
      src/bin/ephoto_main.c
  11. 4
      src/bin/ephoto_red_eye.c
  12. 6
      src/bin/ephoto_scale.c
  13. 26
      src/bin/ephoto_single_browser.c
  14. 10
      src/bin/ephoto_slideshow.c
  15. 8
      src/bin/ephoto_thumb_browser.c

@ -363,7 +363,7 @@ ephoto_bcg_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Obje
elm_slider_value_set(slider, 1);
elm_slider_unit_format_set(slider, "%1.2f");
elm_slider_indicator_format_set(slider, "%1.2f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_gamma_slider_changed, ebcg);
@ -378,7 +378,7 @@ ephoto_bcg_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Obje
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.0f");
elm_slider_indicator_format_set(slider, "%1.0f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_contrast_slider_changed, ebcg);
@ -393,7 +393,7 @@ ephoto_bcg_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Obje
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.0f");
elm_slider_indicator_format_set(slider, "%1.0f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_brightness_slider_changed, ebcg);

@ -348,7 +348,7 @@ ephoto_color_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Ob
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.0f");
elm_slider_indicator_format_set(slider, "%1.0f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_blue_slider_changed, eco);
@ -363,7 +363,7 @@ ephoto_color_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Ob
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.0f");
elm_slider_indicator_format_set(slider, "%1.0f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_green_slider_changed, eco);
@ -378,7 +378,7 @@ ephoto_color_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Ob
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.0f");
elm_slider_indicator_format_set(slider, "%1.0f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_red_slider_changed, eco);

@ -80,7 +80,7 @@ _config_general(Ephoto *ephoto, Evas_Object *parent)
check = elm_check_add(table);
elm_object_text_set(check, _("Show Folders On Start"));
EPHOTO_ALIGN(check, 0.0, 0.5);
EPHOTO_ALIGN(check, EVAS_HINT_FILL, 0.5);
elm_check_state_set(check, ephoto->config->folders);
elm_table_pack(table, check, 0, 0, 1, 1);
evas_object_show(check);
@ -128,7 +128,7 @@ _config_general(Ephoto *ephoto, Evas_Object *parent)
_open_hv_select, ephoto);
elm_object_text_set(hoversel, ephoto->config->open);
evas_object_data_set(hoversel, "ephoto", ephoto);
EPHOTO_WEIGHT(hoversel, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(hoversel, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_FILL(hoversel);
elm_table_pack(table, hoversel, 0, 5, 1, 1);
evas_object_show(hoversel);
@ -370,7 +370,7 @@ _config_bindings(Evas_Object *parent)
entry = elm_entry_add(scroller);
elm_entry_editable_set(entry, EINA_FALSE);
elm_entry_line_wrap_set(entry, ELM_WRAP_NONE);
EPHOTO_WEIGHT(entry, 0.0, 0.0);
EPHOTO_WEIGHT(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(entry);
eina_strbuf_append_printf(sbuf,
_("<b><hilight>General Bindings</hilight></b><br/>"
@ -431,6 +431,7 @@ static Evas_Object *
_config_about(Evas_Object *parent)
{
Evas_Object *frame, *box, *entry, *img, *lbl;
Evas_Object *scroller;
Eina_Strbuf *sbuf = eina_strbuf_new();
char ver[PATH_MAX];
FILE *f;
@ -441,11 +442,17 @@ _config_about(Evas_Object *parent)
EPHOTO_FILL(frame);
evas_object_show(frame);
scroller = elm_scroller_add(frame);
EPHOTO_EXPAND(scroller);
EPHOTO_FILL(scroller);
elm_object_content_set(frame, scroller);
evas_object_show(scroller);
box = elm_box_add(frame);
elm_box_horizontal_set(box, EINA_FALSE);
EPHOTO_EXPAND(box);
EPHOTO_FILL(box);
elm_object_content_set(frame, box);
elm_object_content_set(scroller, box);
evas_object_show(box);
img = elm_image_add(box);
@ -471,11 +478,11 @@ _config_about(Evas_Object *parent)
elm_entry_anchor_hover_parent_set(entry, parent);
elm_entry_editable_set(entry, EINA_FALSE);
elm_entry_context_menu_disabled_set(entry, EINA_TRUE);
elm_entry_line_wrap_set(entry, ELM_WRAP_NONE);
EPHOTO_WEIGHT(entry, 0.0, 0.0);
elm_entry_line_wrap_set(entry, ELM_WRAP_WORD);
EPHOTO_WEIGHT(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(entry);
eina_strbuf_append_printf(sbuf,
_("Ephoto is a comprehensive image viewer based on the EFL. For more<br/>"
_("Ephoto is a comprehensive image viewer based on the EFL. For more"
"information, please visit the Ephoto project page:<br/>"
"<a href=http://www.smhouston.us/ephoto/>"
"http://www.smhouston.us/ephoto/</a><br/><br/>"

@ -708,7 +708,7 @@ ephoto_cropper_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent,
elm_slider_unit_format_set(ec->croph, "%1.0f");
elm_slider_indicator_format_set(ec->croph, "%1.0f");
elm_object_text_set(ec->croph, _("Height"));
EPHOTO_WEIGHT(ec->croph, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(ec->croph, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(ec->croph, EVAS_HINT_FILL, 0.5);
elm_box_pack_start(ec->editor, ec->croph);
evas_object_smart_callback_add(ec->croph, "slider,drag,stop",
@ -721,7 +721,7 @@ ephoto_cropper_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent,
elm_slider_unit_format_set(ec->cropw, "%1.0f");
elm_slider_indicator_format_set(ec->cropw, "%1.0f");
elm_object_text_set(ec->cropw, _("Width"));
EPHOTO_WEIGHT(ec->cropw, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(ec->cropw, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(ec->cropw, EVAS_HINT_FILL, 0.5);
elm_box_pack_start(ec->editor, ec->cropw);
evas_object_smart_callback_add(ec->cropw, "slider,drag,stop",

@ -446,7 +446,7 @@ _dir_go_trash(void *data, Evas_Object *obj EINA_UNUSED,
but = elm_button_add(db->leftbox);
elm_object_text_set(but, _("Back"));
elm_object_part_content_set(but, "icon", ic);
EPHOTO_WEIGHT(but, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(but, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_FILL(but);
evas_object_smart_callback_add(but, "clicked", _trash_back, db);
elm_box_pack_end(db->leftbox, but);

@ -58,7 +58,7 @@ ephoto_editor_add(Ephoto *ephoto, const char *title, const char *data_name,
elm_object_text_set(button, _("Reset"));
elm_object_part_content_set(button, "icon", ic);
evas_object_smart_callback_add(button, "clicked", _editor_reset, box);
EPHOTO_WEIGHT(button, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(button, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_FILL(button);
elm_box_pack_end(box, button);
evas_object_show(button);
@ -73,7 +73,7 @@ ephoto_editor_add(Ephoto *ephoto, const char *title, const char *data_name,
elm_object_text_set(button, _("Apply"));
elm_object_part_content_set(button, "icon", ic);
evas_object_smart_callback_add(button, "clicked", _editor_apply, ephoto);
EPHOTO_WEIGHT(button, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(button, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_FILL(button);
elm_box_pack_end(box, button);
evas_object_show(button);
@ -88,7 +88,7 @@ ephoto_editor_add(Ephoto *ephoto, const char *title, const char *data_name,
elm_object_text_set(button, _("Cancel"));
elm_object_part_content_set(button, "icon", ic);
evas_object_smart_callback_add(button, "clicked", _editor_cancel, ephoto);
EPHOTO_WEIGHT(button, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(button, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_FILL(button);
elm_box_pack_end(box, button);
evas_object_show(button);

@ -72,7 +72,7 @@ _prompt(Ephoto *ephoto, const char *title, const char *text)
box = elm_box_add(popup);
elm_box_horizontal_set(box, EINA_FALSE);
EPHOTO_WEIGHT(box, 0.0, 0.0);
EPHOTO_WEIGHT(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(box);
evas_object_show(box);
@ -188,7 +188,7 @@ _upload_image_complete_cb(void *data, int ev_type EINA_UNUSED, void *event)
box = elm_box_add(popup);
elm_box_horizontal_set(box, EINA_FALSE);
EPHOTO_WEIGHT(box, 0.0, 0.0);
EPHOTO_WEIGHT(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(box);
evas_object_show(box);
@ -200,7 +200,7 @@ _upload_image_complete_cb(void *data, int ev_type EINA_UNUSED, void *event)
hbox = elm_box_add(box);
elm_box_horizontal_set(hbox, EINA_TRUE);
EPHOTO_WEIGHT(hbox, 0.0, 0.0);
EPHOTO_WEIGHT(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(hbox);
elm_box_pack_end(box, hbox);
evas_object_show(hbox);
@ -370,7 +370,7 @@ _new_dir(Ephoto *ephoto, const char *file)
box = elm_box_add(popup);
elm_box_horizontal_set(box, EINA_FALSE);
EPHOTO_WEIGHT(box, 0.0, 0.0);
EPHOTO_WEIGHT(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(box);
evas_object_show(box);
@ -489,7 +489,7 @@ _rename_file(Ephoto *ephoto, const char *file)
box = elm_box_add(popup);
elm_box_horizontal_set(box, EINA_FALSE);
EPHOTO_WEIGHT(box, 0.0, 0.0);
EPHOTO_WEIGHT(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(box);
evas_object_show(box);
@ -550,7 +550,7 @@ _processing(Ephoto *ephoto, const char *title, const char *text)
box = elm_box_add(popup);
elm_box_horizontal_set(box, EINA_FALSE);
EPHOTO_WEIGHT(box, 0.0, 0.0);
EPHOTO_WEIGHT(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(box);
evas_object_show(box);
@ -562,8 +562,8 @@ _processing(Ephoto *ephoto, const char *title, const char *text)
evas_object_show(label);
pb = elm_progressbar_add(box);
EPHOTO_WEIGHT(pb, EVAS_HINT_EXPAND, 0.0);
EPHOTO_ALIGN(pb, 0.0, 0.5);
EPHOTO_WEIGHT(pb, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(pb, EVAS_HINT_FILL, 0.5);
elm_object_style_set(pb, "wheel");
elm_progressbar_pulse_set(pb, EINA_TRUE);
elm_box_pack_end(box, pb);

@ -136,7 +136,7 @@ _processing(Evas_Object *main)
box = elm_box_add(popup);
elm_box_horizontal_set(box, EINA_FALSE);
EPHOTO_WEIGHT(box, 0.0, 0.0);
EPHOTO_WEIGHT(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(box);
evas_object_show(box);
@ -149,8 +149,8 @@ _processing(Evas_Object *main)
evas_object_show(label);
pb = elm_progressbar_add(box);
EPHOTO_WEIGHT(pb, EVAS_HINT_EXPAND, 0.0);
EPHOTO_ALIGN(pb, 0.0, 0.5);
EPHOTO_WEIGHT(pb, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(pb, EVAS_HINT_FILL, 0.5);
elm_object_style_set(pb, "wheel");
elm_progressbar_pulse_set(pb, EINA_TRUE);
elm_box_pack_end(box, pb);

@ -370,7 +370,7 @@ ephoto_hsv_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Obje
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.2f");
elm_slider_indicator_format_set(slider, "%1.2f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed", _value_slider_changed,
ehsv);
@ -385,7 +385,7 @@ ephoto_hsv_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Obje
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.2f");
elm_slider_indicator_format_set(slider, "%1.2f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_saturation_slider_changed, ehsv);
@ -400,7 +400,7 @@ ephoto_hsv_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Obje
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.0f");
elm_slider_indicator_format_set(slider, "%1.0f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_hue_slider_changed, ehsv);

@ -98,8 +98,8 @@ _ephoto_single_browser_show(Ephoto *ephoto, Ephoto_Entry *entry)
static void
_ephoto_slideshow_show(Ephoto *ephoto, Ephoto_Entry *entry)
{
_ephoto_state_set(ephoto, EPHOTO_STATE_SLIDESHOW);
ephoto_slideshow_show_controls(ephoto);
if (ephoto->selentries)
ephoto_slideshow_entries_set(ephoto->slideshow, ephoto->selentries);
else if (ephoto->searchentries)
@ -111,7 +111,6 @@ _ephoto_slideshow_show(Ephoto *ephoto, Ephoto_Entry *entry)
evas_object_hide(ephoto->single_browser);
evas_object_hide(ephoto->thumb_browser);
elm_object_focus_set(ephoto->slideshow, EINA_TRUE);
_ephoto_state_set(ephoto, EPHOTO_STATE_SLIDESHOW);
elm_layout_signal_emit(ephoto->layout, "ephoto,folders,hide", "ephoto");
elm_layout_signal_emit(ephoto->layout, "ephoto,statusbar,hide", "ephoto");
evas_object_hide(ephoto->dir_browser);
@ -245,6 +244,9 @@ _resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
Ephoto *ephoto = data;
Evas_Coord w, h;
if (elm_win_fullscreen_get(ephoto->win))
return;
evas_object_geometry_get(ephoto->win, 0, 0, &w, &h);
if (w && h)
{
@ -446,7 +448,7 @@ ephoto_window_add(const char *path)
evas_object_size_hint_min_set(ephoto->statusbar, 20*elm_config_scale_get(),
20*elm_config_scale_get());
elm_box_horizontal_set(ephoto->statusbar, EINA_TRUE);
EPHOTO_WEIGHT(ephoto->statusbar, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(ephoto->statusbar, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_FILL(ephoto->statusbar);
elm_layout_content_set(ephoto->layout, "ephoto.swallow.statusbar", ephoto->statusbar);
evas_object_show(ephoto->statusbar);
@ -470,7 +472,7 @@ ephoto_window_add(const char *path)
ephoto->controls_left = elm_box_add(ephoto->statusbar);
elm_box_horizontal_set(ephoto->controls_left, EINA_TRUE);
EPHOTO_WEIGHT(ephoto->controls_left, 0.0, 0.0);
EPHOTO_WEIGHT(ephoto->controls_left, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(ephoto->controls_left);
elm_box_pack_end(ephoto->statusbar, ephoto->controls_left);
evas_object_show(ephoto->controls_left);
@ -488,7 +490,7 @@ ephoto_window_add(const char *path)
ephoto->controls_right = elm_box_add(ephoto->statusbar);
elm_box_horizontal_set(ephoto->controls_right, EINA_TRUE);
EPHOTO_WEIGHT(ephoto->controls_right, 0.0, 0.0);
EPHOTO_WEIGHT(ephoto->controls_right, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(ephoto->controls_right);
elm_box_pack_end(ephoto->statusbar, ephoto->controls_right);
evas_object_show(ephoto->controls_right);

@ -240,7 +240,7 @@ ephoto_red_eye_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_
elm_slider_value_set(slider, 15);
elm_slider_unit_format_set(slider, "%1.0f");
elm_slider_indicator_format_set(slider, "%1.0f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_radius_slider_changed, er);
@ -250,7 +250,7 @@ ephoto_red_eye_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_
label = elm_label_add(er->editor);
elm_object_text_set(label, _("<b>Click on an eye</b>"));
EPHOTO_WEIGHT(label, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(label, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(label, 0.5, 0.5);
elm_box_pack_start(er->editor, label);
evas_object_show(label);

@ -221,7 +221,7 @@ ephoto_scale_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent,
es->aspect = elm_check_add(es->editor);
elm_object_text_set(es->aspect, _("Keep Aspect"));
EPHOTO_ALIGN(es->aspect, 0.5, 0.0);
EPHOTO_ALIGN(es->aspect, 0.5, EVAS_HINT_FILL);
elm_check_state_set(es->aspect, EINA_TRUE);
elm_box_pack_start(es->editor, es->aspect);
evas_object_show(es->aspect);
@ -233,7 +233,7 @@ ephoto_scale_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent,
elm_spinner_wrap_set(es->scaleh, EINA_FALSE);
elm_spinner_min_max_set(es->scaleh, 1, 99999);
elm_spinner_value_set(es->scaleh, es->h);
EPHOTO_WEIGHT(es->scaleh, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(es->scaleh, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(es->scaleh, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(es->scaleh, "changed",
_scale_height_changed, es);
@ -247,7 +247,7 @@ ephoto_scale_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent,
elm_spinner_wrap_set(es->scalew, EINA_FALSE);
elm_spinner_min_max_set(es->scalew, 1, 99999);
elm_spinner_value_set(es->scalew, es->w);
EPHOTO_WEIGHT(es->scalew, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(es->scalew, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_ALIGN(es->scalew, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(es->scalew, "changed",
_scale_width_changed, es);

@ -56,6 +56,7 @@ struct _Ephoto_History
};
/*Common Callbacks*/
static void _ephoto_single_browser_recalc(Ephoto_Single_Browser *sb);
static const char *_ephoto_get_edje_group(const char *path);
static char *_ephoto_get_file_size(const char *path);
static void _ephoto_update_bottom_bar(Ephoto_Single_Browser *sb);
@ -499,6 +500,10 @@ _orient_apply(Ephoto_Single_Browser *sb)
elm_object_content_unset(v->scroller);
evas_object_image_size_get(v->image, &w, &h);
evas_object_image_data_update_add(v->image, 0, 0, w, h);
evas_object_size_hint_min_set(v->image, w, h);
evas_object_size_hint_max_set(v->image, w, h);
elm_table_pack(v->table, v->image, 0, 0, 1, 1);
elm_object_content_set(v->scroller, v->table);
if (sb->history_pos < (eina_list_count(sb->history)-1))
{
int count;
@ -527,10 +532,6 @@ _orient_apply(Ephoto_Single_Browser *sb)
snprintf(buf, PATH_MAX, "%s [%s]", sb->entry->basename, _("MODIFIED"));
ephoto_title_set(sb->ephoto, buf);
_ephoto_update_bottom_bar(sb);
evas_object_size_hint_min_set(v->image, w, h);
evas_object_size_hint_max_set(v->image, w, h);
elm_table_pack(v->table, v->image, 0, 0, 1, 1);
elm_object_content_set(v->scroller, v->table);
if (v->fit)
_viewer_zoom_fit_apply(v);
@ -907,6 +908,8 @@ _undo_image(void *data, Evas_Object *obj EINA_UNUSED,
evas_object_size_hint_min_set(v->image, eh->w, eh->h);
evas_object_size_hint_max_set(v->image, eh->w, eh->h);
elm_table_pack(v->table, v->image, 0, 0, 1, 1);
elm_object_content_set(v->scroller, v->table);
_ephoto_update_bottom_bar(sb);
if (sb->orient != eh->orient)
sb->orient = eh->orient;
if (v->fit)
@ -940,6 +943,8 @@ _redo_image(void *data, Evas_Object *obj EINA_UNUSED,
evas_object_size_hint_min_set(v->image, eh->w, eh->h);
evas_object_size_hint_max_set(v->image, eh->w, eh->h);
elm_table_pack(v->table, v->image, 0, 0, 1, 1);
elm_object_content_set(v->scroller, v->table);
_ephoto_update_bottom_bar(sb);
if (sb->orient != eh->orient)
sb->orient = eh->orient;
if (v->fit)
@ -992,7 +997,7 @@ _reset_image(void *data, Evas_Object *obj EINA_UNUSED,
box = elm_box_add(popup);
elm_box_horizontal_set(box, EINA_FALSE);
EPHOTO_WEIGHT(box, 0.0, 0.0);
EPHOTO_WEIGHT(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(box);
evas_object_show(box);
@ -1043,6 +1048,8 @@ _close_editor(void *data, Evas_Object *obj EINA_UNUSED,
{
elm_layout_signal_emit(sb->ephoto->layout, "ephoto,folders,show", "ephoto");
evas_object_show(sb->ephoto->dir_browser);
elm_layout_signal_emit(sb->ephoto->layout, "ephoto,statusbar,show", "ephoto");
evas_object_show(sb->ephoto->statusbar);
}
evas_object_del(sb->edit_main);
sb->edit_main = NULL;
@ -1634,7 +1641,7 @@ _edit_function_item_add(Evas_Object *parent, const char *icon, const char *label
evas_object_size_hint_min_set(button, 30*elm_config_scale_get(),
30*elm_config_scale_get());
evas_object_smart_callback_add(button, "clicked", callback, data);
EPHOTO_WEIGHT(button, 0.0, 0.0);
EPHOTO_WEIGHT(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_FILL(button);
elm_box_pack_end(parent, button);
evas_object_show(button);
@ -1717,6 +1724,9 @@ _editor_menu(void *data, Evas_Object *obj EINA_UNUSED, void *event_data EINA_UNU
edje_object_signal_emit(elm_layout_edje_get(sb->ephoto->layout),
"ephoto,folders,hide", "ephoto");
evas_object_hide(sb->ephoto->dir_browser);
edje_object_signal_emit(elm_layout_edje_get(sb->ephoto->layout),
"ephoto,statusbar,hide", "ephoto");
evas_object_hide(sb->ephoto->statusbar);
frame = elm_frame_add(sb->ephoto->layout);
elm_object_text_set(frame, _("Edit"));
@ -1742,7 +1752,7 @@ _editor_menu(void *data, Evas_Object *obj EINA_UNUSED, void *event_data EINA_UNU
sep = elm_separator_add(box);
elm_separator_horizontal_set(sep, EINA_FALSE);
EPHOTO_WEIGHT(sep, 0.0, EVAS_HINT_EXPAND);
EPHOTO_WEIGHT(sep, EVAS_HINT_FILL, EVAS_HINT_EXPAND);
EPHOTO_FILL(sep);
elm_box_pack_end(box, sep);
evas_object_show(sep);
@ -1809,7 +1819,7 @@ _editor_menu(void *data, Evas_Object *obj EINA_UNUSED, void *event_data EINA_UNU
vbox = elm_box_add(box);
elm_box_horizontal_set(vbox, EINA_FALSE);
elm_box_homogeneous_set(vbox, EINA_TRUE);
EPHOTO_WEIGHT(vbox, 0.0, EVAS_HINT_EXPAND);
EPHOTO_WEIGHT(vbox, EVAS_HINT_FILL, EVAS_HINT_EXPAND);
EPHOTO_FILL(vbox);
evas_object_size_hint_min_set(vbox, 30, 30);
elm_box_pack_end(box, vbox);

@ -759,6 +759,10 @@ _add_icon(Evas_Object *parent, const char *icon, const char *label, Evas_Object
evas_object_size_hint_min_set(ic, 20*elm_config_scale_get(),
20*elm_config_scale_get());
ret = elm_icon_standard_set(ic, icon);
if (!ret && !strcmp(icon, "view-list-details"))
ret = elm_image_file_set(ic, PACKAGE_DATA_DIR "/images/single.png", NULL);
else if (!ret && !strcmp(icon, "view-list-icons"))
ret = elm_image_file_set(ic, PACKAGE_DATA_DIR "/images/grid.png", NULL);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
but = elm_button_add(parent);
@ -824,7 +828,7 @@ ephoto_slideshow_show_controls(Ephoto *ephoto)
ss->notify_box = elm_box_add(ss->notify);
elm_box_horizontal_set(ss->notify_box, EINA_TRUE);
EPHOTO_WEIGHT(ss->notify, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(ss->notify, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
evas_object_event_callback_add(ss->notify_box, EVAS_CALLBACK_MOUSE_IN, _mouse_in,
ss);
evas_object_event_callback_add(ss->notify_box, EVAS_CALLBACK_MOUSE_OUT, _mouse_out,
@ -833,9 +837,9 @@ ephoto_slideshow_show_controls(Ephoto *ephoto)
evas_object_show(ss->notify_box);
if (ephoto->prev_state == EPHOTO_STATE_SINGLE)
but = _add_icon(ss->notify_box, "view-list-icons", _("Back"), NULL);
else
but = _add_icon(ss->notify_box, "view-list-details", _("Back"), NULL);
else
but = _add_icon(ss->notify_box, "view-list-icons", _("Back"), NULL);
evas_object_smart_callback_add(but, "clicked", _back, ss);
but = _add_icon(ss->notify_box, "go-first", _("First"), NULL);
evas_object_smart_callback_add(but, "clicked", _first, ss);

@ -1192,7 +1192,7 @@ _ephoto_thumb_search_go(void *data, Evas_Object *obj EINA_UNUSED,
tb->grid = elm_gengrid_add(tb->gridbox);
EPHOTO_EXPAND(tb->grid);
EPHOTO_FILL(tb->grid);
elm_gengrid_align_set(tb->grid, 0.5, 0.0);
elm_gengrid_align_set(tb->grid, 0.5, EVAS_HINT_FILL);
elm_gengrid_multi_select_set(tb->grid, EINA_TRUE);
elm_gengrid_multi_select_mode_set(tb->grid,
ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT);
@ -1338,7 +1338,7 @@ _ephoto_thumb_search_start(void *data, Evas_Object *obj EINA_UNUSED,
}
hbox = elm_box_add(tb->gridbox);
elm_box_horizontal_set(hbox, EINA_TRUE);
EPHOTO_WEIGHT(hbox, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(hbox, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_FILL(hbox);
elm_box_pack_start(tb->gridbox, hbox);
evas_object_show(hbox);
@ -1349,7 +1349,7 @@ _ephoto_thumb_search_start(void *data, Evas_Object *obj EINA_UNUSED,
elm_object_part_text_set(search, "guide", _("Search"));
elm_scroller_policy_set(search, ELM_SCROLLER_POLICY_OFF,
ELM_SCROLLER_POLICY_OFF);
EPHOTO_WEIGHT(hbox, EVAS_HINT_EXPAND, 0.0);
EPHOTO_WEIGHT(hbox, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
EPHOTO_FILL(hbox);
evas_object_data_set(search, "thumb_browser", tb);
evas_object_data_set(search, "parent", hbox);
@ -1394,7 +1394,7 @@ _ephoto_thumb_view_add(Ephoto_Thumb_Browser *tb)
tb->grid = elm_gengrid_add(tb->gridbox);
EPHOTO_EXPAND(tb->grid);
EPHOTO_FILL(tb->grid);
elm_gengrid_align_set(tb->grid, 0.5, 0.0);
elm_gengrid_align_set(tb->grid, 0.5, EVAS_HINT_FILL);
elm_gengrid_multi_select_set(tb->grid, EINA_TRUE);
elm_gengrid_multi_select_mode_set(tb->grid,
ELM_OBJECT_MULTI_SELECT_MODE_DEFAULT);

Loading…
Cancel
Save