forked from enlightenment/enlightenment
shot - make toolset scrollable to allow smaller window
This commit is contained in:
parent
d150b7998d
commit
e6861cae44
|
@ -98,6 +98,11 @@ e_scale_update(void)
|
|||
snprintf(buf, sizeof(buf), "%i",
|
||||
(int)((double)e_config->scale.xapp_base_dpi * e_scale));
|
||||
ecore_x_resource_db_string_set("Xft.dpi", buf);
|
||||
ecore_x_resource_db_string_set("Xft.hinting", "1");
|
||||
ecore_x_resource_db_string_set("Xft.antialias", "1");
|
||||
ecore_x_resource_db_string_set("Xft.autohint", "0");
|
||||
ecore_x_resource_db_string_set("Xft.hintstyle", "hintfull");
|
||||
ecore_x_resource_db_string_set("Xft.rgba", "none");
|
||||
ecore_x_resource_db_flush();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -63,6 +63,11 @@ static const char _setting_icon_theme_name[] = "Net/IconThemeName";
|
|||
static const char _setting_theme_name[] = "Net/ThemeName";
|
||||
static const char _setting_font_name[] = "Gtk/FontName";
|
||||
static const char _setting_xft_dpi[] = "Xft/DPI";
|
||||
static const char _setting_xft_antialias[] = "Xft/Antialias";
|
||||
static const char _setting_xft_autohint[] = "Xft/Autohint";
|
||||
static const char _setting_xft_hinting[] = "Xft/Hinting";
|
||||
static const char _setting_xft_hintstyle[] = "Xft/HintStyle";
|
||||
static const char _setting_xft_rgba[] = "Xft/RGBA";
|
||||
static const char *_setting_theme = NULL;
|
||||
|
||||
static void _e_xsettings_done_cb(void *data, Eio_File *handler, const Eina_Stat *stat);
|
||||
|
@ -593,6 +598,19 @@ _e_xsettings_dpi_set(void)
|
|||
_e_xsettings_int_set(_setting_xft_dpi,
|
||||
(double)e_config->scale.xapp_base_dpi * e_scale * 1024.0,
|
||||
EINA_TRUE);
|
||||
_e_xsettings_int_set(_setting_xft_antialias,
|
||||
1,
|
||||
EINA_TRUE);
|
||||
_e_xsettings_int_set(_setting_xft_hinting,
|
||||
1,
|
||||
EINA_TRUE);
|
||||
_e_xsettings_int_set(_setting_xft_autohint,
|
||||
0,
|
||||
EINA_TRUE);
|
||||
_e_xsettings_string_set(_setting_xft_hintstyle,
|
||||
"hintfull");
|
||||
_e_xsettings_string_set(_setting_xft_rgba,
|
||||
"none");
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1805,7 +1805,7 @@ ui_edit(Evas_Object *window, Evas_Object *o_bg, E_Zone *zone,
|
|||
Evas_Object **o_img_ret)
|
||||
{
|
||||
Evas *evas, *evas2;
|
||||
Evas_Object *o, *tb, *tb2, *sc, *fr, *bx, *radg, *rad, *bx_ret;
|
||||
Evas_Object *o, *tb, *tb2, *sc, *fr, *bx, *radg, *rad, *bx_ret, *sc2;
|
||||
int w, h;
|
||||
|
||||
o = win = window;
|
||||
|
@ -1830,10 +1830,11 @@ ui_edit(Evas_Object *window, Evas_Object *o_bg, E_Zone *zone,
|
|||
}
|
||||
}
|
||||
w = (sw * zooms[zoom]) / 1000;
|
||||
if ((zone) && (w > (zone->w / 4))) w = zone->w / 4;
|
||||
if (w < ELM_SCALE_SIZE(400)) w = 400;
|
||||
if ((zone) && (w > (zone->w / 8))) w = zone->w / 8;
|
||||
if (w < ELM_SCALE_SIZE(360)) w = ELM_SCALE_SIZE(360);
|
||||
h = (w * sh) / sw;
|
||||
if ((zone) && (h > (zone->h / 4))) h = zone->h / 4;
|
||||
if ((zone) && (h > (zone->h / 8))) h = zone->h / 8;
|
||||
if (h < ELM_SCALE_SIZE(280)) h = ELM_SCALE_SIZE(280);
|
||||
|
||||
if (!ec)
|
||||
{
|
||||
|
@ -1905,7 +1906,7 @@ ui_edit(Evas_Object *window, Evas_Object *o_bg, E_Zone *zone,
|
|||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_size_hint_min_set(o, w, h);
|
||||
evas_object_pass_events_set(o, EINA_TRUE);
|
||||
elm_table_pack(tb, o, 0, 0, 6, 5);
|
||||
elm_table_pack(tb, o, 0, 0, 5, 5);
|
||||
|
||||
sc = o = elm_scroller_add(win);
|
||||
elm_object_style_set(o, "noclip");
|
||||
|
@ -1922,10 +1923,19 @@ ui_edit(Evas_Object *window, Evas_Object *o_bg, E_Zone *zone,
|
|||
elm_table_pack(tb, o, 0, 0, 5, 5);
|
||||
evas_object_show(o);
|
||||
|
||||
sc2 = o = elm_scroller_add(win);
|
||||
elm_object_style_set(o, "noclip");
|
||||
elm_scroller_content_min_limit(o, EINA_TRUE, EINA_FALSE);
|
||||
elm_scroller_gravity_set(o, 0.0, 0.0);
|
||||
evas_object_size_hint_weight_set(o, 0.0, EVAS_HINT_EXPAND);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
elm_table_pack(tb, o, 5, 0, 1, 5);
|
||||
evas_object_show(o);
|
||||
|
||||
bx_ret = bx = o = elm_box_add(win);
|
||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_size_hint_weight_set(o, 0.0, EVAS_HINT_EXPAND);
|
||||
elm_table_pack(tb, o, 5, 0, 1, 5);
|
||||
elm_object_content_set(sc2, o);
|
||||
evas_object_show(o);
|
||||
|
||||
fr = o = elm_frame_add(win);
|
||||
|
|
Loading…
Reference in New Issue