Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Changed padding/icon size, adding missing replace all icon and tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
wltjr committed May 16, 2017
1 parent 7195e24 commit d44bedf
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions src/bin/ui/search_dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

#include "../ecrire.h"

const static int PADDING = 4;
const static int PADDING = 2;
const static int BUTTON_HEIGHT = 29;
const static int BUTTON_WIDTH = 70;
const static int BUTTON_ICON_SIZE = 14;
const static int BUTTON_ICON_SIZE = 12;

static Evas_Object *find_entry, *replace_entry, *search_box;

Expand Down Expand Up @@ -164,6 +164,7 @@ ui_find_dialog_open(Evas_Object *parent, Ecrire_Entry *ent)
ELM_SCALE_SIZE(BUTTON_ICON_SIZE),
ELM_SCALE_SIZE(BUTTON_ICON_SIZE));
elm_object_part_content_set(obj, "icon", icon);
elm_object_tooltip_text_set(obj, _("Find All"));
evas_object_show (icon);
}
else
Expand All @@ -184,6 +185,7 @@ ui_find_dialog_open(Evas_Object *parent, Ecrire_Entry *ent)
ELM_SCALE_SIZE(BUTTON_ICON_SIZE),
ELM_SCALE_SIZE(BUTTON_ICON_SIZE));
elm_object_part_content_set(obj, "icon", icon);
elm_object_tooltip_text_set(obj, _("Find Previous"));
evas_object_show (icon);
}
else
Expand All @@ -204,6 +206,7 @@ ui_find_dialog_open(Evas_Object *parent, Ecrire_Entry *ent)
ELM_SCALE_SIZE(BUTTON_ICON_SIZE),
ELM_SCALE_SIZE(BUTTON_ICON_SIZE));
elm_object_part_content_set(obj, "icon", icon);
elm_object_tooltip_text_set(obj, _("Find Next"));
evas_object_show (icon);
}
else
Expand Down Expand Up @@ -234,12 +237,13 @@ ui_find_dialog_open(Evas_Object *parent, Ecrire_Entry *ent)
obj = elm_button_add(table);
icon = elm_icon_add (table);
evas_object_size_hint_aspect_set (icon, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
if (elm_icon_standard_set (icon, "edit-find-replace"))
if (elm_icon_standard_set (icon, "document-edit"))
{
evas_object_size_hint_min_set(icon,
ELM_SCALE_SIZE(BUTTON_ICON_SIZE),
ELM_SCALE_SIZE(BUTTON_ICON_SIZE));
elm_object_part_content_set(obj, "icon", icon);
elm_object_tooltip_text_set(obj, _("Replace with"));
evas_object_show (icon);
}
else
Expand All @@ -252,10 +256,22 @@ ui_find_dialog_open(Evas_Object *parent, Ecrire_Entry *ent)
evas_object_show(obj);

obj = elm_button_add(table);
elm_object_text_set(obj, _("Replace All"));
evas_object_size_hint_min_set(obj,
ELM_SCALE_SIZE(BUTTON_WIDTH),
ELM_SCALE_SIZE(BUTTON_HEIGHT));
icon = elm_icon_add (table);
evas_object_size_hint_aspect_set (icon, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
if (elm_icon_standard_set (icon, "edit-find-replace"))
{
evas_object_size_hint_min_set(icon,
ELM_SCALE_SIZE(BUTTON_ICON_SIZE),
ELM_SCALE_SIZE(BUTTON_ICON_SIZE));
elm_object_part_content_set(obj, "icon", icon);
elm_object_tooltip_text_set(obj, _("Replace All"));
evas_object_show (icon);
}
else
{
evas_object_del(icon);
elm_object_text_set(obj, _("Replace All"));
}
elm_table_pack (table, obj, 3, row, 1, 1);
evas_object_smart_callback_add(obj, "clicked", _replace_all_clicked, ent);
evas_object_show(obj);
Expand All @@ -271,6 +287,7 @@ ui_find_dialog_open(Evas_Object *parent, Ecrire_Entry *ent)
evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, 0.5);
elm_object_part_content_set(obj, "icon", icon);
elm_object_tooltip_text_set(obj, _("Close"));
evas_object_show (icon);
}
else
Expand Down

0 comments on commit d44bedf

Please sign in to comment.