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

Fix for categories list always showing a scrollbar #13

Merged
merged 2 commits into from
Jun 30, 2019
Merged

Fix for categories list always showing a scrollbar #13

merged 2 commits into from
Jun 30, 2019

Conversation

gabrielfin
Copy link
Contributor

This is a fix for an issue from the old repo: solus-project/brisk-menu#83

The problem is that gtk_widget_get_preferred_height expects the height to include the border width as well. Therefore, on themes* that have a border around BriskMenuSidebarScroller, the scroller will always be a few pixels shorter.

(*) https://github.com/ubuntu-mate/ubuntu-mate-artwork/blob/master/usr/share/themes/Ambiant-MATE/gtk-3.0/apps/mate-applications.css#L694

@kyrios123
Copy link
Contributor

Unfortunately it doesn't seem to work on my test VM

image

@gabrielfin
Copy link
Contributor Author

That's Adapta, right? The issue still occured because that theme adds a margin to BriskMenuSidebarScroller. So I added margin and padding to the height calculation as well.

It's not very pretty, I know very little about Gtk. Maybe there's a nicer way to solve this?

@kyrios123
Copy link
Contributor

LGTM. It works fine with Adapta and I haven't noticed regression with a few other random themes.
Can be merged if @JoshStrobl agrees.

@JoshStrobl
Copy link
Member

This is probably how I would've done it as well, to be fair. LGTM, thanks for the PR!

@JoshStrobl JoshStrobl merged commit 31610ed into getsolus:master Jun 30, 2019
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

Successfully merging this pull request may close these issues.

3 participants