docs: note macOS bounds Tray offset (#39512)
* docs: note macOS bounds Tray offset * Update docs/api/browser-window.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> --------- Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
		
					parent
					
						
							
								dd8df3b0c4
							
						
					
				
			
			
				commit
				
					
						31dfde7fa6
					
				
			
		
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -820,10 +820,14 @@ win.setBounds({ width: 100 })
 | 
			
		|||
console.log(win.getBounds())
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
**Note:** On macOS, the y-coordinate value cannot be smaller than the [Tray](tray.md) height. The tray height has changed over time and depends on the operating system, but is between 20-40px. Passing a value lower than the tray height will result in a window that is flush to the tray.
 | 
			
		||||
 | 
			
		||||
#### `win.getBounds()`
 | 
			
		||||
 | 
			
		||||
Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window as `Object`.
 | 
			
		||||
 | 
			
		||||
**Note:** On macOS, the y-coordinate value returned will be at minimum the [Tray](tray.md) height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height: 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x: 25, y: 38, width: 800, height: 600 }`.
 | 
			
		||||
 | 
			
		||||
#### `win.getBackgroundColor()`
 | 
			
		||||
 | 
			
		||||
Returns `string` - Gets the background color of the window in Hex (`#RRGGBB`) format.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue