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

Gtk.Scale value wraps into two lines #1066

Open
dar5hak opened this issue Aug 1, 2021 · 3 comments
Open

Gtk.Scale value wraps into two lines #1066

dar5hak opened this issue Aug 1, 2021 · 3 comments

Comments

@dar5hak
Copy link
Sponsor

dar5hak commented Aug 1, 2021

What Happened

If the current value text of a GTK Scale exceeds a certain width, then the text wraps into two lines. Observe the value for Fingers:

Screenshot from 2021-08-01 17-01-26

For narrower text values like “31 min,” this does not occur.

I can work around this by doing this:

scale value {
    min-width: 40px;
}

But that’s a hack and probably a bad idea for internationalization.

Expected Behavior

Text should not wrap.

Steps to Reproduce

  1. git clone git@github.com:elfenware/badger.git
  2. Build it with meson using the instructions in the readme.

Logs

Visual bug.

Platform Information

Odin beta, with Badger compiled from the main branch. Display is 1366×768.

@dar5hak
Copy link
Sponsor Author

dar5hak commented Aug 3, 2021

Update: I have pushed the workaround mentioned above, so if you clone Badger, make sure you comment this line.

@dajoha
Copy link

dajoha commented Aug 11, 2021

I had the same issue in a personal project, and found another workaround: using Unicode no-break spaces (U+00A0) instead of normal spaces to format the value, e.g. (Rust string format syntax): "31\u{00a0}min" instead of "31 min".

@dar5hak
Copy link
Sponsor Author

dar5hak commented Aug 11, 2021

@yolenoyer Whoa, that's a great idea, and much cleaner than messing with CSS. I'll give it a shot. Thanks!

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

No branches or pull requests

2 participants