summaryrefslogtreecommitdiff
path: root/src/modules/conf_theme
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-11-22 13:53:29 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-11-22 13:53:29 +0000
commitbe1db92dbbcbd85c3535215b0605bb64dfe0577b (patch)
tree65ff69f36256425cf17300e26acf1b42a7108930 /src/modules/conf_theme
parent6458c947fc9a9005e626333d9ad74be3e416db91 (diff)
downloadenlightenment-be1db92dbbcbd85c3535215b0605bb64dfe0577b.tar.gz
e scaling - set xsettings scalign from core e scale if x xset dpi off
if e' x applications setitnghs (xsettingvs) is off - then just calculate an xsettings dpi val from core scale. also use randr info for dpi if possible instead of "core x" and "core wl". wprkds around broken core dpi in x.
Diffstat (limited to 'src/modules/conf_theme')
-rw-r--r--src/modules/conf_theme/e_int_config_scale.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/modules/conf_theme/e_int_config_scale.c b/src/modules/conf_theme/e_int_config_scale.c
index 77c4093a96..b0d572864f 100644
--- a/src/modules/conf_theme/e_int_config_scale.c
+++ b/src/modules/conf_theme/e_int_config_scale.c
@@ -219,30 +219,16 @@ static Evas_Object *
_basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata)
{
Evas_Object *o, *ob;
- double sc = 1.0;
- int dpi = 0, x = 0, y = 0;
+ double sc = 1.0, dpi;
+ int x = 0, y = 0;
_fill_data(cfdata);
o = e_widget_table_add(e_win_evas_win_get(evas), 1);
-#ifndef HAVE_WAYLAND_ONLY
- if (e_comp->comp_type == E_PIXMAP_TYPE_X)
- dpi = ecore_x_dpi_get();
-#endif
-#ifdef HAVE_WAYLAND
- if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
- {
- int xdpi = 0, ydpi = 0;
-
- ecore_evas_screen_dpi_get(e_comp->ee, &xdpi, &ydpi);
- if (xdpi == 0) xdpi = 75;
- if (ydpi == 0) ydpi = 75;
- dpi = ((xdpi + ydpi) / 2);
- }
-#endif
+ dpi = e_scale_dpi_get();
- if ((dpi > 0) && (cfdata->base_dpi > 0))
- sc = (double)dpi / (double)cfdata->base_dpi;
+ if ((dpi > 0.0) && (cfdata->base_dpi > 0))
+ sc = dpi / (double)cfdata->base_dpi;
ob = _scale_preview_new(cfdata, evas, sc, &(cfdata->factor), _("DPI Scaling"), EINA_TRUE);
e_widget_table_object_align_append(o, ob, 0, 0, 1, 1, 0, 0, 0, 0, 0.5, 0.5);