From b0abecd2e6ce8fad2e6c8a671d38793681d220cd Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Thu, 28 May 2026 19:48:17 +0800 Subject: [PATCH] feat: zoom waveform with [/], fit view with F Match EDA convention (GTKWave, ModelSim, Virtuoso): F for "Zoom Full"; ]/[ for zoom in/out, mirroring the image-editor convention (Photoshop, Krita). Existing Left/Right arrow zoom is preserved. The F handler explicitly resets offset to 0 because View::auto_set_max_scale() only sets scale and leaves offset at wherever the user had scrolled to. Signed-off-by: Huang Rui --- DSView/pv/mainwindow.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/DSView/pv/mainwindow.cpp b/DSView/pv/mainwindow.cpp index 74dc348b..5a513b97 100644 --- a/DSView/pv/mainwindow.cpp +++ b/DSView/pv/mainwindow.cpp @@ -1305,6 +1305,19 @@ namespace pv _view->zoom(-1); break; + case Qt::Key_BracketRight: + _view->zoom(1); + break; + + case Qt::Key_BracketLeft: + _view->zoom(-1); + break; + + case Qt::Key_F: + _view->auto_set_max_scale(); + _view->set_scale_offset(_view->scale(), 0); + break; + case Qt::Key_0: for (auto s : sigs) {