Closed Bug 1354263 Opened 5 years ago Closed 5 years ago

tree view uses incorrect icon size from gtk-menu compared to text

Categories

(Thunderbird :: Theme, defect)

45 Branch
defect
Not set
normal

Tracking

(thunderbird_esr5253+ fixed, thunderbird53 fixed, thunderbird54 fixed, thunderbird55 fixed)

RESOLVED FIXED
Thunderbird 55.0
Tracking Status
thunderbird_esr52 53+ fixed
thunderbird53 --- fixed
thunderbird54 --- fixed
thunderbird55 --- fixed

People

(Reporter: pcdwarf, Assigned: Paenglab)

Details

Attachments

(6 files)

Attached image capture.png
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Build ID: 20170307221322

Steps to reproduce:

change gtk-menu icon size on debian9 to 32x32 before running thunderbird with a command like 

xfconf-query -c xsettings -p '/Gtk/IconSizes' -s 'gtk-menu=32,32'


Actual results:

The generic folders uses hi-res icons but not the special ones.
The icons are cropped to the size the text


Expected results:

no-change at all (do not use gtk icon size)  or scale all icons and menus.
use a dpi-based size instead.
I also suggest a way to override this setting and/or the folder icon path in about:config
are you on gtk3?
Component: Folder and Message Lists → Theme
Flags: needinfo?(pcdwarf)
it seems there are both gtk2 and 3 installed

How can I know which one is used by thunderbird ?


pierre@zebulon: ~ $ cat /etc/debian_version
9.0

pierre@zebulon: ~ $ dpkg -l thunderbird* | grep -e '^i'
ii  thunderbird    1:45.8.0-2   amd64        mail/news client with RSS, chat and integrated spam filter support

pierre@zebulon: ~ $ dpkg -l libgtk* | grep -e '^i'
ii  libgtk-3-0:amd64             3.22.11-1        amd64 GTK+ graphical user interface library
ii  libgtk-3-bin                 3.22.11-1        amd64 programs for the GTK+ graphical user interface library
ii  libgtk-3-common              3.22.11-1        all common files for the GTK+ graphical user interface library
ii  libgtk-vnc-2.0-0:amd64       0.6.0-2          amd64        VNC viewer widget for GTK+3 (runtime libraries)
ii  libgtk2-perl                 2:1.2499-1       amd64 Perl interface to the 2.x series of the Gimp Toolkit library
ii  libgtk2.0-0:amd64            2.24.31-2        amd64 GTK+ graphical user interface library
ii  libgtk2.0-bin                2.24.31-2        amd64 programs for the GTK+ graphical user interface library
ii  libgtk2.0-common             2.24.31-2        all common files for the GTK+ graphical user interface library
ii  libgtkdatabox-0.9.3-0        1:0.9.3.0+dfsg-3 amd64 Gtk+ library to display large amounts of numerical data
ii  libgtkglext1                 1.2.0-4          amd64 OpenGL Extension to GTK+ (shared libraries)
ii  libgtkmm-2.4-1v5:amd64       1:2.24.5-1       amd64        C++ wrappers for GTK+ (shared libraries)
ii  libgtkmm-3.0-1v5:amd64       3.22.0-1         amd64        C++ wrappers for GTK+ (shared libraries)
ii  libgtksourceview-3.0-1:amd64 3.22.2-1         amd64 shared libraries for the GTK+ syntax highlighting widget
ii  libgtksourceview-3.0-common  3.22.2-1         all common files for the GTK+ syntax highlighting widget
ii  libgtksourceview2.0-0:amd64  2.10.5-3         amd64 shared libraries for the GTK+ syntax highlighting widget
ii  libgtksourceview2.0-common   2.10.5-3         all common files for the GTK+ syntax highlighting widget
ii  libgtkspell0                 2.0.16-1.1       amd64        a spell-checking addon for GTK's TextView widget


my desktop is xfce 4.12

it's resolution is 7680x2960 (dual screen) and my current DPI is set to 160

I used this command to change the icon size.

xfconf-query -c xsettings -p '/Gtk/IconSizes' -s 'gtk-menu=32,32'

I think it's a gtk2 setting but I'm not sure.

Changes affect the whole desktop immediately but thunderbird is only affected after a restart.

Note that the "+" icon in firefox's tabs also seems affected by this setting.

