diff --git a/frontend/src/App.vue b/frontend/src/App.vue index d550bd53..6e0bc977 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -78,8 +78,9 @@ body, margin: 0; height: 100%; background: var(--color-2-mildblack); - user-select: none; overscroll-behavior: none; + -webkit-user-select: none; // Required as of Safari 15.0 (Graphite's minimum version) through the latest release + user-select: none; } html, @@ -223,27 +224,6 @@ img { outline: 1px dashed var(--color-2-mildblack); } } - -// For placeholder messages (remove eventually) -.floating-menu { - h1, - h2, - h3, - h4, - h5, - h6, - p { - margin: 0; - } - - p { - margin-top: 8px; - } - - .floating-menu-content h3 ~ p { - white-space: pre-wrap; - } -} diff --git a/frontend/src/components/widgets/inputs/FieldInput.vue b/frontend/src/components/widgets/inputs/FieldInput.vue index e8a17843..c9208385 100644 --- a/frontend/src/components/widgets/inputs/FieldInput.vue +++ b/frontend/src/components/widgets/inputs/FieldInput.vue @@ -80,7 +80,16 @@ caret-color: var(--color-e-nearwhite); &::selection { - background: var(--color-5-dullgray); + background-color: var(--color-5-dullgray); + + // Target only Safari + @supports (background: -webkit-named-image(i)) { + & { + // Setting an alpha value opts out of Safari's "fancy" (but not visible on dark backgrounds) selection highlight rendering + // https://stackoverflow.com/a/71753552/775283 + background-color: rgba(var(--color-5-dullgray-rgb), calc(254 / 255)); + } + } } } diff --git a/frontend/src/components/widgets/inputs/FontInput.vue b/frontend/src/components/widgets/inputs/FontInput.vue index 6c2bc6d9..9374b558 100644 --- a/frontend/src/components/widgets/inputs/FontInput.vue +++ b/frontend/src/components/widgets/inputs/FontInput.vue @@ -12,7 +12,7 @@ @keydown="keydown" data-floating-menu-spawner > - {{ activeEntry?.value || "" }} + {{ activeEntry?.value || "" }} diff --git a/frontend/src/components/widgets/inputs/MenuBarInput.vue b/frontend/src/components/widgets/inputs/MenuBarInput.vue index 0c55e1f1..bec7cef0 100644 --- a/frontend/src/components/widgets/inputs/MenuBarInput.vue +++ b/frontend/src/components/widgets/inputs/MenuBarInput.vue @@ -11,7 +11,7 @@ :data-floating-menu-spawner="entry.children && entry.children.length > 0 ? '' : 'no-hover-transfer'" > - {{ entry.label }} + {{ entry.label }} ; @@ -147,6 +148,7 @@ export default defineComponent({ components: { IconLabel, MenuList, + TextLabel, }, }); diff --git a/frontend/src/components/widgets/inputs/NumberInput.vue b/frontend/src/components/widgets/inputs/NumberInput.vue index ad5a901d..7d108843 100644 --- a/frontend/src/components/widgets/inputs/NumberInput.vue +++ b/frontend/src/components/widgets/inputs/NumberInput.vue @@ -59,6 +59,7 @@ .arrow { position: absolute; top: 0; + margin: 0; padding: 9px 0; border: none; background: rgba(var(--color-1-nearblack-rgb), 0.75); @@ -131,7 +132,7 @@ height: 100%; padding: 0; margin: 0; - -webkit-appearance: none; // TODO: Prefix necessary? Test on Safari + -webkit-appearance: none; // Required until Safari 15.4 (Graphite supports 15.0+) appearance: none; background: none; cursor: default; @@ -147,7 +148,7 @@ // Chromium and Safari &::-webkit-slider-thumb { - -webkit-appearance: none; // TODO: Prefix necessary? Test on Safari + -webkit-appearance: none; // Required until Safari 15.4 (Graphite supports 15.0+) appearance: none; border-radius: 2px; width: 4px; diff --git a/frontend/src/components/widgets/inputs/RadioInput.vue b/frontend/src/components/widgets/inputs/RadioInput.vue index dc739a07..fbef22e6 100644 --- a/frontend/src/components/widgets/inputs/RadioInput.vue +++ b/frontend/src/components/widgets/inputs/RadioInput.vue @@ -21,6 +21,7 @@ background: var(--color-5-dullgray); fill: var(--color-e-nearwhite); height: 24px; + margin: 0; padding: 0 4px; border: none; display: flex; diff --git a/frontend/src/components/widgets/inputs/SwatchPairInput.vue b/frontend/src/components/widgets/inputs/SwatchPairInput.vue index f8282236..019852a9 100644 --- a/frontend/src/components/widgets/inputs/SwatchPairInput.vue +++ b/frontend/src/components/widgets/inputs/SwatchPairInput.vue @@ -1,11 +1,11 @@ - clickPrimarySwatch()" :style="`--swatch-color: ${primary.toRgbaCSS()}`" data-floating-menu-spawner="no-hover-transfer" tabindex="0"> + clickPrimarySwatch()" :style="{ '--swatch-color': primary.toRgbaCSS() }" data-floating-menu-spawner="no-hover-transfer" tabindex="0"> primaryColorChanged(color)" :direction="'Right'" /> - clickSecondarySwatch()" :style="`--swatch-color: ${secondary.toRgbaCSS()}`" data-floating-menu-spawner="no-hover-transfer" tabindex="0"> + clickSecondarySwatch()" :style="{ '--swatch-color': secondary.toRgbaCSS() }" data-floating-menu-spawner="no-hover-transfer" tabindex="0"> secondaryColorChanged(color)" :direction="'Right'" /> diff --git a/frontend/src/components/widgets/inputs/TextInput.vue b/frontend/src/components/widgets/inputs/TextInput.vue index 8b6a7486..0dff8295 100644 --- a/frontend/src/components/widgets/inputs/TextInput.vue +++ b/frontend/src/components/widgets/inputs/TextInput.vue @@ -7,7 +7,7 @@ :spellcheck="true" :disabled="disabled" :tooltip="tooltip" - :style="minWidth > 0 ? `min-width: ${minWidth}px` : ''" + :style="{ 'min-width': minWidth > 0 ? `${minWidth}px` : undefined }" :sharpRightCorners="sharpRightCorners" @textFocused="() => onTextFocused()" @textChanged="() => onTextChanged()" diff --git a/frontend/src/components/widgets/labels/TextLabel.vue b/frontend/src/components/widgets/labels/TextLabel.vue index f2cc2da0..fecf0a4e 100644 --- a/frontend/src/components/widgets/labels/TextLabel.vue +++ b/frontend/src/components/widgets/labels/TextLabel.vue @@ -1,5 +1,5 @@ - + @@ -8,6 +8,8 @@ .text-label { line-height: 18px; white-space: nowrap; + // Force Safari to not draw a text cursor, even though this element has `user-select: none` + cursor: default; &.disabled { color: var(--color-8-uppergray); diff --git a/frontend/src/components/widgets/labels/UserInputLabel.vue b/frontend/src/components/widgets/labels/UserInputLabel.vue index d29fce3e..db4546f0 100644 --- a/frontend/src/components/widgets/labels/UserInputLabel.vue +++ b/frontend/src/components/widgets/labels/UserInputLabel.vue @@ -2,20 +2,20 @@ - + - + - {{ keyInfo.label }} - + {{ keyInfo.label }} + - + - - + + - + @@ -26,10 +26,6 @@ align-items: center; white-space: nowrap; - .group-gap { - width: 4px; - } - .input-key, .input-mouse { & + .input-key, @@ -46,14 +42,18 @@ font-weight: 400; text-align: center; height: 16px; - // Firefox renders the text 1px lower than Chrome (tested on Windows) with 16px line-height, so moving it up 1 pixel by using 15px makes them agree - line-height: 15px; box-sizing: border-box; border: 1px solid; border-radius: 4px; border-color: var(--color-5-dullgray); color: var(--color-e-nearwhite); + .text-label { + // Firefox renders the text 1px lower than Chrome (tested on Windows) with 16px line-height, + // so moving it up 1 pixel by using 15px makes them agree. + line-height: 15px; + } + &.width-1 { width: 16px; } @@ -131,6 +131,8 @@ import { type KeyRaw, type KeysGroup, type Key, type MouseMotion } from "@/wasm- import LayoutRow from "@/components/layout/LayoutRow.vue"; import IconLabel from "@/components/widgets/labels/IconLabel.vue"; +import Separator from "@/components/widgets/labels/Separator.vue"; +import TextLabel from "@/components/widgets/labels/TextLabel.vue"; type LabelData = { label?: string; icon?: IconName; width: string }; @@ -240,6 +242,8 @@ export default defineComponent({ components: { IconLabel, LayoutRow, + Separator, + TextLabel, }, }); diff --git a/frontend/src/components/widgets/metrics/PersistentScrollbar.vue b/frontend/src/components/widgets/metrics/PersistentScrollbar.vue index 435abd78..6831c8d5 100644 --- a/frontend/src/components/widgets/metrics/PersistentScrollbar.vue +++ b/frontend/src/components/widgets/metrics/PersistentScrollbar.vue @@ -20,6 +20,7 @@ border-style: solid; width: 0; height: 0; + margin: 0; padding: 0; } diff --git a/frontend/src/components/window/title-bar/WindowTitle.vue b/frontend/src/components/window/title-bar/WindowTitle.vue index 13467876..0674cd5f 100644 --- a/frontend/src/components/window/title-bar/WindowTitle.vue +++ b/frontend/src/components/window/title-bar/WindowTitle.vue @@ -1,6 +1,6 @@ - {{ text }} + {{ text }} @@ -17,11 +17,15 @@ import { defineComponent, type PropType } from "vue"; import LayoutRow from "@/components/layout/LayoutRow.vue"; +import TextLabel from "@/components/widgets/labels/TextLabel.vue"; export default defineComponent({ props: { text: { type: String as PropType, required: true }, }, - components: { LayoutRow }, + components: { + LayoutRow, + TextLabel, + }, }); diff --git a/frontend/src/components/window/workspace/Panel.vue b/frontend/src/components/window/workspace/Panel.vue index e366d60b..836cd640 100644 --- a/frontend/src/components/window/workspace/Panel.vue +++ b/frontend/src/components/window/workspace/Panel.vue @@ -12,13 +12,13 @@ @click.middle="(e: MouseEvent) => (e?.stopPropagation(), closeAction?.(tabIndex))" data-tab > - {{ tabLabel.name }} + {{ tabLabel.name }} - Panel Options - The contents of this popover menu are coming soon + Panel Options + The contents of this popover menu are coming soon
The contents of this popover menu are coming soon