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:
@@ -11,7 +11,9 @@ See the above repository for updates as well as full license text. */
|
||||
|
||||
/* Modify it to suit your needs */
|
||||
@media screen and (min-width: 1100px){
|
||||
|
||||
:root[tabsintitlebar][sizemode="normal"]{
|
||||
--uc-window-drag-space-width: 24px;
|
||||
}
|
||||
:root[uidensity="compact"]{
|
||||
--tab-block-margin: 2px !important;
|
||||
}
|
||||
@@ -53,12 +55,24 @@ See the above repository for updates as well as full license text. */
|
||||
}
|
||||
|
||||
/* Window drag space */
|
||||
:root[tabsintitlebar="true"] #nav-bar{ padding-left: 24px !important }
|
||||
:root[tabsintitlebar="true"] #nav-bar{ padding-left: var(--uc-window-drag-space-width) !important }
|
||||
|
||||
/* Rules specific to window controls on right layout */
|
||||
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){
|
||||
.titlebar-buttonbox-container{ position: fixed; display: block; left: 0px; z-index: 3; }
|
||||
:root[tabsintitlebar="true"] #nav-bar{ padding-left: 96px !important; padding-right: 0px !important; }
|
||||
/* Rules for window controls on left layout */
|
||||
|
||||
@media (-moz-gtk-csd-reversed-placement),
|
||||
(-moz-platform: macos){
|
||||
.titlebar-buttonbox-container{
|
||||
position: fixed;
|
||||
display: flex;
|
||||
left: 0px;
|
||||
z-index: 3;
|
||||
height: var(--uc-toolbar-height);
|
||||
align-items: center
|
||||
}
|
||||
:root[tabsintitlebar="true"] #nav-bar{ padding-inline: calc(var(--uc-window-drag-space-width,0px) + 84px) 0px !important; }
|
||||
}
|
||||
@media (-moz-platform: macos){
|
||||
:root[tabsintitlebar="true"] #nav-bar{ padding-inline: calc(var(--uc-window-drag-space-width,0px) + 72px) 0px !important; }
|
||||
}
|
||||
|
||||
/* 1px margin on touch density causes tabs to be too high */
|
||||
|
||||
Reference in New Issue
Block a user