You can check the file I previously uploaded to see how it affect the display.
Flags: needinfo?(pcdwarf)
Please could you try this in userChrome.css (http://kb.mozillazine.org/index.php?title=UserChrome.css):

treechildren::-moz-tree-image(folderNameCol) {
  width: 16px !important;
  height: 16px !important;
}
Flags: needinfo?(pcdwarf)
created the file.

pierre@zebulon: ~ $ cat .thunderbird/we29y31r.default/userChrome.css 
treechildren::-moz-tree-image(folderNameCol) {
	  width: 16px !important;
	    height: 16px !important;
    }


does not seems to ave any effect.
Flags: needinfo?(pcdwarf)
sorry, missed the chrome subfolder
moved the file.

It solved the tree problem.
Attached image Capture3.png
I notice the search icon in both top right search boxes. is also affected by the gtk-menu= size.

Although i is not acting the way I expected, it renders properly.
Thank you for the testing.
Attached patch Bug1354263.patchSplinter Review
This should fix all occurrences of GTK-icons.
Assignee: nobody → richard.marti
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8856235 - Flags: review?(acelists)
(In reply to pcdwarf from comment #2)
> it seems there are both gtk2 and 3 installed
> 
> How can I know which one is used by thunderbird ?

Try 'ldd /path/to/firefox/install/libmozgtk.so' (find where it is on your system).
Comment on attachment 8856235 [details] [diff] [review]
Bug1354263.patch

Review of attachment 8856235 [details] [diff] [review]:
-----------------------------------------------------------------

So you set the size explicitly whereever we take icons from the gtk theme (url(moz-icon://stock/gtk-*)) ? There are many more occurrences than those you touch. Are those already safe?

::: mail/themes/linux/mail/messageHeader.css
@@ -101,5 @@
>  
> -#attachmentSaveAllSingle,
> -#attachmentSaveAllMultiple {
> -  list-style-image: url("moz-icon://stock/gtk-save?size=menu");
> -}

Why is this removed?
(In reply to :aceman from comment #11)
> Comment on attachment 8856235 [details] [diff] [review]
> Bug1354263.patch
> 
> Review of attachment 8856235 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> So you set the size explicitly whereever we take icons from the gtk theme
> (url(moz-icon://stock/gtk-*)) ? There are many more occurrences than those
> you touch. Are those already safe?

Almost all are icons in menus and they have the size set in https://dxr.mozilla.org/comm-central/rev/2a593ea93f6637df49eedc998b1f5ae4781a0f56/mozilla/toolkit/themes/linux/global/menu.css#138

I should have set the remaining with this patch.

> ::: mail/themes/linux/mail/messageHeader.css
> @@ -101,5 @@
> >  
> > -#attachmentSaveAllSingle,
> > -#attachmentSaveAllMultiple {
> > -  list-style-image: url("moz-icon://stock/gtk-save?size=menu");
> > -}
> 
> Why is this removed?

Because it is defined too some lines later to match the toolbar icons https://dxr.mozilla.org/comm-central/rev/b08dc613a3d275711f76b42cf0ceba1119d82f02/mail/themes/linux/mail/messageHeader.css#213
(In reply to Richard Marti (:Paenglab) from comment #12)
> > > -#attachmentSaveAllSingle,
> > > -#attachmentSaveAllMultiple {
> > > -  list-style-image: url("moz-icon://stock/gtk-save?size=menu");
> > > -}
> > 
> > Why is this removed?
> 
> Because it is defined too some lines later to match the toolbar icons
> https://dxr.mozilla.org/comm-central/rev/
> b08dc613a3d275711f76b42cf0ceba1119d82f02/mail/themes/linux/mail/
> messageHeader.css#213

And there is uses a different icon. So the latter declaration won anyway?
(In reply to :aceman from comment #13)
> And there is uses a different icon. So the latter declaration won anyway?

Correct.
Comment on attachment 8856235 [details] [diff] [review]
Bug1354263.patch

Review of attachment 8856235 [details] [diff] [review]:
-----------------------------------------------------------------

OK then. I haven't tested this as I do not have the config app the reporter used, but explicitly setting the wanted size shouldn't hurt.
Attachment #8856235 - Flags: review?(acelists) → review+
Thank you.
Keywords: checkin-needed
(In reply to :aceman from comment #10)
> (In reply to pcdwarf from comment #2)
> > it seems there are both gtk2 and 3 installed
> > 
> > How can I know which one is used by thunderbird ?
> 
> Try 'ldd /path/to/firefox/install/libmozgtk.so' (find where it is on your
> system).

Sorry, I searched the whole system but couldn't find any file named libmozgtk.so

But the package maintainers from Debian only have libgtk2 in their dependencies tree.
https://packages.debian.org/stretch/thunderbird
So, I think it only uses gtk2.
Ah yes, I didn't notice you are on TB45, then it is gtk2 for sure.

Paenglab, does that change anything? Did you see the same problem also on gtk3?
I can't say if it fixes this issue as I haven't found where to set the icon size. But with the patch we are on the safer side.
https://hg.mozilla.org/comm-central/rev/ab8e368c669cac5f3e880270e5784b045cc50b20
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 55.0
Comment on attachment 8856235 [details] [diff] [review]
Bug1354263.patch

[Approval Request Comment]
User impact if declined: wrong icon sizes on Linux with high res GTK icons
Testing completed (on c-c, etc.): on c-c
Risk to taking this patch (and alternatives if risky): low
Attachment #8856235 - Flags: approval-comm-aurora?
[Approval Request Comment]
User impact if declined: wrong icon sizes on Linux with high res GTK icons
Testing completed (on c-c, etc.): on c-c
Risk to taking this patch (and alternatives if risky): low
Attachment #8856688 - Flags: review+
Attachment #8856688 - Flags: approval-comm-beta?
[Approval Request Comment]
User impact if declined: wrong icon sizes on Linux with high res GTK icons
Testing completed (on c-c, etc.): on c-c
Risk to taking this patch (and alternatives if risky): low
Attachment #8856689 - Flags: review+
Attachment #8856689 - Flags: approval-comm-esr52?
Attachment #8856235 - Flags: approval-comm-aurora? → approval-comm-aurora+
Attachment #8856688 - Flags: approval-comm-beta? → approval-comm-beta+
Comment on attachment 8856688 [details] [diff] [review]
Bug1354263-beta.patch

TB 53 beta has been shipped, we're not doing another one.
Attachment #8856688 - Flags: approval-comm-beta+
Attachment #8856689 - Flags: approval-comm-esr52? → approval-comm-esr52+
You need to log in before you can comment on or make changes to this bug.