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

Elide skin tag doesn't work if text is next to an expanding widget #7913

Open
mixxxbot opened this issue Aug 22, 2022 · 4 comments · Fixed by #11194
Open

Elide skin tag doesn't work if text is next to an expanding widget #7913

mixxxbot opened this issue Aug 22, 2022 · 4 comments · Fixed by #11194

Comments

@mixxxbot
Copy link
Collaborator

Reported by: ywwg
Date: 2015-03-21T18:10:44Z
Status: Confirmed
Importance: Wishlist
Launchpad Issue: lp1434865


see: #506 (comment)

If elidable text is next to an expanding widget, even if the text is expanding, it will get prematurely elided and look wrong. My guess is the call to width() is incorrect.

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2015-03-25T18:46:34Z


Copying the GitHub message:

So the problem is if there's a layout like:
[text wlabel][some other expanding widget]

The width() call is wrong... if the text could fill up available space it doesn't and I get:
[text wlab...][ some other expanding widget]

instead of:
[text wlabel in all its long glory][ some other expanding widget]

I can rework LateNight to not use expanding widgets, but I'm going to put in a TODO and file a bug

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2015-03-25T18:53:08Z


I think the current behavior is correct in the first place.
A elided label has no has no preferred size by default. I just takes the space that is available.
So if it is next to an other expanding widget, the other wins.

Of cause we can implement the other behavior, but it is an other degree of complexity, probably needs additional size hints from the skin.
@owen: I think you have fixed the issue in LateNight, so there is currently no demand, right?

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
@daschuer
Copy link
Member

The solution is to re-implement the sizeHint() function to return the size of the not elided text as the desired optimum.

daschuer added a commit to daschuer/mixxx that referenced this issue Jan 15, 2023
@daschuer
Copy link
Member

Fixed in #11194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants