feat(gui): expose single-click discrimination interval as user setting (#3009)#3015
Merged
Conversation
#3009) Several widgets (slice mute button, RX chain stages, waveform widgets) defer the single-click action by QApplication::doubleClickInterval() so a double click within the window can override it. The platform default is typically 400 ms on Linux, 500 ms on Windows — a real cost on the most common single-click path that power users may want shorter (or zero), and users with slower motor input may want longer. Centralize the value as a project-wide AppSettings key and expose it in Radio Setup. Changes: - New src/gui/InteractionSettings.h with inline accessor: clickDiscriminationIntervalMs() reads AppSettings key 'ClickDiscriminationIntervalMs' and falls back to the platform default if the key is missing or malformed. Negative values are also coerced to the platform default; 0 is honoured and means 'fire single-click instantly' (which disables double-click affordances on widgets that use this gate). - Migrate all seven existing call sites of QApplication::doubleClickInterval() to the new helper: RxApplet (slice mute), StripRxChainWidget, ClientRxChainWidget, ClientChainWidget, StripChainWidget, WaveformWidget, StripWaveform. Two of the seven (WaveformWidget, StripWaveform) previously cached the value at construction via QTimer::setInterval; they now read at click time via start(clickDiscriminationIntervalMs()) so a user-adjusted Radio Setup value propagates without an app restart. The other five already called the helper at click time. - Add a 'Single-click delay' group to Radio Setup → Themes tab (which is buildUiEnhancementsTab() internally). Group contains a 0-1000 ms QSpinBox (defaulted to platform value), a Reset button that restores the platform default, and a descriptive label explaining the 0 = instant single-click semantics. Closes #3009. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
G6PWY-Chris
pushed a commit
to G6PWY-Chris/AetherSDR
that referenced
this pull request
Jun 22, 2026
aethersdr#3009) (aethersdr#3015) Closes aethersdr#3009. Several widgets (slice mute button, RX chain stages, waveform widgets) defer the single-click action by `QApplication::doubleClickInterval()` (~400 ms on Linux) so a double-click can override it. Power users wanted instant single-click; users with slower input wanted longer windows. This PR makes the interval a project-wide AppSettings key with a UI surface. ## Changes ### `src/gui/InteractionSettings.h` (new) Inline accessor `clickDiscriminationIntervalMs()` reads AppSettings key `ClickDiscriminationIntervalMs`, falls back to platform default if missing/malformed/negative. `0` is honoured and means "fire single-click instantly" (also disables the double-click affordances on widgets that use this gate). ### Migrated 7 call sites - `RxApplet.cpp` (slice mute button — aethersdr#3006) - `StripRxChainWidget.cpp` - `ClientRxChainWidget.cpp` - `ClientChainWidget.cpp` - `StripChainWidget.cpp` - `WaveformWidget.cpp` — also dropped construction-time cache; reads at click time - `StripWaveform.cpp` — same The two waveform widgets previously called `QTimer::setInterval()` at construction. Switching to `start(clickDiscriminationIntervalMs())` at click time means a user-adjusted Radio Setup value propagates without an app restart. ### UI surface New "Single-click delay" group in **Radio Setup → Themes** tab (which is `buildUiEnhancementsTab()` internally). 0-1000 ms QSpinBox defaulted to platform value, Reset button restores platform default, descriptive label explains the 0 = instant-single-click semantics. ## Test plan - [x] Builds clean - [ ] Open Radio Setup → Themes, verify "Single-click delay" group renders with platform default - [ ] Set delay to 100, click slice mute button — verify ~100 ms perceived latency - [ ] Set delay to 0, click slice mute button — verify instant response - [ ] Set delay to 0, double-click slice mute button — verify the double-click action no longer fires (both clicks fire single-click toggles) - [ ] Click Reset, verify spinbox returns to platform default 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3009.
Several widgets (slice mute button, RX chain stages, waveform widgets) defer the single-click action by
QApplication::doubleClickInterval()(~400 ms on Linux) so a double-click can override it. Power users wanted instant single-click; users with slower input wanted longer windows. This PR makes the interval a project-wide AppSettings key with a UI surface.Changes
src/gui/InteractionSettings.h(new)Inline accessor
clickDiscriminationIntervalMs()reads AppSettings keyClickDiscriminationIntervalMs, falls back to platform default if missing/malformed/negative.0is honoured and means "fire single-click instantly" (also disables the double-click affordances on widgets that use this gate).Migrated 7 call sites
RxApplet.cpp(slice mute button — fix(rx): consolidate slice-mute UI — single-click this slice, double-click all #3006)StripRxChainWidget.cppClientRxChainWidget.cppClientChainWidget.cppStripChainWidget.cppWaveformWidget.cpp— also dropped construction-time cache; reads at click timeStripWaveform.cpp— sameThe two waveform widgets previously called
QTimer::setInterval()at construction. Switching tostart(clickDiscriminationIntervalMs())at click time means a user-adjusted Radio Setup value propagates without an app restart.UI surface
New "Single-click delay" group in Radio Setup → Themes tab (which is
buildUiEnhancementsTab()internally). 0-1000 ms QSpinBox defaulted to platform value, Reset button restores platform default, descriptive label explains the 0 = instant-single-click semantics.Test plan
🤖 Generated with Claude Code