Skip to content

Commit adda85e

Browse files
committed
fix button color in dark theme
1 parent e52f2ec commit adda85e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

configs/app/ui/views/customColor.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ const handleCustomColor = (() => {
130130
textColor,
131131
textHoverColor,
132132
buttonColor,
133+
darkButtonColor,
133134
lineOfCurveGraphColor: lineColor,
134135
shadowOfCurveGraphColor: shadowColor,
135136
} = customColorJSON;
@@ -152,9 +153,9 @@ const handleCustomColor = (() => {
152153
}
153154

154155
adjustRgb = adjustColor(customRgbDark, baseRgbDark, '#2A4365');
155-
if (buttonColor) {
156-
defaultCustomColor.panelBtnDark = rgbFormatRegex.test(buttonColor) ? buttonColor :
157-
`rgb(${ hexToRgb(buttonColor).r }, ${ hexToRgb(buttonColor).g }, ${ hexToRgb(buttonColor).b })`;
156+
if (darkButtonColor) {
157+
defaultCustomColor.panelBtnDark = rgbFormatRegex.test(darkButtonColor) ? darkButtonColor :
158+
`rgb(${ hexToRgb(darkButtonColor).r }, ${ hexToRgb(darkButtonColor).g }, ${ hexToRgb(darkButtonColor).b })`;
158159
} else {
159160
defaultCustomColor.panelBtnDark = `rgb(${ adjustRgb.r }, ${ adjustRgb.g }, ${ adjustRgb.b })`;
160161
}

0 commit comments

Comments
 (0)