So literally.. lost in translation ,p
Anyway... for those which have noticed, in some environments overrides in gconf, or environment helps due to there being functions dealing with this. At a lower level (or more direct rather) lies the crux for the issue, which is the index.theme definitions. It's that simple.
By using some grep,sed what not you can automate this, but in some cases there isn't already set values, so needs appending, others can be replaced by some values.
eg. in my icon set I have to add to the Scalable section (I did a s/scalable/Scalable/g, didn't work although for some environment it apparently did). If you cba to go through a gazillion themes, take the icon set you DO like though, open the file, compare it to a working one and/or add the needed stuff.
I had something like
[128x128/actions]
Size=128
Context=Actions
Type=Scalable
Changed to (added)
[128x128/actions]
Size=128
Context=Actions
Type=Scalable
MinSize=8
MaxSize=128
And things in openbox/lxde or appas like nemo? etc now worked.
EDIT: ye, seems like the solution is to make sure that index.themes files with Scalable sections have to have a MinSize and MaxSize value which should be set to MinSize=8 and MaxSize probably the size of the defined icons.
(Do a backup of your index files before you start changing the world, squire!).
Tip 1: Changing MinSize values
sudo find /usr/share/icons/ -type f -iname "index.theme" -exec sed -i 's/\(MinSize=\)\(.*\)/\18/g' {} \;
(and any other paths with .icons)
Tip 2: don't use sudo in local paths, just systempaths.
Tip 3: Don't forget to possibly add the MaxSize though (prolly gonna be a bit manual unfortunately).
]]>I'm not sure what your point is above, and we're still at the same place. The solutions here didn't help and no answers to my request for justification were provided. Only changing my icon theme worked, so I'm a happy camper. Haven't thought about you in forever. You on the other hand appear to be digging up old posts to harass me (yeah, I saw the other one, and if you'd read more carefully you'd have seen that the cleaning didn't help...).
]]>jwhendy wrote:I may actually have a different bug. My windows aren't huge, just my icons, and so far I've only noticed it in Evince... If this is a separate issue (huge icons in evince != huge windows), I'll start a new thread.
But i think that will be better to continue our conversation using e -mail(if you have no objections).
Well after "using e -mail" he immediately lost interest in the problem.
Local FAT Troll.
The upgrade to Gnome 3.14 resulted in 2 days of crazy looking (large) scaled fonts and icons.
Ultimately the only thing that worked for me was blasting the ~/.dconf directory and restarting gnome-settings-daemon.
]]>Well, I see this is going to end up most unproductive. From my previous post, including a screenshot to illustrate the problem:
jwhendy wrote:I may actually have a different bug. My windows aren't huge, just my icons, and so far I've only noticed it in Evince... If this is a separate issue (huge icons in evince != huge windows), I'll start a new thread.
You were free to tell me back then to do so.
.
To tell you the truth I was shocked then your arrogance.
I had thought that htis is a some sort a joke, but now i see that i was wrong.
And I'd be more than happy to help you ( in the best of my ability and free time).
But i think that will be better to continue our conversation using e -mail(if you have no objections).
I may actually have a different bug. My windows aren't huge, just my icons, and so far I've only noticed it in Evince... If this is a separate issue (huge icons in evince != huge windows), I'll start a new thread.
You were free to tell me back then to do so.
Fwiw, I tried to search specifically for icon-related threads when this started, which gets me to this thread and this one (and that one links here anyway). Others in the thread have chimed in about icon-related problems/solutions, so you can feel free to admonish them, too. I've tried to post whatever information I can in order to receive input, and am all for taking some flak if I've been following bad form for this forum (I don't think I have). You've provided some one-liners (which I took as rude) and some links/docs; requesting clarification/reasoning about them has me believing I'm basically being told to f-off now, which doesn't seem justified.
]]>I'd just like evidence for why these proposed fixes should work. So far, it's all about setting some variables to 1 when I haven't seen any evidence that they're set to anything other than that in the first place (not to mention they require installing a package I don't use, and /etc/environment doesn't work anyway).
Looks like you already yourself answered your questions.
I'm on openbox and don't have all gnome
I may actually have a different bug. My windows aren't huge
it is a little bit strange, you don't have gnome nor huge windows, and you came in this thread and asking some sort evidence.
]]>x11: Don't follow dpi and scale from xsettings when GDK_SCALE set
If things are hardcoded in the environment, that wins.
So... if GDK_SCALE is set [==2], then ignore dpi/scale from xsettings unless environment overrides (i.e. the /etc/environment fix you suggested).
I don't see anything in those diff's that indicate GDK_SCALE ships with a default value of 2. So I'm still trying to understand why we need to override it to 1 via /etc/environment.
Also... looking at the actual files your diff post mentions... check out gdkscreen-x11.c in the gtk github account:
const char *scale_str;
[...]
#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
scale_str = g_getenv ("GDK_SCALE");
#else
scale_str = "1";
#endif
if (scale_str)
{
x11_screen->fixed_window_scale = TRUE;
x11_screen->window_scale = atol (scale_str);
if (x11_screen->window_scale == 0)
x11_screen->window_scale = 1;
}
else
x11_screen->window_scale = 1;
I see that a couple lines are commented out, but while I don't know C, it looks like it checks the environment for GDK_SCALE, if it finds it, it sets scale_str to that value. Since I don't have it set, I fall into the else() of that if() code... and it's going to get set to 1. Not seeing anything set to 2.
I'm not afraid to ask anyone... I'd just like evidence for why these proposed fixes should work. So far, it's all about setting some variables to 1 when I haven't seen any evidence that they're set to anything other than that in the first place (not to mention they require installing a package I don't use, and /etc/environment doesn't work anyway).
From some other posts, it could just be something with the update and icon definitions for all I know.
]]>@Dmitrii: really? Yeah, I got that part by now. My questions still stand:
- where is the file that requires overriding with gnome-settings-daemon?
- where is the file setting GDK_SCALE != 1 such that I need to edit /etc/environment override it?I'm just trying to understand why these solutions don't work for some of us, but do work for you. So if we can start by looking at the common ground (say, a new 3.14 gnome file that features the line 'GDD_SCALE=2', I'll start to believe that /etc/environment has anything to do with this. Then again, a subset of us are just having issues with icons, so I don't even know if my issue is the same. Given that I can change my icon theme and my entire issue goes away, I don't think GdkWindowScalingFactor or GDK_SCALE have anything to do with me.
For the benefit of others, it would still be nice to understand why scaling is goofing. The gtk docs read to me like this shouldn't be messing up like it is (emphasis mine):
GDK_SCALE. Must be set to an integer, typically 2. If set, GDK will scale all windows by the specified factor. Scaled output is meant to be used on high-dpi displays. Normally, GDK will pick up a suitable scale factor for each monitor from the display system. This environment variable allows to override that.
The docs don't suggest the user has to do anything, and by that I'd assume the default wouldn't make huge windows and icons for every gnome user.
look what i find
x11: Don't follow dpi and scale from xsettings when GDK_SCALE set
If things are hardcoded in the environment, that wins.
Diffstat
-rw-r--r-- gdk/x11/gdkscreen-x11.c 1
-rw-r--r-- gdk/x11/gdkscreen-x11.h 1
-rw-r--r-- gdk/x11/gdkwindow-x11.c 3
-rw-r--r-- gdk/x11/xsettings-client.c 20
4 files changed, 17 insertions, 8 deletions
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 46fc232..1efea05 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -1071,6 +1071,7 @@ _gdk_x11_screen_new (GdkDisplay *display,
#endif
if (scale_str)
{
+ x11_screen->fixed_window_scale = TRUE;
x11_screen->window_scale = atol (scale_str);
if (x11_screen->window_scale == 0)
x11_screen->window_scale = 1;
diff --git a/gdk/x11/gdkscreen-x11.h b/gdk/x11/gdkscreen-x11.h
index f37b61a..ce8598e 100644
--- a/gdk/x11/gdkscreen-x11.h
+++ b/gdk/x11/gdkscreen-x11.h
@@ -48,6 +48,7 @@ struct _GdkX11Screen
gint primary_monitor;gint window_scale;
+ gboolean fixed_window_scale;/* Xft resources for the display, used for default values for
* the Xft/ XSETTINGS
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 6f8527d..49c1361 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -156,6 +156,7 @@ gdk_window_impl_x11_init (GdkWindowImplX11 *impl)
{
impl->device_cursor = g_hash_table_new_full (NULL, NULL,
NULL, g_object_unref);
+ impl->window_scale = 1;
}GdkToplevelX11 *
@@ -1917,6 +1918,8 @@ _gdk_x11_window_set_window_scale (GdkWindow *window,
if (window->window_type == GDK_WINDOW_OFFSCREEN)
return;+ g_print ("_gdk_x11_window_set_window_scale %p %d\n", window, scale);
+
impl = GDK_WINDOW_IMPL_X11 (window->impl);impl->window_scale = scale;
diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c
index 475cbab..2d1c251 100644
--- a/gdk/x11/xsettings-client.c
+++ b/gdk/x11/xsettings-client.c
@@ -446,14 +446,17 @@ read_settings (GdkX11Screen *x11_screen,/* Since we support scaling we look at the specific Gdk/UnscaledDPI
setting if it exists and use that instead of Xft/DPI if it is set */
- setting = g_hash_table_lookup (x11_screen->xsettings, "gdk-unscaled-dpi");
- if (setting)
+ if (x11_screen->xsettings && !x11_screen->fixed_window_scale)
{
- copy = g_new0 (GValue, 1);
- g_value_init (copy, G_VALUE_TYPE (setting));
- g_value_copy (setting, copy);
- g_hash_table_insert (x11_screen->xsettings,
- "gtk-xft-dpi", copy);
+ setting = g_hash_table_lookup (x11_screen->xsettings, "gdk-unscaled-dpi");
+ if (setting)
+ {
+ copy = g_new0 (GValue, 1);
+ g_value_init (copy, G_VALUE_TYPE (setting));
+ g_value_copy (setting, copy);
+ g_hash_table_insert (x11_screen->xsettings,
+ "gtk-xft-dpi", copy);
+ }
}if (do_notify)
@@ -462,7 +465,8 @@ read_settings (GdkX11Screen *x11_screen,
g_hash_table_unref (old_list);g_value_init (&value, G_TYPE_INT);
- if (gdk_screen_get_setting (GDK_SCREEN (x11_screen),
+ if (!x11_screen->fixed_window_scale &&
+ gdk_screen_get_setting (GDK_SCREEN (x11_screen),
"gdk-window-scaling-factor", &value))
_gdk_x11_screen_set_window_scale (x11_screen,
g_value_get_int (&value));
Maybe it will help you if you afraid to ask Alexander Larsson.
]]>@Dmitrii: really? Yeah, I got that part by now. My questions still stand:
- where is the file that requires overriding with gnome-settings-daemon?
- where is the file setting GDK_SCALE != 1 such that I need to edit /etc/environment override it?I'm just trying to understand why these solutions don't work for some of us, but do work for you. So if we can start by looking at the common ground (say, a new 3.14 gnome file that features the line 'GDD_SCALE=2', I'll start to believe that /etc/environment has anything to do with this. Then again, a subset of us are just having issues with icons, so I don't even know if my issue is the same. Given that I can change my icon theme and my entire issue goes away, I don't think GdkWindowScalingFactor or GDK_SCALE have anything to do with me.
For the benefit of others, it would still be nice to understand why scaling is goofing. The gtk docs read to me like this shouldn't be messing up like it is (emphasis mine):
GDK_SCALE. Must be set to an integer, typically 2. If set, GDK will scale all windows by the specified factor. Scaled output is meant to be used on high-dpi displays. Normally, GDK will pick up a suitable scale factor for each monitor from the display system. This environment variable allows to override that.
The docs don't suggest the user has to do anything, and by that I'd assume the default wouldn't make huge windows and icons for every gnome user.
Really and truly, you can ask yours questions Alexander Larsson.
]]>MJBoa wrote:Hi guys,
I had a seemingly related problem with my icons where certain ones were being displayed very large. I was getting the error:
(evince:14533): Gtk-WARNING **: Symbolic icon edit-find-symbolic-ltr of size 16 is in an icon theme directory of size 96
So I grepped for the edit-find-symbolic icon and found its directory, looked into the index.theme file of my theme at /usr/share/icons/theme-name/index.theme and found the entry for its folder "actions/scalable". Under that entry was the property "Type=scalable". I looked up the format for theme files and found that the value should be capitalized so I changed it to read "Type=Scalable" and that fixed the problem. No idea why that became a problem with the new version...
Hope this helps someone.This actually worked for me, thanks!
At first I thought the proposed solution had failed in my case, but then I noticed that my preferred icon theme (Moka) depends on another icon theme (Faba). After applying the aforementioned fix there as well, everything looked normal again.
Thx for the tip!
]]>MJBoa wrote:Hi guys,
I had a seemingly related problem with my icons where certain ones were being displayed very large. I was getting the error:
(evince:14533): Gtk-WARNING **: Symbolic icon edit-find-symbolic-ltr of size 16 is in an icon theme directory of size 96
So I grepped for the edit-find-symbolic icon and found its directory, looked into the index.theme file of my theme at /usr/share/icons/theme-name/index.theme and found the entry for its folder "actions/scalable". Under that entry was the property "Type=scalable". I looked up the format for theme files and found that the value should be capitalized so I changed it to read "Type=Scalable" and that fixed the problem. No idea why that became a problem with the new version...
Hope this helps someone.This actually worked for me, thanks!
Not to me, my icon themes already have "Type=Scalable" or "Type=Fixed" in their index.theme files. The bug making some icons themes huge is doing something else. In your cases the icon theme itself could be wrongly made or simply was not updated to new requirements.
]]>