xfce-winxp-tc icon indicating copy to clipboard operation
xfce-winxp-tc copied to clipboard

Window buttons should be selectable across the full height regardless of margins

Open rozniak opened this issue 2 years ago • 9 comments

The themes make use of margins for the window buttons on the taskband, though currently this means that if your mouse is not on the button itself, it will not react.

This is an important UX thing because the user should be able to whip the mouse to the edge of the screen and click to open whatever window they want - currently this will result in clicking in the margin.

The margins are present in Windows XP, but the margins do count as part of the button (clicking in either the top or bottom margin will activate the button).

rozniak avatar Aug 08 '22 11:08 rozniak

Currently the XFCE window buttons plugin is used, I'm not really sure about upstreaming this feature.

This may be something to introduce when writing a custom taskbar plugin for this repo, which needs doing anyway to implement some other XP behaviours (such as collapsing window buttons when multiple for the same program are open).

My initial thought is that each GtkToggleButton should be contained within a GtkEventBox would could forward click events to the child button.

rozniak avatar Aug 08 '22 11:08 rozniak

Hi can you make a Screenshot of what you mean. To be honest you need to increase the Border Image width and internal padding while not using margin. There might be the Problem with background goin over the borders tough. Maybe you can work around with Box shadows.

blue-devil-93 avatar Aug 08 '22 19:08 blue-devil-93

The sections in yellow are included in the hitbox of the button: image

In XFCE, this is not the case. Though this does not appear to be true for the Windows Classic theme...

rozniak avatar Aug 08 '22 19:08 rozniak

You need to include the Panel borders inside the Button borders.

First the border with and margin you set to 0px for the Button. Then you set a padding insidebthe button that it doesnt usevspace you put the border icon. Then you load the border image which contains also panel background. That way xfce thinks the panel button is bigger and reacts even if you adress sapce visually outside the button.

blue-devil-93 avatar Aug 08 '22 20:08 blue-devil-93

IMG_1659989223

Green is the area you cut the image, red the area that will be transparent. You just need a border image and use padding to place the text an icon of the button at a good place.

blue-devil-93 avatar Aug 08 '22 20:08 blue-devil-93

Ti put it into pseudo code:

margin-top: 0px; margin-bottom:0px; padding-top:4px, padding-bottom:4px; border-image: url(funny) 8 8 8 8 / 8px 8px 8px 8px stretch; border-width:0px; border-style:solid;

blue-devil-93 avatar Aug 08 '22 20:08 blue-devil-93

I get what you're saying, I'm not a huge fan of such a hack but considering this only seems to apply to themes rather than Windows Classic I'm not sure we have much choice...

rozniak avatar Aug 09 '22 07:08 rozniak

I might still see if there is a good GTK solution we can use.

rozniak avatar Aug 09 '22 07:08 rozniak

It'll work on luna style too. 'm very sure of that. Send you xfce panel scss later with the assets. It is a hack thats true. For the yellow area use a drop shadow on panel bg instead of border or background image. That way it scales rather correctly. Yes its dirty hack but working correct.

blue-devil-93 avatar Aug 09 '22 11:08 blue-devil-93