MrOtherGuy / firefox-csshacks

Collection of userstyles affecting the browser
Mozilla Public License 2.0
3.05k stars 307 forks source link

window_control_force_linux_system_style.css odd hover behavior #359

Closed epic0421 closed 3 months ago

epic0421 commented 3 months ago

I made sure I had the latest version of the window_control_force_linux_system_style.css file before testing this. This might have broke after a recent Firefox update (I am using 125.0.1 on KDE Plasma), but now whenever I hover over a button and move onto a different button right next to it, the button stays in its hovered state. It works fine if I hover over a button and then don't hover over any other buttons. It also exits the hover state normally if I am moving off of a button.

Moving from close button to maximize/minimize button to minimize button 2024-04-16_23 45 06 After moving my cursor off of the minimize button 2024-04-16_23 43 17

Without the CSS modification, this does not happen but noticed that the buttons are slightly more spaced out like shown here. 2024-04-16_23 36 21

MrOtherGuy commented 3 months ago

I've updated the style to make it work as well as I could, but I think there might be an actual bug somewhere because on my system hover states on native appearance buttons don't show up at on focused windows. This behavior happens with or without that style whenever native-appearance window controls are used.

epic0421 commented 3 months ago

Try this. I ended up messing with your solution for a bit since it looked even worse on my system and I managed to fix the issue on my end. Now it behaves like it should and the padding is just right.

.titlebar-button > .toolbarbutton-icon{
  appearance: auto !important;
  width: unset !important;
  height: unset !important;
}
.titlebar-min > .toolbarbutton-icon{
  -moz-default-appearance: -moz-window-button-minimize !important;
}
.titlebar-max > .toolbarbutton-icon{
  -moz-default-appearance: -moz-window-button-maximize !important;
}
.titlebar-restore > .toolbarbutton-icon{
  -moz-default-appearance: -moz-window-button-restore !important;
}
.titlebar-close > .toolbarbutton-icon{
  -moz-default-appearance: -moz-window-button-close !important;
}
MrOtherGuy commented 3 months ago

Ugh. I messed up in the previous commit. I got two Firefox's and two browser toolboxes open while testing this and copied code from the wrong one...

Latest should update should work nicely though.