From f96bbe8db13f603c767f0a21fce80da85c6a09f4 Mon Sep 17 00:00:00 2001 From: Lam Wei Lun Date: Thu, 5 Nov 2026 18:09:59 +0800 Subject: [PATCH] Speed Dial Minor QOLs (#17291) Single click to launch actions. Close button removed to prevent cluttering --- resources/web/dialog/SpeedDial/speeddial.js | 18 ++--------- resources/web/dialog/SpeedDial/style.css | 34 ++------------------- src/slic3r/GUI/SpeedDialDialog.cpp | 1 - 3 files changed, 5 insertions(+), 48 deletions(-) diff --git a/resources/web/dialog/SpeedDial/speeddial.js b/resources/web/dialog/SpeedDial/speeddial.js index 5ec47e9164..fbb664f626 100644 --- a/resources/web/dialog/SpeedDial/speeddial.js +++ b/resources/web/dialog/SpeedDial/speeddial.js @@ -889,15 +889,6 @@ function renderFav() { badge.title = T("sd_fav_slot", "Favorite %s (%s)", slot_num, shortcutAlt() + slot); tile.appendChild(badge); } - // Direct removal: a hover-revealed ✕ in the tile's corner. click() stops propagation so it - // unpins without activating the action. - var unpin = document.createElement("button"); - unpin.className = "fav-unpin"; - unpin.title = T("sd_remove_fav", "Remove from favorites"); - unpin.setAttribute("aria-label", T("sd_remove_fav", "Remove from favorites")); - unpin.innerHTML = ''; - unpin.onclick = function (ev) { ev.stopPropagation(); toggleFav(id); }; - tile.appendChild(unpin); tile.oncontextmenu = function (ev) { ev.preventDefault(); // why: selecting shows the eyebrow, which grows the launcher - resize so the popup @@ -1025,13 +1016,11 @@ function renderActionRow(a, i) { var pin = document.createElement("button"); pin.className = "pin"; setPinState(pin, on); + // stopPropagation keeps the bookmark's click from launching the row. pin.onclick = function (ev) { ev.stopPropagation(); toggleFav(a.id); }; - // why: two quick fav/unfav clicks must not dblclick-run the row - pin.ondblclick = function (ev) { ev.stopPropagation(); }; shell.row.appendChild(pin); - shell.row.onclick = function () { sel = { zone: "list", i: i }; render({ resize: true }); }; - shell.row.ondblclick = function () { sel = { zone: "list", i: i }; activateEntry(a); }; + shell.row.onclick = function () { sel = { zone: "list", i: i }; activateEntry(a); }; return shell.row; } @@ -1196,8 +1185,7 @@ function renderTabRow(t, i) { var hint = tabAliasHint(t, query); if (hint) shell.line.appendChild(markedText("row-alias", hint.text, hint.ranges)); - shell.row.onclick = function () { sel = { zone: "list", i: i }; render({ resize: true }); }; - shell.row.ondblclick = function () { sel = { zone: "list", i: i }; jumpToTab(t); }; + shell.row.onclick = function () { sel = { zone: "list", i: i }; jumpToTab(t); }; return shell.row; } diff --git a/resources/web/dialog/SpeedDial/style.css b/resources/web/dialog/SpeedDial/style.css index a0e2015373..fa6686658f 100644 --- a/resources/web/dialog/SpeedDial/style.css +++ b/resources/web/dialog/SpeedDial/style.css @@ -55,6 +55,8 @@ body { .fav-tile { flex: 0 0 auto; + /* why: anchors the absolutely positioned Alt/Option slot badge in the tile's corner. */ + position: relative; /* keep tiles full-size; don't shrink to fit - scroll instead */ width: 30px; height: 30px; @@ -78,38 +80,6 @@ body { outline-offset: 2px; } -/* Hover-revealed remove button in the tile's corner; sits inside the tile bounds so overflow:hidden clips it. */ -.fav-tile { - position: relative; -} - -.fav-unpin { - position: absolute; - top: 1px; - right: 1px; - width: 13px; - height: 13px; - padding: 0; - border: 0; - border-radius: 50%; - display: inline-flex; - align-items: center; - justify-content: center; - color: var(--muted, var(--orca-muted, #6b7280)); - background: rgba(127, 127, 127, .35); - cursor: pointer; - opacity: 0; -} - -.fav-tile:hover .fav-unpin, -.fav-tile.sel .fav-unpin { - opacity: 1; -} - -.fav-unpin:hover { - background: rgba(127, 127, 127, .6); -} - /* Numbered quick-launch slot (Alt/Option+digit), top-left corner of the fav tile. */ .fav-slot { position: absolute; diff --git a/src/slic3r/GUI/SpeedDialDialog.cpp b/src/slic3r/GUI/SpeedDialDialog.cpp index e8086f71e5..aac032eacb 100644 --- a/src/slic3r/GUI/SpeedDialDialog.cpp +++ b/src/slic3r/GUI/SpeedDialDialog.cpp @@ -126,7 +126,6 @@ nlohmann::json speed_dial_ui_strings() {"sd_fav_slot", _u8L("Favorite %s (%s)")}, {"sd_pin_fav", _u8L("Pin to favorites (%s)")}, {"sd_unpin_fav", _u8L("Unpin from favorites (%s)")}, - {"sd_remove_fav", _u8L("Remove from favorites")}, {"sd_move_left", _u8L("Move left")}, {"sd_move_right", _u8L("Move right")}, {"sd_unpin", _u8L("Unpin")},