separate window-control-drag-space-width to -pre and -post
This way we can handle maximized windows not having the other drag space like Firefox does normally. This patch additionally adds window control width values for Win7 Win8 and linux
This commit is contained in:
		
							parent
							
								
									a73238a267
								
							
						
					
					
						commit
						6214f6e1e7
					
				
					 7 changed files with 37 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -11,9 +11,30 @@ See the above repository for updates as well as full license text. */
 | 
			
		|||
/* Defaults for window controls on RIGHT side of the window */
 | 
			
		||||
/* Modify these values to match your preferences */
 | 
			
		||||
:root[tabsintitlebar]{
 | 
			
		||||
  --uc-window-control-width: 138px; /* Space reserved for window controls */
 | 
			
		||||
  --uc-window-drag-space-width: 24px; /* Extra space reserved on both sides of the nav-bar to be able to drag the window */
 | 
			
		||||
  --uc-window-control-width: 138px; /* Space reserved for window controls (Win10) */
 | 
			
		||||
  /* Extra space reserved on both sides of the nav-bar to be able to drag the window */
 | 
			
		||||
  --uc-window-drag-space-pre: 30px; /* left side*/
 | 
			
		||||
  --uc-window-drag-space-post: 30px; /* right side*/
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
:root[tabsintitlebar][sizemode="maximized"] {
 | 
			
		||||
  --uc-window-drag-space-pre: 0px; /* Remove pre space */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media (-moz-os-version: windows-win7), (-moz-os-version: windows-win8) {
 | 
			
		||||
  :root[tabsintitlebar] {
 | 
			
		||||
    --uc-window-control-width: 105px;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media (-moz-gtk-csd-available) {
 | 
			
		||||
  :root[tabsintitlebar] {
 | 
			
		||||
    --uc-window-control-width: 84px;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* macOS settings are further below */
 | 
			
		||||
 | 
			
		||||
:root[sizemode="fullscreen"] .titlebar-buttonbox-container{ display: none !important }
 | 
			
		||||
:root[sizemode="fullscreen"] #navigator-toolbox { position: relative; }
 | 
			
		||||
:root[sizemode="fullscreen"] #window-controls{
 | 
			
		||||
| 
						 | 
				
			
			@ -25,9 +46,9 @@ See the above repository for updates as well as full license text. */
 | 
			
		|||
}
 | 
			
		||||
:root[uidensity="compact"][sizemode="fullscreen"] #window-controls{ height: 32px }
 | 
			
		||||
#nav-bar{
 | 
			
		||||
  border-inline: var(--uc-window-drag-space-width,0px) solid var(--toolbar-bgcolor);
 | 
			
		||||
  border-inline: var(--uc-window-drag-space-pre,0px) solid var(--toolbar-bgcolor);
 | 
			
		||||
  border-inline-style: solid !important;
 | 
			
		||||
  border-right-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-width,0px));
 | 
			
		||||
  border-right-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-post,0px));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Use this pref to check Mac OS where window controls are on left */
 | 
			
		||||
| 
						 | 
				
			
			@ -35,6 +56,6 @@ See the above repository for updates as well as full license text. */
 | 
			
		|||
@supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled"){
 | 
			
		||||
  :root{ --uc-window-control-width: 72px; }
 | 
			
		||||
  :root[tabsintitlebar="true"]:not([inFullscreen]) #nav-bar{
 | 
			
		||||
    border-inline-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-width,0px)) var(--uc-window-drag-space-width,0px)
 | 
			
		||||
    border-inline-width: calc(var(--uc-window-control-width,0px) + var(--uc-window-drag-space-post,0px)) var(--uc-window-drag-space-pre,0px)
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue