Skip to content

Styles: support levelbar - #1040

Open
danirabbit wants to merge 10 commits into
mainfrom
danirabbit/levelbar
Open

danirabbit wants to merge 10 commits into
mainfrom
danirabbit/levelbar

Conversation

@danirabbit

@danirabbit danirabbit commented Sep 10, 2026

Copy link
Copy Markdown
Member
Screenshot from 2026-09-10 11 27 18

My reasoning behind levelbar sizing is that currently we use it for things like disk fullness, battery charge, steps in a paged view etc.

For vertical discrete levelbars, the only use of this I've seen is for audio levels, so that's why I did this design

By default GTK assigns some of its own internal style classes, but I don't like having developers put an arbitrary string here, so I added support for named constants

I didn't include accent color here because your accent can be red or green or yellow

@danirabbit
danirabbit requested review from a team September 10, 2026 18:19
@github-project-automation github-project-automation Bot moved this to Backlog in Granite 9 Sep 10, 2026
@danirabbit danirabbit moved this from Backlog to In review in Granite 9 Sep 10, 2026
@lenemter

This comment was marked as resolved.

@lenemter lenemter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like Granite is forcing a minimum width/height here. Is this intentional?

Image

Also with some values, your accent color is visible, which, according to the description, shouldn't be

Image

@danirabbit

Copy link
Copy Markdown
Member Author

@lenemter color fixed!

Can you explain what you mean about the minimum width/height? We have to set some minimums or it would be 0 width/height, but otherwise what you see in the demo is filling the box size:

Screenshot from 2026-09-20 13 16 55

@danirabbit
danirabbit requested a review from lenemter September 20, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

3 participants