Fix more issues with panels and zoom (#2545)

Release Notes:

* Fixed the behavior of panel buttons when their panel is open. Show the
key binding for closing the containing dock (preview only).
* Improved the styling of zoomed panels and panes, giving them a
stronger border, and color the zoom button with an "active" style
(preview only).
* Improved the stability of panels' zoom state. Close their dock instead
of resetting their zoom state when dismissing panels to reveal other
items (preview only).
This commit is contained in:
Max Brunsfeld
2023-05-31 13:17:12 -07:00
committed by GitHub
6 changed files with 124 additions and 83 deletions
+3
View File
@@ -94,6 +94,9 @@ export default function tabBar(colorScheme: ColorScheme) {
hover: {
color: foreground(layer, "hovered"),
},
active: {
color: foreground(layer, "accent"),
}
},
paneButtonContainer: {
background: tab.background,
+8 -5
View File
@@ -13,6 +13,7 @@ import tabBar from "./tabBar"
export default function workspace(colorScheme: ColorScheme) {
const layer = colorScheme.lowest
const isLight = colorScheme.isLight
const itemSpacing = 8
const titlebarButton = {
cornerRadius: 6,
@@ -120,16 +121,18 @@ export default function workspace(colorScheme: ColorScheme) {
},
zoomedBackground: {
cursor: "Arrow",
background: withOpacity(background(colorScheme.lowest), 0.85)
background: isLight
? withOpacity(background(colorScheme.lowest), 0.8)
: withOpacity(background(colorScheme.highest), 0.6)
},
zoomedPaneForeground: {
margin: 10,
margin: 16,
shadow: colorScheme.modalShadow,
border: border(colorScheme.highest, { overlay: true }),
border: border(colorScheme.lowest, { overlay: true }),
},
zoomedPanelForeground: {
margin: 18,
border: border(colorScheme.highest, { overlay: true }),
margin: 16,
border: border(colorScheme.lowest, { overlay: true }),
},
dock: {
left: {