mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Update palettes
This commit is contained in:
parent
ce2112df43
commit
0ed811b81b
@ -1,26 +1,29 @@
|
|||||||
import { ColorScheme } from "../themes/common/colorScheme";
|
import { ColorScheme } from "../themes/common/colorScheme";
|
||||||
import { text, border, background } from "./components";
|
import { withOpacity } from "../utils/color";
|
||||||
|
import { text, background } from "./components";
|
||||||
|
|
||||||
export default function commandPalette(colorScheme: ColorScheme) {
|
export default function commandPalette(colorScheme: ColorScheme) {
|
||||||
let layer = colorScheme.highest.top;
|
let layer = colorScheme.highest.top;
|
||||||
return {
|
return {
|
||||||
keystrokeSpacing: 8,
|
keystrokeSpacing: 8,
|
||||||
key: {
|
key: {
|
||||||
text: text(layer, "mono", { size: "xs" }),
|
text: text(layer, "mono", "on", "default", { size: "xs" }),
|
||||||
cornerRadius: 4,
|
cornerRadius: 2,
|
||||||
background: background(layer, "on"),
|
background: withOpacity(background(layer, "on"), 0.5),
|
||||||
padding: {
|
padding: {
|
||||||
top: 2,
|
top: 1,
|
||||||
bottom: 2,
|
bottom: 1,
|
||||||
left: 8,
|
left: 6,
|
||||||
right: 8,
|
right: 6,
|
||||||
},
|
},
|
||||||
margin: {
|
margin: {
|
||||||
|
top: 1,
|
||||||
|
bottom: 1,
|
||||||
left: 2,
|
left: 2,
|
||||||
},
|
},
|
||||||
active: {
|
active: {
|
||||||
text: text(layer, "mono", { size: "xs" }),
|
text: text(layer, "mono", "on", "active", { size: "xs" }),
|
||||||
background: background(layer),
|
background: withOpacity(background(layer, "on"), 0.2),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -10,8 +10,7 @@ export default function picker(colorScheme: ColorScheme) {
|
|||||||
let layer = elevation.top;
|
let layer = elevation.top;
|
||||||
return {
|
return {
|
||||||
background: background(layer),
|
background: background(layer),
|
||||||
cornerRadius: 8,
|
cornerRadius: 12,
|
||||||
padding: 8,
|
|
||||||
item: {
|
item: {
|
||||||
padding: {
|
padding: {
|
||||||
bottom: 4,
|
bottom: 4,
|
||||||
@ -19,8 +18,12 @@ export default function picker(colorScheme: ColorScheme) {
|
|||||||
right: 12,
|
right: 12,
|
||||||
top: 4,
|
top: 4,
|
||||||
},
|
},
|
||||||
cornerRadius: 8,
|
margin: {
|
||||||
text: text(layer, "sans"),
|
left: 4,
|
||||||
|
right: 4
|
||||||
|
},
|
||||||
|
cornerRadius: 6,
|
||||||
|
text: text(layer, "sans", "variant"),
|
||||||
highlightText: text(layer, "sans", "info", { weight: "bold" }),
|
highlightText: text(layer, "sans", "info", { weight: "bold" }),
|
||||||
active: {
|
active: {
|
||||||
background: background(layer, "active"),
|
background: background(layer, "active"),
|
||||||
@ -35,25 +38,26 @@ export default function picker(colorScheme: ColorScheme) {
|
|||||||
empty: {
|
empty: {
|
||||||
text: text(layer, "sans", "variant"),
|
text: text(layer, "sans", "variant"),
|
||||||
padding: {
|
padding: {
|
||||||
bottom: 4,
|
bottom: 8,
|
||||||
left: 12,
|
left: 16,
|
||||||
right: 12,
|
right: 16,
|
||||||
top: 8,
|
top: 8,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
inputEditor: {
|
inputEditor: {
|
||||||
background: background(layer, "on"),
|
|
||||||
cornerRadius: 8,
|
|
||||||
placeholderText: text(layer, "sans", "on", "disabled"),
|
placeholderText: text(layer, "sans", "on", "disabled"),
|
||||||
selection: colorScheme.players[0],
|
selection: colorScheme.players[0],
|
||||||
text: text(layer, "mono", "on"),
|
text: text(layer, "mono", "on"),
|
||||||
border: border(layer, "on"),
|
border: border(layer, { bottom: true }),
|
||||||
padding: {
|
padding: {
|
||||||
bottom: 7,
|
bottom: 8,
|
||||||
left: 16,
|
left: 16,
|
||||||
right: 16,
|
right: 16,
|
||||||
top: 7,
|
top: 8,
|
||||||
},
|
},
|
||||||
|
margin: {
|
||||||
|
bottom: 4
|
||||||
|
}
|
||||||
},
|
},
|
||||||
shadow: elevation.shadow,
|
shadow: elevation.shadow,
|
||||||
};
|
};
|
||||||
|
@ -57,7 +57,7 @@ export function createColorScheme(name: string, isLight: boolean, colorRamps: {
|
|||||||
let middle = elevation(
|
let middle = elevation(
|
||||||
resampleSet(
|
resampleSet(
|
||||||
baseSet,
|
baseSet,
|
||||||
evenSamples(0.125, 1)
|
evenSamples(0.08, 1)
|
||||||
),
|
),
|
||||||
isLight,
|
isLight,
|
||||||
{
|
{
|
||||||
@ -71,7 +71,7 @@ export function createColorScheme(name: string, isLight: boolean, colorRamps: {
|
|||||||
let highest = elevation(
|
let highest = elevation(
|
||||||
resampleSet(
|
resampleSet(
|
||||||
baseSet,
|
baseSet,
|
||||||
evenSamples(0.25, 1)
|
evenSamples(0.16, 1)
|
||||||
),
|
),
|
||||||
isLight,
|
isLight,
|
||||||
{
|
{
|
||||||
@ -634,10 +634,10 @@ function topLayer(ramps: RampSet, isLight: boolean): Layer {
|
|||||||
disabled: 0.1,
|
disabled: 0.1,
|
||||||
},
|
},
|
||||||
foreground: {
|
foreground: {
|
||||||
default: 0.9,
|
default: 0.6,
|
||||||
hovered: 0.9,
|
hovered: 0.9,
|
||||||
pressed: 0.9,
|
pressed: 0.9,
|
||||||
active: 0.5,
|
active: 0.3,
|
||||||
disabled: 0.2,
|
disabled: 0.2,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user