Skip to content

Commit 3413212

Browse files
committed
1 parent 8783859 commit 3413212

File tree

2 files changed

+5
-3
lines changed
  • packages/frontend/core/src/desktop/dialogs/setting/general-setting/editor

2 files changed

+5
-3
lines changed

packages/frontend/core/src/desktop/dialogs/setting/general-setting/editor/edgeless/shape.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ export const ShapeSettings = () => {
7272
const { palettes: textColorPalettes, getCurrentColor: getCurrentTextColor } =
7373
usePalettes(
7474
DefaultTheme.ShapeTextColorShortPalettes,
75-
DefaultTheme.shapeTextColor
75+
DefaultTheme.shapeTextColor,
76+
true
7677
);
7778

7879
const [currentShape, setCurrentShape] = useState<ShapeName>(ShapeType.Rect);

packages/frontend/core/src/desktop/dialogs/setting/general-setting/editor/utils.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ export const useResolvedTheme = () => {
1717

1818
export const usePalettes = (
1919
originalPalettes: Palette[],
20-
defaultColor: Color
20+
defaultColor: Color,
21+
isShapeText = false
2122
) => {
2223
const theme = useResolvedTheme();
2324
const isDark = theme === ColorScheme.Dark;
2425
const palettes = originalPalettes.map(({ key, value }) => {
2526
// Title needs to be inverted.
26-
if (isDark) {
27+
if (!isShapeText && isDark) {
2728
if (key === 'Black') {
2829
key = 'White';
2930
} else if (key === 'White') {

0 commit comments

Comments
 (0)