diff --git a/src-tauri/src/window_menu.rs b/src-tauri/src/window_menu.rs index 773af11c..7b218400 100644 --- a/src-tauri/src/window_menu.rs +++ b/src-tauri/src/window_menu.rs @@ -1,8 +1,8 @@ +pub use tauri::AppHandle; use tauri::menu::{ - AboutMetadata, Menu, MenuItemBuilder, PredefinedMenuItem, Submenu, HELP_SUBMENU_ID, + AboutMetadata, HELP_SUBMENU_ID, Menu, MenuItemBuilder, PredefinedMenuItem, Submenu, WINDOW_SUBMENU_ID, }; -pub use tauri::AppHandle; use tauri::Wry; pub fn app_menu(app_handle: &AppHandle) -> tauri::Result> { @@ -107,15 +107,15 @@ pub fn app_menu(app_handle: &AppHandle) -> tauri::Result> { &PredefinedMenuItem::fullscreen(app_handle, None)?, #[cfg(target_os = "macos")] &PredefinedMenuItem::separator(app_handle)?, - &MenuItemBuilder::with_id("zoom_reset".to_string(), "Zoom to Actual Size") - .accelerator("CmdOrCtrl+0") - .build(app_handle)?, - &MenuItemBuilder::with_id("zoom_in".to_string(), "Zoom In") - .accelerator("CmdOrCtrl+=") - .build(app_handle)?, - &MenuItemBuilder::with_id("zoom_out".to_string(), "Zoom Out") - .accelerator("CmdOrCtrl+-") - .build(app_handle)?, + // &MenuItemBuilder::with_id("zoom_reset".to_string(), "Zoom to Actual Size") + // .accelerator("CmdOrCtrl+0") + // .build(app_handle)?, + // &MenuItemBuilder::with_id("zoom_in".to_string(), "Zoom In") + // .accelerator("CmdOrCtrl+=") + // .build(app_handle)?, + // &MenuItemBuilder::with_id("zoom_out".to_string(), "Zoom Out") + // .accelerator("CmdOrCtrl+-") + // .build(app_handle)?, ], )?, &window_menu, diff --git a/src-web/components/core/Dropdown.tsx b/src-web/components/core/Dropdown.tsx index ee49bdea..b6bb1034 100644 --- a/src-web/components/core/Dropdown.tsx +++ b/src-web/components/core/Dropdown.tsx @@ -431,7 +431,7 @@ const Menu = forwardRef, MenuPro )} {containerStyles && ( diff --git a/src-web/components/core/Editor/extensions.ts b/src-web/components/core/Editor/extensions.ts index c8879acd..47c13e4b 100644 --- a/src-web/components/core/Editor/extensions.ts +++ b/src-web/components/core/Editor/extensions.ts @@ -101,7 +101,7 @@ export const baseExtensions = [ dropCursor(), drawSelection(), autocompletion({ - tooltipClass: () => 'x-theme-dialog', + tooltipClass: () => 'x-theme-menu', closeOnBlur: true, // Set to `false` for debugging in devtools without closing it compareCompletions: (a, b) => { // Don't sort completions at all, only on boost diff --git a/src-web/components/core/Select.tsx b/src-web/components/core/Select.tsx index 4feedc47..3a5e7e4b 100644 --- a/src-web/components/core/Select.tsx +++ b/src-web/components/core/Select.tsx @@ -1,4 +1,5 @@ import classNames from 'classnames'; +import type { CSSProperties } from 'react'; interface Props { name: string; @@ -75,9 +76,11 @@ export function Select({ ); } -const selectBackgroundStyles = { +const selectBackgroundStyles: CSSProperties = { backgroundImage: `url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e")`, backgroundPosition: 'right 0.3rem center', backgroundRepeat: 'no-repeat', backgroundSize: '1.5em 1.5em', + appearance: 'none', + printColorAdjust: 'exact', }; diff --git a/src-web/lib/theme/themes.ts b/src-web/lib/theme/themes.ts index ace9c25d..c02d0123 100644 --- a/src-web/lib/theme/themes.ts +++ b/src-web/lib/theme/themes.ts @@ -1,11 +1,71 @@ +import { Color } from './color'; import { catppuccin } from './themes/catppuccin'; import { github } from './themes/github'; import { monokaiPro } from './themes/monokai-pro'; import { relaxing } from './themes/relaxing'; import { rosePine } from './themes/rose-pine'; import { yaak, yaakDark, yaakLight } from './themes/yaak'; +import type { YaakTheme } from './window'; + +const hotdogStand: YaakTheme = { + id: 'hotdog-stand', + name: 'Hotdog Stand', + background: new Color('#ff0000', 'dark'), + backgroundHighlight: new Color('#000000', 'dark'), + backgroundHighlightSecondary: new Color('#000000', 'dark'), + foreground: new Color('#ffffff', 'dark'), + foregroundSubtle: new Color('#ffffff', 'dark'), + foregroundSubtler: new Color('#ffff00', 'dark'), + colors: { + primary: new Color('#ffff00', 'dark'), + secondary: new Color('#ffff00', 'dark'), + info: new Color('#ffff00', 'dark'), + notice: new Color('#ffff00', 'dark'), + warning: new Color('#ffff00', 'dark'), + danger: new Color('#ffff00', 'dark'), + }, + components: { + appHeader: { + background: new Color('#000000', 'dark'), + foreground: new Color('#ffffff', 'dark'), + foregroundSubtle: new Color('#ffff00', 'dark'), + foregroundSubtler: new Color('#ff0000', 'dark'), + }, + menu: { + background: new Color('#000000', 'dark'), + backgroundHighlight: new Color('#ff0000', 'dark'), + backgroundHighlightSecondary: new Color('#ff0000', 'dark'), + foreground: new Color('#ffffff', 'dark'), + foregroundSubtle: new Color('#ffff00', 'dark'), + foregroundSubtler: new Color('#ffff00', 'dark'), + }, + button: { + background: new Color('#000000', 'dark'), + foreground: new Color('#ffffff', 'dark'), + colors: { + primary: new Color('#000000', 'dark'), + secondary: new Color('#ffffff', 'dark'), + info: new Color('#000000', 'dark'), + notice: new Color('#ffff00', 'dark'), + warning: new Color('#000000', 'dark'), + danger: new Color('#ff0000', 'dark'), + }, + }, + editor: { + colors: { + primary: new Color('#ffffff', 'dark'), + secondary: new Color('#ffffff', 'dark'), + info: new Color('#ffffff', 'dark'), + notice: new Color('#ffff00', 'dark'), + warning: new Color('#ffffff', 'dark'), + danger: new Color('#ffffff', 'dark'), + }, + }, + }, +}; export const yaakThemes = [ + hotdogStand, ...yaak, ...catppuccin, ...relaxing, diff --git a/src-web/main.css b/src-web/main.css index 832acee7..ee60b728 100644 --- a/src-web/main.css +++ b/src-web/main.css @@ -80,14 +80,4 @@ --color-white: 255 100% 100%; --color-black: 255 0% 0%; } - - select { - @apply appearance-none; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); - background-position: right 0.5rem center; - background-repeat: no-repeat; - background-size: 1.5em 1.5em; - padding-right: 2.5rem; - -webkit-print-color-adjust: exact; - } }