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

Button height in window list too large #275

Open
mark-herbert42 opened this issue Sep 27, 2024 · 7 comments
Open

Button height in window list too large #275

mark-herbert42 opened this issue Sep 27, 2024 · 7 comments

Comments

@mark-herbert42
Copy link

I have wf-panel on the bottom and mate-panel on the top. same font size - but mate panel looks compact and clean, while wf-panel ignores my minimal height and icon size options and makes huge high buttons in window list. It is not a question of theme - WCM paints buttons like mate panel does. So it is something how panel draws the buttons.

@mark-herbert42
Copy link
Author

The issue definitely coming from window-list. When there are no windows on the desktop and no buttons on window list the wf-panel looks ok. But with the first button appearing becomes ugly.

@ammen99
Copy link
Member

ammen99 commented Sep 27, 2024

For reasons I do not remember we do not allow size less than 24 pixels for window-list icons. If you can compile wf-panel from source, try changing the value 24 on this line here and see whether it helps you get smaller icons:

std::min(int(minimal_panel_height), 24), button.get_scale_factor());

If it works for smaller values, I will just remove the lower limit because I don't remember why it is there in the first place, maybe it used to not work before but works now.

@mark-herbert42
Copy link
Author

I've done that and received small , not small - tiny icons on huge buttons of the same size. Here is the shot of mate panel and wf-panel side by side. With mate panel I can set the size and it takes whatever I set up there. With wf-panel I can set "minimal size" but the thing takes as much space as it wants so this "minimal size" is only good if you want to grow the panel bigger.
panel

@ammen99
Copy link
Member

ammen99 commented Sep 27, 2024

by the looks of it I would guess that the problem is the spacing around the icons on the right (battery/network), can you try making them less big just to check whether this is the case. if yes I think you can adjust the margin size with css

@mark-herbert42
Copy link
Author

I think got how Mate do it
if (panel_size < 30) {
gtk_css_provider_load_from_data (css_provider, ".panel-button {min-height: 13px; min-width: 13px; padding: 0px;}", -1, NULL);
}
Put padding to 0 for buttons inside my theme and it looks way better now. The question is how to make the same in C++ version of code

@ammen99
Copy link
Member

ammen99 commented Sep 27, 2024

You don't need to do that in C++, wf-panel can load user CSS from different files, see https://github.com/WayfireWM/wf-shell/wiki/Style:-overview

You can launch the panel with GTK_DEBUG=interactive in order to inspect the ids and classes of the buttons and icons you are interested in.

@mark-herbert42
Copy link
Author

things work strange way there. So I made the theme with 0 padding, also activated small buttons in css. So when I do not use window-list plugin wf-shell gives same size as mate-panel. And - there are buttons on the panel. f.e. clock widget is a button when i click on it and it is stlll small button - like on mate-panel.

Then I add window-list. Whrn window-list is empty - nothing happens, but when there appears first button - the panel immediately grows in height and buttons on window-list are painted with huge padding. So it is window-list that causes trouble.

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