Close, minmize and maximize buttons on Windows

I have successfully changed (on windows) the color of the window’s close button to red when the mouse hovers over it. Now, I would like to adjust the close, minimize, and maximize buttons so that they occupy the entire vertical space of the title bar. Instead of having a small close button like this:
WinGTK

I would prefer something like this:
Windows

Is there any way to achieve this using CSS or programmatically?

Is there a delegate or any other method that can allow us to draw the close, minimize, and maximize buttons on non-GNOME systems as desired?

1 Like

Hi,

That may be more or less complex.

  • If you use a simple GtkWindow without headerbar, you can force disable client-side decorations to let Windows draw the titlebar. See Is there any way to render a native Windows window appearance?

  • If you use a GtkWindow with custom headerbar, it’s possible to tweak with CSS. Here an attempt I made long time ago, not sure if it still works:

headerbar {
	padding-right: 0;
}

headerbar windowcontrols {
	margin: 0;
}

headerbar windowcontrols button {
	padding: 0;
	margin: 0;
	min-width: 40px;
	min-height: 44px;
	border-radius: 0;
}

headerbar windowcontrols button.close:hover {
	color: white;
	background: #e00000;
}
  • If you use an AdwWindow, last time I checked the controls could not fill the whole titlebar space because of some intermediate box or whatever. I never really investigated for a solution, because I don’t use libadwaita in my projects. In the worst case, you may need to re-implement custom windowcontrols by yourself.
1 Like

Yes, I use libadwaita…