mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
Pull toolbar into it's own styletree
This commit is contained in:
parent
e7ba5a1edb
commit
0a14e33dba
20
styles/src/style_tree/toolbar.ts
Normal file
20
styles/src/style_tree/toolbar.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import { useTheme } from "../common"
|
||||||
|
import { toggleable_icon_button } from "../component/icon_button"
|
||||||
|
import { background, border } from "./components"
|
||||||
|
|
||||||
|
export const toolbar = () => {
|
||||||
|
const theme = useTheme()
|
||||||
|
|
||||||
|
return {
|
||||||
|
height: 42,
|
||||||
|
background: background(theme.highest),
|
||||||
|
border: border(theme.highest, { bottom: true }),
|
||||||
|
item_spacing: 8,
|
||||||
|
toggleable_tool: toggleable_icon_button(theme, {
|
||||||
|
margin: { left: 8 },
|
||||||
|
variant: "ghost",
|
||||||
|
active_color: "accent",
|
||||||
|
}),
|
||||||
|
padding: { left: 8, right: 8 },
|
||||||
|
}
|
||||||
|
}
|
@ -13,6 +13,7 @@ import { interactive } from "../element"
|
|||||||
import { titlebar } from "./titlebar"
|
import { titlebar } from "./titlebar"
|
||||||
import { useTheme } from "../theme"
|
import { useTheme } from "../theme"
|
||||||
import { toggleable_icon_button } from "../component/icon_button"
|
import { toggleable_icon_button } from "../component/icon_button"
|
||||||
|
import { toolbar } from "./toolbar"
|
||||||
|
|
||||||
export default function workspace(): any {
|
export default function workspace(): any {
|
||||||
const theme = useTheme()
|
const theme = useTheme()
|
||||||
@ -128,18 +129,7 @@ export default function workspace(): any {
|
|||||||
},
|
},
|
||||||
status_bar: statusBar(),
|
status_bar: statusBar(),
|
||||||
titlebar: titlebar(),
|
titlebar: titlebar(),
|
||||||
toolbar: {
|
toolbar: toolbar(),
|
||||||
height: 42,
|
|
||||||
background: background(theme.highest),
|
|
||||||
border: border(theme.highest, { bottom: true }),
|
|
||||||
item_spacing: 8,
|
|
||||||
toggleable_tool: toggleable_icon_button(theme, {
|
|
||||||
margin: { left: 8 },
|
|
||||||
variant: "ghost",
|
|
||||||
active_color: "accent",
|
|
||||||
}),
|
|
||||||
padding: { left: 8, right: 8 },
|
|
||||||
},
|
|
||||||
breadcrumb_height: 24,
|
breadcrumb_height: 24,
|
||||||
breadcrumbs: interactive({
|
breadcrumbs: interactive({
|
||||||
base: {
|
base: {
|
||||||
|
Loading…
Reference in New Issue
Block a user