Improve support for gtk-csd-reversed-placement

This patch changes how we deal with window control buttons on left
layouts. Previously, we looked to a pref that was only set on macos
but with this patch we use media queries to detect whether the system
is macOS or gtk-csd buttons use left-side layout.

To support old-style "override pref" this patch also introduces a
new custom pref userchrome.force-window-controls-on-left.enabled
which can be used e.g on Windows to move window controls to left side.
This logic is currently only supported in styles that use
window_control_placeholder_support.css
This commit is contained in:
MrOtherGuy
2022-12-23 13:53:51 +02:00
parent c07ce454e8
commit 95fbda2710
5 changed files with 68 additions and 24 deletions

View File

@@ -23,8 +23,11 @@ linux_gtk_window_control_patch.css
right:0;
height: 40px;
}
/* Mac specific. You should set that font-smoothing pref to true if you are on any platform where window controls are on left */
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){
@media (-moz-gtk-csd-reversed-placement),
(-moz-platform: macos){
.titlebar-buttonbox-container{ left:0; right: unset !important; }
}
@supports -moz-bool-pref("userchrome.window-controls-on-left.enabled"){
.titlebar-buttonbox-container{ left:0; right: unset !important; }
}