Hotdog stand

This commit is contained in:
Gregory Schier
2024-05-23 10:14:07 -07:00
parent 9e6bce0e41
commit a936038f23
6 changed files with 77 additions and 24 deletions

View File

@@ -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<Menu<Wry>> {
@@ -107,15 +107,15 @@ pub fn app_menu(app_handle: &AppHandle) -> tauri::Result<Menu<Wry>> {
&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,

View File

@@ -431,7 +431,7 @@ const Menu = forwardRef<Omit<DropdownRef, 'open' | 'isOpen' | 'toggle'>, MenuPro
<span
aria-hidden
style={triangleStyles}
className="bg-background absolute rotate-45 border-background-highlight border-t border-l"
className="bg-background absolute rotate-45 border-background-highlight-secondary border-t border-l"
/>
)}
{containerStyles && (

View File

@@ -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

View File

@@ -1,4 +1,5 @@
import classNames from 'classnames';
import type { CSSProperties } from 'react';
interface Props<T extends string> {
name: string;
@@ -75,9 +76,11 @@ export function Select<T extends string>({
);
}
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',
};

View File

@@ -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,

View File

@@ -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;
}
}