Skip to content

vertical sizes of taskbar buttons for existing windows are larger than for new windows #4055

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

Open
ivomac opened this issue Apr 14, 2025 · 2 comments
Labels

Comments

@ivomac
Copy link

ivomac commented Apr 14, 2025

Minimal config:

  • Waybar v0.12.0
  • No style.css
{
	"position": "left",
	"modules-left": [
		"wlr/taskbar"
	],
	"modules-center": [],
	"modules-right": [],
	"wlr/taskbar": {
		"tooltip": true,
		"icon-size": 16,
		"sort-by-app-id": true,
		"on-click": "activate",
		"on-click-middle": "close"
	}
}

Problem:

  1. Start a vertical waybar with taskbar module.
  2. Open a few windows: The spacing between the taskbar buttons is normal.
  3. Reload waybar: The taskbar button spacing of the existing windows becomes larger.
  4. Open a new window: The taskbar button spacing of the new window is normal.

This creates non-uniform spacing between the taskbar buttons when reloading waybar, for example to change the theme config.

The three screenshots show the result of 2. 3. 4. :

Image

@ivomac ivomac changed the title vertical sizes of taskbar buttons for existing windows are than for new windows; noticeable in vertical bars : vertical sizes of taskbar buttons for existing windows are than for new windows; noticeable in vertical bars Apr 14, 2025
@ivomac ivomac changed the title vertical sizes of taskbar buttons for existing windows are than for new windows; noticeable in vertical bars vertical sizes of taskbar buttons for existing windows are larger than for new windows Apr 17, 2025
@ivomac
Copy link
Author

ivomac commented Apr 17, 2025

From debug mode I saw that the taskbar gtk widgets have this structure:

box#taskbar.vertical.module:dir(ltr)
  button.flat.active:dir(ltr)
    box.vertical:dir(ltr)
      label:dir(ltr)
      image:dir(ltr)
      label:dir(ltr)
  button.flat:dir(ltr)
    box.vertical:dir(ltr)
      label:dir(ltr)
      image:dir(ltr)
      label:dir(ltr)
...

Adding different background colors to each element, I see something like below. The black boxes above and below the icons are the label elements. They seem to be the cause of the issue.

Image

@ivomac
Copy link
Author

ivomac commented Apr 17, 2025

I am using this as workaround:

#taskbar button box label {
	all: unset;
	margin: -999px;
}

It removes the label boxes completely so it's fixed for me.

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

No branches or pull requests

1 participant