Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App icons sometimes shown at wrong size (layout issue) #1279

Closed
phattrance opened this issue Dec 9, 2021 · 17 comments
Closed

App icons sometimes shown at wrong size (layout issue) #1279

phattrance opened this issue Dec 9, 2021 · 17 comments
Labels
bug Something isn't working

Comments

@phattrance
Copy link

phattrance commented Dec 9, 2021

Hi, why does the ALTTAB iclons look small vs the other icons? This started to happen 2-3 releases ago and it really annoying. The icons gets smaller seems to be random and sometimes there are like 5 of 8 icons looking smaller etc

IMG_7126

IMG_7127

@phattrance phattrance added the bug Something isn't working label Dec 9, 2021
@lwouis lwouis changed the title icons getting randomly smaller than other icon thumbnails (screenshot inside) App icons sometimes shown at wrong size (layout issue) Dec 10, 2021
@lwouis
Copy link
Owner

lwouis commented Dec 10, 2021

Yes, this is a layout issue that I've noticed as well sometimes when using customized Appearance preferences, as you are doing here (hiding screenshot, hiding title, etc).

Could you please share your preferences on that tab?

image

@phattrance
Copy link
Author

Here are my settings. The small icons seems to be random. sometimes they work fine, sometimes they are small.

image

@phattrance
Copy link
Author

Any ideas on how to fix this? Its so annoying!

@lwouis
Copy link
Owner

lwouis commented Dec 10, 2021

Well you could look into the layout code and share a PR which addresses the issue. That would be the best way to fix this of course.

As a workaround if you don't have time for the real fix, you could tweak your preferences in Appearance to slightly different values and see if it goes away.

i'll try your settings later on my laptop to see if i can reproduce with those, but i can't volunteer much time on this project these days. See the pinned ticket about me looking for someone to take over this project

@phattrance
Copy link
Author

yea, ive already tried tons of different combinations of settings to try to solve this, but they all seem to randomly get smaller somehow. I would say that icons get smaller like 80% of all the time i use alt tab and 20% of the times the icons seems normal sized. I think the problem started showing up when i switched to monterey, i did not have this problem when i used big sur.

@lwouis lwouis added the macOS 12 macOS 12 Monterey specific issue label Dec 11, 2021
@teenjuna
Copy link

teenjuna commented Jan 8, 2022

I experience the same issue and it is indeed very annoying

@brain0verfl0w
Copy link

brain0verfl0w commented Jan 8, 2022

I have the same issue too (m1 air, macOS 12.1)

@metacodes
Copy link
Contributor

The root cause is that hStackView.fittingSize.width sometimes is different. For those smaller icons, hStackView.fittingSize.width is smaller than others. I try to play sliders windowMaxWidthInRow, windowMinWidthInRow and iconSize, it can solve this problem.

image

image

image

Make windowMinWidthInRow less than 10% and adjust iconSize can reproduce this problem.

@lwouis
Copy link
Owner

lwouis commented Jun 1, 2022

The root cause is that hStackView.fittingSize.width sometimes is different

I looked into it, and I think this is not the root cause. I think the root cause is that you can set the preferences to be contradictory. Specifically the whole issue is with the app icon height and the label height.

The dynamic layout AltTab uses can be tweaked by many sliders. Importantly, they are all relative/percentage, except 2:

image

This means that every value the user picks will adapt, according to the screen size. Except the 2 values that are pixel-based, not percentage-based: label size, and icon size.

Let's say the user:

  • Has a 1000px height screen
  • Set the preference so AltTab UI should take 80% of the height of the screen
  • Set the preference so there should be 4 rows of thumbnails

AltTab will thus take use the following formula: rowHeight = 1000 * 0.8 / 4. It will account for paddings and inter-rows spacings, but roughly it cuts the screen into 4.

Then it decides how to lay out the element inside each box. The title is hard set with a pixel value. Same for the icon. Finally, the thumbnail will take the leftover vertical space. In other words, the label and icon are fixed, and the thumbnails take whatever space is left over.

That's the issue: what if the icon + label height is bigger than the whole rowHeight? Then it fights with it. That's when we get layout issues like this ticket.

We can easily confirm this by setting a high value for app icon size and/or label size, then set the number of rows high. It will always break layout.

So essentially we let the users set contradictory values.

I think we should probably just tell users to be careful for now on, when they set incorrectly like this, and the real fix will come when we rethink the whole layout preferences through #351. Probably then some sliders will go, and we will avoid the user shooting themselves in the foot like this.

@lwouis lwouis removed the macOS 12 macOS 12 Monterey specific issue label Jun 10, 2022
@franco-ruggeri
Copy link

franco-ruggeri commented Sep 15, 2022

I'm having the same issue but I manage to fix it by adjusting "Window min width row". To me, it happens when this parameter is too small.

It is still annoying because the good value yielding square icons (see picture in the OP) depends on the screen resolution. Since I change screen resolution during the day (work, home, relax on the sofa), I need to change this value several times per day (6% on UQHD and QHD screens, 10% on laptop screen).

It would be great to add a feature like a checkbox to trim the icons to the smallest width not causing the problem, which would automatically be adjusted depending on the screen resolution.

@Roccobot
Copy link

Roccobot commented May 10, 2023

Same issue here, with the following settings:
Impostazioni 05 (Icone, orizzontale)

@educbraga
Copy link

This seems to happen if 'Window min width in row' is set to 1%. This issue doesn't seem to happen when it's set to 2% or higher.

@Bones526
Copy link

When I have a monitor, I can avoid this situation by adjusting the slider, but when I have an external monitor, a set of settings cannot be better applied to two monitors, so can you detect whether there are multiple monitors, Then set the adjustment slider separately for each monitor, thank you for this application, he is great (Translate from Google)

@DarkMikey
Copy link

This seems to happen if 'Window min width in row' is set to 1%. This issue doesn't seem to happen when it's set to 2% or higher.

Cannot confirm this. I guess this is randomly true in your scenario but with my screen it does happen with 2% but goes away with 8%.

Hope this will be fixed, it annoys me more than it should.

@mruniverse
Copy link

mruniverse commented May 24, 2024

The root cause is that hStackView.fittingSize.width sometimes is different. For those smaller icons, hStackView.fittingSize.width is smaller than others. I try to play sliders windowMaxWidthInRow, windowMinWidthInRow and iconSize, it can solve this problem.

image image image

Make windowMinWidthInRow less than 10% and adjust iconSize can reproduce this problem.

Setting window min width in row, to 10% (it was at 1%), solved the issue for me! Seems like when i switch windows, if the min width is less than 10%, it gets smaller because of this width. If it is at 10%, it always keeps the desired width.

image

@Allsochen
Copy link
Contributor

Allsochen commented Aug 3, 2024

This issue will be fixed by this #3468

@lwouis
Copy link
Owner

lwouis commented Oct 9, 2024

This issue will probably be gone with the revamp from v7.0.0. I'm closing this issue. Please share here if anyone still faces it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests