Skip to content

Pan Adapter Zoom with + - icons in lower left corner and with Wheel mouse #1050

Description

@rpomatto12-ops

Request preparation

  • I used an AI assistant to help structure this request
  • I checked for existing issues covering the same feature

What would you like?

Add panadapter zoom controls: +/− buttons and Ctrl+scroll wheel

Labels: enhancement, GUI, spectrum


What

Add two explicit zoom controls to the panadapter:

  1. +/− buttons in the lower-left corner of SpectrumWidget to step the panadapter bandwidth in and out
  2. Ctrl+scroll wheel over the panadapter to zoom in/out without accidentally tuning the VFO

Why

Currently the only documented way to change panadapter zoom in AetherSDR is unclear to new users — the scroll wheel tunes the VFO by default, and there are no visible zoom controls on screen. Users coming from SmartSDR expect visible +/− buttons in the panadapter corner. Without a modifier key to separate zoom from tuning, the scroll wheel is ambiguous depending on where the cursor lands, which makes precise zoom impossible without hunting for the right mouse position.


How Other Clients Do It

  • SmartSDR (Windows): Displays + and magnifying-glass buttons in the lower-left corner of the panadapter. Also has B (zoom to full band) and S (zoom to segment) quick buttons above them.
  • GQRX: Scroll wheel on the frequency axis bar zooms; scroll elsewhere tunes. Clean separation via hover zone.
  • SDR++: Ctrl+scroll wheel zooms the panadapter bandwidth; plain scroll wheel tunes.
  • SDR Console: Dedicated zoom slider on the panadapter toolbar.

Suggested Behavior

+/− Buttons

  • Add two small + and buttons to the lower-left corner of SpectrumWidget, styled to match the existing dark theme (#203040 border, #00b4d8 icon)
  • Each click steps the panadapter bandwidth by a fixed factor (e.g. ×2 or ×0.5), sending the appropriate display pan set command
  • Buttons should be always visible (not hover-only) so users can discover them easily

Ctrl+Scroll Wheel

  • In SpectrumWidget::wheelEvent(), check for Qt::ControlModifier
  • If Ctrl is held: zoom in/out by adjusting panadapter bandwidth — do not tune the VFO
  • If Ctrl is not held: existing behavior (VFO tuning) unchanged
  • Zoom should be centered on the cursor frequency position, not the pan center

Zoom Factor

  • Suggested steps: 50 kHz → 100 kHz → 200 kHz → 500 kHz → 1 MHz → 2 MHz → 5 MHz → max available bandwidth
  • Or a continuous factor of ×1.5 per scroll tick

Protocol Hints

Panadapter bandwidth is controlled via:

display pan set <pan_id> bandwidth=<MHz_as_float>

For example, to set 500 kHz wide:

display pan set 0x40000000 bandwidth=0.5

Current bandwidth is available in PanadapterModel (from display pan status messages). Min/max bandwidth limits should be clamped to what the radio reports.


Acceptance Criteria

  • + and buttons appear in the lower-left corner of the panadapter and are visible without hovering
  • Clicking + narrows the panadapter bandwidth; clicking widens it, each sending the correct display pan set bandwidth= command
  • Holding Ctrl while scrolling the mouse wheel over the panadapter zooms in/out without moving the VFO frequency
  • Plain scroll wheel (no Ctrl) continues to tune the VFO exactly as before — no regression
  • Zoom level is clamped to the radio's reported min/max bandwidth limits

Thanks,
Ron, K9YY

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement to existing feature

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions