فهرست منبع

Merge pull request #1271 from SamirSaji/bug/light-mood-dropdown-hover-color-fix

Fix: Resolve issue #1146 - UI color in 'light' mode causes dark background on dark text (context menu)
Matt Rubens 10 ماه پیش
والد
کامیت
1750247bca
1فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 6 4
      webview-ui/src/components/chat/ContextMenu.tsx

+ 6 - 4
webview-ui/src/components/chat/ContextMenu.tsx

@@ -187,10 +187,12 @@ const ContextMenu: React.FC<ContextMenuProps> = ({
 							display: "flex",
 							alignItems: "center",
 							justifyContent: "space-between",
-							backgroundColor:
-								index === selectedIndex && isOptionSelectable(option)
-									? "var(--vscode-list-activeSelectionBackground)"
-									: "",
+							...(index === selectedIndex && isOptionSelectable(option)
+								? {
+										backgroundColor: "var(--vscode-list-activeSelectionBackground)",
+										color: "var(--vscode-list-activeSelectionForeground)",
+									}
+								: {}),
 						}}
 						onMouseEnter={() => isOptionSelectable(option) && setSelectedIndex(index)}>
 						<div