Skip to content

Edge-Drop is a clipboard shelf on the edge of your screen. Hover to open it. Drag files and images into any app, click to copy text and links. Free and open-source for Windows.

perf: optimize text sharpness with native ClearType, replace backdrop blurs with solid fills, and add search focus helper

Deepender254f8174b09631
diff --git a/src/lib/searchFocus.ts b/src/lib/searchFocus.ts
new file mode 100644
index 0000000..77169ed
--- /dev/null
+++ b/src/lib/searchFocus.ts
@@ -0,0 +1,21 @@
+/**
+ * Search-focus bookkeeping shared by the search input and the store.
+ *
+ * While the user types in search, the shelf is temporarily OS-focusable and
+ * the global toggle hotkey is paused. If the panel closes through a path
+ * that skips the input's blur handler (tray toggle, hotkey, cursor leave),
+ * `setOpen(false)` uses this flag to restore focusability + hotkey exactly
+ * once. No imports — safe to use from both component and store modules.
+ */
+
+let searchPausedHotkey = false
+
+export function noteSearchHotkeyPaused(paused: boolean): void {
+ searchPausedHotkey = paused
+}
+
+export function takeSearchHotkeyPaused(): boolean {
+ const was = searchPausedHotkey
+ searchPausedHotkey = false
+ return was
+}
diff --git a/src/styles/global.css b/src/styles/global.css
index 39164b8..5bcb69b 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -36,10 +36,10 @@ body {
color: var(--text-primary);
background: transparent;
overflow: hidden;
- /* Real face is loaded; grayscale AA on dark UI is the sharp path. */
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- text-rendering: geometricPrecision;
+ /* No font-smoothing/rendering overrides: the OS default (ClearType on
+ Windows) is the sharp path, matching every native element next to us.
+ Forced grayscale AA + geometricPrecision visibly softens glyphs,
+ worst on high-DPI displays. */
font-feature-settings: 'ss01' 1;
user-select: none;
-webkit-user-select: none;
diff --git a/src/styles/item.css b/src/styles/item.css
index f69266c..d2701bc 100644
--- a/src/styles/item.css
+++ b/src/styles/item.css
@@ -246,9 +246,7 @@
top: auto;
width: 38px;
height: 38px;
- background: rgba(18, 18, 20, 0.88);
- backdrop-filter: blur(12px);
- -webkit-backdrop-filter: blur(12px);
+ background: #121214;
border: 1px solid rgba(255, 255, 255, 0.14);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
@@ -771,9 +769,7 @@
gap: 4px;
opacity: 0;
pointer-events: none;
- background: rgba(20, 20, 24, 0.95);
- backdrop-filter: blur(16px);
- -webkit-backdrop-filter: blur(16px);
+ background: #141418;
padding: 3px 4px;
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.12);
@@ -1073,9 +1069,7 @@
right: 6px;
padding: 2px 4px;
gap: 2px;
- background: rgba(18, 18, 22, 0.88);
- backdrop-filter: blur(12px);
- -webkit-backdrop-filter: blur(12px);
+ background: #121216;
border: 1px solid rgba(255, 255, 255, 0.12);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 0, 0, 0.4);
border-radius: 999px;
@@ -1404,9 +1398,7 @@
align-items: center;
gap: 2px;
padding: 2px 4px;
- background: rgba(20, 20, 24, 0.95);
- backdrop-filter: blur(16px);
- -webkit-backdrop-filter: blur(16px);
+ background: #141418;
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 999px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
diff --git a/src/styles/settings.css b/src/styles/settings.css
index 2008ffa..2ddd16f 100644
--- a/src/styles/settings.css
+++ b/src/styles/settings.css
@@ -1317,9 +1317,7 @@
align-items: center;
justify-content: center;
gap: 8px;
- background: rgba(18, 18, 18, 0.94);
- backdrop-filter: blur(16px);
- -webkit-backdrop-filter: blur(16px);
+ background: #121212;
border: 1px solid rgba(255, 255, 255, 0.16);
border-radius: 999px;
font-size: 11.5px;
diff --git a/tests/horizontalSettings.test.ts b/tests/horizontalSettings.test.ts
index 16d5d03..fdb4859 100644
--- a/tests/horizontalSettings.test.ts
+++ b/tests/horizontalSettings.test.ts
@@ -314,7 +314,9 @@ it('Appearance shelf renders Card 1 Copy Indicator toggle first, then Card 2 Ind
expect(itemCss).toContain('.scroll-top-btn.horizontal')
expect(itemCss).toContain('right: 44px')
expect(itemCss).toContain('bottom: 16px')
- expect(itemCss).toContain('backdrop-filter: blur(12px)')
+ // Crisp solid fill instead of backdrop blur (4K sharpness, zero raster cost).
+ expect(itemCss).toContain('background: #121214')
+ expect(itemCss).not.toContain('backdrop-filter')
})
it('ItemList applies dynamic vertical font scaling and panel.css bounds for horizontal pinned pill', () => {