mate-desktop / caja

Caja, the file manager for the MATE desktop
https://mate-desktop.org/
Other
265 stars 143 forks source link

Caja's SEARCH Location/Criteria Has HUGE Menus/Buttons #1689

Open UbuntuMetal opened 1 year ago

UbuntuMetal commented 1 year ago

Expected behaviour

Caja has normal size Location buttons for pull-down menus in Search results under Search bar.

Actual behaviour

After a recent update, Caja has massive location buttons in the Search criteria area once you perform a search. When you click the + to add more criteria, like File Type and Tags, these appear as normal.

Steps to reproduce the behaviour

Perform a search, and the location buttons/menus appear as you see in the screenshots. The only thing I can think of that may have contributed to this is I had a small update, and I noticed that mate-menus was being updated (but I can't see how this would have affected Caja). This behaviour started after the next reboot, and does not affect any other apps. It is the same in both Ubuntu MATE and KDE Plasma.

While this isn't an emergency, and Search functions normally otherwise, it is a tad distracting. If anyone knows of a workaround, like a config file to edit, or some other hack, please let me know.

UPDATE: Found Cause

I had a play around with the Search, and for nearly every folder I was in, clicking the location button (as in right of the Location button which lets you choose other search criteria), a long menu would appear (going from top to bottom of the screen) but would be totally blank. But doing a search from my Home folder, while the location menu still goes from top to bottom, this time it actually showed locations, and then I saw the anomaly that I figured must be the cause: a custom icon for a new 8Tb internal HDD I had installed a couple of days ago.

As you can see from screenshot 4, in that drop-down menu it appears way bigger than the others, but in Caja's Computer it appears the same size as other drives, and in the left-pane it appears as it should, too. The icon - which I made accessible with xdg-icon-resource install --size 32 /usr/share/pixmaps/8Tb.png my-8tb-disk and placed the name of that in Icon Name in Disks > Mount Options to get the custom drive icon - is a 256x256px PNG, and shows fine everywhere else (and, as noted, fine in other parts of Caja, just not that location menu in Search).

If I edit ~/.local/share/icons/hicolor/32x32/apps/my-8tb-disk to be 32x32px, it immediately fixes the issue, but in Caja's Computer the icon is now blurry. If I increase the size to 48x48px, once again those menu buttons start to grow again.

SOLUTION:

Create different size versions of my-8tb-disk.png - from 256x256 down to 24x24px - and place them in the appropriate folders in ~/.local/share/icons/hicolor.

This fixes the issue of the buttons growing. However, there is still some strange behaviour, as you can see from the final screenshot. While that location menu isn't blank now when searching from any other folder than Home, and doesn't quite go from the top to bottom of the screen, the icon for that drive is still a tad large there, and I've also created 24x24 & 16x16px copies and put them in the appropriate folders, but that persists.

EDIT: while killing Caja (a couple of times) didn't rectify that last issue of the icon still being a bit big, after a reboot it is the same size as the others in the location menu.

MATE general version

1.26.0

Package version

caja 1.26.0-1ubuntu1

Linux Distribution

Ubuntu 22.04 with MATE & KDE

Link to bugreport of your Distribution (requirement)

caja: Installed: 1.26.0-1ubuntu1 Candidate: 1.26.0-1ubuntu1 Version table: *** 1.26.0-1ubuntu1 500 500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages 100 /var/lib/dpkg/status

Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Original-Maintainer: Debian+Ubuntu MATE Packaging Team debian-mate@lists.debian.org Bugs: https://bugs.launchpad.net/ubuntu/+filebug

Caja Search Criteria Caja Search Weirdness Caja Search Add Criteria Caja Search 8Tb Drive Icon Caja Search 8Tb Drive Icon 2

lukefromdc commented 1 year ago

What theme are you running?This is controlled by your GTK theme unless hardcoded and I don't think we ever hardcoded anything on that button

UbuntuMetal commented 1 year ago

What theme are you running

That's my own one, based on Ambiant MATE Dark. This weirdness only affected Caja, in both MATE and KDE. While I found the way to rectify this, it's worth noting I couldn't replicate this behaviour anywhere else. And as outlined extensively above, it had to do with Caja not being able to handle a larger icon size than it expected, which wasn't a problem for any other program, including 3 other file-managers: Nautilus, Nemo and Thunar. So since it was fixed by creating multiple icons of different sizes, it could hardly have anything to do with a theme.

And in case you meant icon theme (which is also my creation), then I think this is irrelevant too, since it was a custom drive icon that broke Caja.

lukefromdc commented 1 year ago

There were a LOT of oversize icon problems in GTK 3 apps back in the mid 2010's, as both GTK 3 and 3ed party icon themes matured most of them (but by your experience not all of them) have disappeared.

Icon themes should NOT affect the size of widgets containing them, an oversize icon should be rescaled with ONE exception: a directory of icons designated in the icon theme index as non-resizable will NOT be rescaled. When I learned about that I never saw this oversize icon problem again

GTK theme controls the padding around icons and anything else needing space around itself.

On 12/16/2022 at 9:00 PM, "UbuntuMetal" @.***> wrote:

What theme are you running

That's my own one, based on Ambiant MATE Dark. This weirdness only affected Caja, in both MATE and KDE. While I found the way to rectify this, it's worth noting I couldn't replicate this behaviour anywhere else. And as outlined extensively above, it had to do with Caja not being able to handle a larger icon size than it expected, which wasn't a problem for any other program, including 3 other file-managers: Nautilus, Nemo and Thunar. So since it was fixed by creating multiple icons of different sizes, it could hardly have anything to do with a theme.

And in case you meant icon theme (which is also my creation), then I think this is irrelevant too, since it was a custom drive icon that broke Caja.

-- Reply to this email directly or view it on GitHub: https://github.com/mate-desktop/caja/issues/1689#issuecomment- 1355951116 You are receiving this because you commented.

Message ID: @.***>

crojack commented 12 months ago

I don't understand why icon theme creators still use png icons instead of scalable (svg) ones. With svg icons you don't need to have so many directories in your icon theme and the index.theme is so much easier to write. And there is no oversizing if you set minimum icon size to 16 pixels.

lukefromdc commented 12 months ago

Historically, .svg icons also had a disadvantage: they were significantly heavier. Less of an issue now when phones are creeping up on early 2000's workstation power, but back in 2008 the first bug report I ever posted was for the then-current UbuntuStudio icon theme causing a big directory full of audio files to take forever to open-and have rendering issues on a Pentium 4/1.8 GHZ machine. I downscaled that icon to a smaller resolution and it worked well on that and similar machines, so some of it was just too much resolution too early on a beautiful icon set I still use a descendent of I now maintain myself.

The next UbuntuStudio icon theme was for XFCE, which they transitioned to to avoid gnome-shell in 2011. It was all .png icons and much lighter, but then as now, a missing small icon can cause some GTK widgets to render the larger icon fullsize.

crojack commented 12 months ago

Historically, .svg icons also had a disadvantage: they were significantly heavier. Less of an issue now when phones are creeping up on early 2000's workstation power, but back in 2008 the first bug report I ever posted was for the then-current UbuntuStudio icon theme causing a big directory full of audio files to take forever to open-and have rendering issues on a Pentium 4/1.8 GHZ machine. I downscaled that icon to a smaller resolution and it worked well on that and similar machines, so some of it was just too much resolution too early on a beautiful icon set I still use a descendent of I now maintain myself. The next UbuntuStudio icon theme was for XFCE, which they transitioned to to avoid gnome-shell in 2011. It was all .png icons and much lighter, but then as now, a missing small icon can cause some GTK widgets to render the larger icon fullsize.

Again, I don't understand the "missing small icons issue" when we have "Inherits" entry in index.theme.

By the way, do you know how to make Caja side panel icons bigger? I am visually impaired and although I use Mate as my desktop I am forced to use Thunar where I can scale side panel icons.

lukefromdc commented 12 months ago

Right-click on the left panel (assuming you are using a mate-panel set to render on the left), and select "Properties" from the context menu. You will see a "size" spin box item. Substantially increase the size and the icons should scale with it. It they don't, try another icon theme. If you get an icon in the "mate" or "menta" icon theme that won't scale, open an issue on mate-icon-theme about it

crojack commented 12 months ago

I know how to resize mate-panel icons. What I don't know is how to make Caja side panel icons bigger. It seems they are hardcoded to 16 pixels.

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: Luke from DC @.> Sent: Tuesday, July 11, 2023 7:21:23 PM To: mate-desktop/caja @.> Cc: crojack @.>; Comment @.> Subject: Re: [mate-desktop/caja] Caja's SEARCH Location/Criteria Has HUGE Menus/Buttons (Issue #1689)

Right-click on the left panel (assuming you are using a mate-panel set to render on the left), and select "Properties" from the context menu. You will see a "size" spin box item. Substantially increase the size and the icons should scale with it. It they don't, try another icon theme

— Reply to this email directly, view it on GitHubhttps://github.com/mate-desktop/caja/issues/1689#issuecomment-1631203719, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZ4EY7R7VVQQ42DO4SVUNDXPWDRHANCNFSM6AAAAAATAMHJT4. You are receiving this because you commented.Message ID: @.***>

lukefromdc commented 12 months ago

No problem, I misread this. Caja does not have a setting to change side panel icon size, at least not that I've ever seen. That said there are workarounds

If you run compiz, there is a "zoom" plugin that is a screen magnifier and will show everything in the zoomed area double-size.

Also (note that I have NOT tested this), it might be possible to turn the original issue here into a feature, by removing the too-small icons from your icon theme so long as they are PNG icons. That of course will make those icons larger everywhere, not just in mate-panel.

crojack commented 12 months ago

I am using Thunar file manager now. It can scale side panel icons up to 1024 pixels, but I'd like to have that option in Caja because Caja handles Mate desktop and it's impossible to open any desktop folder with other file manager than Caja.

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: Luke from DC @.> Sent: Tuesday, July 11, 2023 7:31:21 PM To: mate-desktop/caja @.> Cc: crojack @.>; Comment @.> Subject: Re: [mate-desktop/caja] Caja's SEARCH Location/Criteria Has HUGE Menus/Buttons (Issue #1689)

No problem, I misread this. Caja does not have a setting to change side panel icon size, at least not that I've ever seen. That said there are workarounds

If you run compiz, there is a "zoom" plugin that is a screen magnifier and will show everything in the zoomed area double-size.

— Reply to this email directly, view it on GitHubhttps://github.com/mate-desktop/caja/issues/1689#issuecomment-1631220104, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZ4EY7NNVGL4EVCI6OZKNDXPWEWTANCNFSM6AAAAAATAMHJT4. You are receiving this because you commented.Message ID: @.***>

lukefromdc commented 12 months ago

I don't have the time to code that at the moment, busy with the Wayland porting effort (we will support both Xorg and wayland). If anyone else wants to work on this I'll be glad to review it though

crojack commented 12 months ago

Will we get proper scaling in Mate with Wayland?

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg


From: Luke from DC @.> Sent: Tuesday, July 11, 2023 7:53:56 PM To: mate-desktop/caja @.> Cc: crojack @.>; Comment @.> Subject: Re: [mate-desktop/caja] Caja's SEARCH Location/Criteria Has HUGE Menus/Buttons (Issue #1689)

I don't have the time to code that at the moment, busy with the Wayland porting effort (we will support both Xorg and wayland). If anyone else wants to work on this I'll be glad to review it though

— Reply to this email directly, view it on GitHubhttps://github.com/mate-desktop/caja/issues/1689#issuecomment-1631249467, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZ4EY6KIRODEN5H7ECTYLDXPWHLJANCNFSM6AAAAAATAMHJT4. You are receiving this because you commented.Message ID: @.***>

lukefromdc commented 12 months ago

In wayland itself you can set fractional scaling and (at least in wayfire) it just plain works. This is one of the things that's a lot easier in wayland than in x11.