Files
oak-gpui/styles/src/styleTree/projectPanel.ts
T
Max BrunsfeldandAntonio Scandurra 8fdc5c9be3 Improve the appearance of project panel filename editor
* Always layout single-line editors with a fixed height
* Preserve directory chevron when editing folder names
* Allow theming the filename editor

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-05-04 10:28:44 -07:00

36 lines
1.1 KiB
TypeScript

import Theme from "../themes/theme";
import { panel } from "./app";
import { backgroundColor, iconColor, player, text } from "./components";
export default function projectPanel(theme: Theme) {
return {
...panel,
padding: { left: 12, right: 12, top: 6, bottom: 6 },
indentWidth: 20,
entry: {
height: 24,
iconColor: iconColor(theme, "muted"),
iconSize: 8,
iconSpacing: 8,
text: text(theme, "mono", "muted", { size: "sm" }),
hover: {
background: backgroundColor(theme, 300, "hovered"),
text: text(theme, "mono", "primary", { size: "sm" }),
},
active: {
background: backgroundColor(theme, 300, "active"),
text: text(theme, "mono", "primary", { size: "sm" }),
},
activeHover: {
background: backgroundColor(theme, 300, "hovered"),
text: text(theme, "mono", "active", { size: "sm" }),
}
},
filenameEditor: {
background: backgroundColor(theme, 500, "active"),
text: text(theme, "mono", "primary", { size: "sm" }),
selection: player(theme, 1).selection,
},
};
}