Viewer: Shift + wheel on macOS, Mac keys in the mouse-shortcut help
Build Packages / Create release (push) Successful in 28s
Build Packages / build:viewer:macos-arm64:nocuda (push) Successful in 2m54s
Build Packages / build:rugnux:macos-arm64:nocuda (push) Successful in 2m25s
Build Packages / build:viewer:linux-x86_64:nocuda (push) Successful in 11m31s
Build Packages / build:viewer:linux-x86_64:cuda (push) Successful in 12m3s
Build Packages / build:rugnux:linux-x86_64:cuda (push) Successful in 8m18s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 6m19s
Build Packages / build:viewer:windows-x86_64:nocuda (push) Successful in 17m31s
Build Packages / build:viewer:windows-x86_64:cuda (push) Successful in 20m8s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 23m21s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 14m5s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 15m27s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 14m45s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 13m42s
Build Packages / build:rugnux:windows-x86_64:cuda (push) Successful in 11m13s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 15m11s
Build Packages / Generate python client (push) Successful in 27s
Build Packages / Build documentation (push) Successful in 1m17s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 16m20s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 17m55s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 16m34s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 17m34s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 18m4s
Build Packages / Unit tests (push) Successful in 1h20m54s

macOS turns Shift + a vertical mouse wheel into horizontal scrolling, so
the notch arrives in angleDelta().x() and y() is 0; the contrast step
read only y and did nothing. The wheel handler now takes whichever axis
carries the notch, for zoom, foreground and background alike.

Help > Mouse Shortcuts names Cmd for Ctrl on macOS (Qt maps Command to
Ctrl), Ctrl-click for right click and Fn + arrows for Home/End/Page
Up/Down, and lists B held + wheel, which was missing. The magnifier's
tooltip says how to drive it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Filip LeonarskiandClaude Opus 5.5 committed 2026-09-26 22:20:18 +02:00
1 parent b90b377b85
commit e07667726e
5 files changed
+35 -10

No files matched your search

+1
View File
@@ -26,6 +26,7 @@
* Rugnux also reports `R_MEAS_WEIGHTED`, the R_meas with each observation weighted as the merge weights it, so weak frames kept in the merge at low weight can be told from real disagreement; `R_MEAS` is unchanged.
* Rugnux no longer stops per-frame scaling as unsettled because of a single frame that is about to be dropped as blank.
* The viewer's magnifier is a panel below the inspector (or, popped out, a window of its own) with three fixed zoom levels (×64, ×32, ×10), follows the cursor only while Shift is held, and a frame on the image shows the area it covers; the inspector's image statistics can now be folded.
* The viewer's Shift + wheel changes the contrast on macOS again, and Help ▸ Mouse Shortcuts names the Mac keys (⌘ for Ctrl).
* Rugnux writes its files in the standard setting, as XDS and POINTLESS do (e.g. P 21 21 2 with the pure two-fold on c rather than P 2 21 21), or in the setting of a reference MTZ, of a model that fits, of the cell given with `-C` or of a non-standard `-S` symbol; `SETTING_OPERATOR=` and `SETTING_SOURCE=` report it.
* Rugnux puts the merge onto a reference MTZ's axes before inheriting its free-R flags, and does not inherit them where the merge does not match the reference (`REFERENCE_MISMATCH`); `REFERENCE_OPERATOR=`, `REFERENCE_CC=` and `REFERENCE_MATCHED_FRACTION=` report the match.
* Rugnux places a space group given with `-S` on the axes its systematic absences name, so `-S 18` on a cell whose pure two-fold is not its longest axis no longer merges with the screw absences on the wrong rows.
+5
View File
@@ -110,6 +110,10 @@ X11 forwarding.
The same list is available in the application under **Help ▸ Mouse Shortcuts**.
On macOS, `Ctrl` below means the Command key (`⌘`); right click is also `Ctrl`-click, and on a
keyboard without them `Home` / `End` are `Fn`+`←` / `Fn`+`→` and `Page Up` / `Page Down` are
`Fn`+`↑` / `Fn`+`↓`. The Mouse Shortcuts window shows the Mac keys directly.
### Diffraction image
| Action | Effect |
@@ -118,6 +122,7 @@ The same list is available in the application under **Help ▸ Mouse Shortcuts**
| `Shift` + wheel | Move the foreground (upper contrast limit) in linear steps |
| `Ctrl` + wheel | Move the foreground in multiplicative steps (×1.15 per notch) |
| `F` held + wheel | Same as `Shift` + wheel, for as long as `F` is held |
| `B` held + wheel | Move the background (lower contrast limit) in linear steps, for as long as `B` is held |
| `A` | Apply auto-contrast once; press it again to switch on continuous Auto |
| `Home` / `End` | Jump to the first / last image in the dataset |
| `Page Up` / `Page Down` | Step one image forward / back |
+10 -4
View File
@@ -168,12 +168,18 @@ void JFJochImage::wheelEvent(QWheelEvent *event) {
// Get the position of the mouse in scene coordinates
QPointF targetScenePos = mapToScene(event->position().toPoint());
// macOS turns Shift + a vertical mouse wheel into horizontal scrolling, so with Shift held the
// notch arrives in x, not y. Take whichever axis carries it.
const int delta = (event->angleDelta().y() != 0) ? event->angleDelta().y() : event->angleDelta().x();
if (delta == 0)
return;
const bool exp_fg_adjust = (event->modifiers() & Qt::ControlModifier);
const bool lin_fg_adjust = (event->modifiers() & Qt::ShiftModifier) || m_adjustForegroundWithWheel;
if (m_adjustBackgroundWithWheel) {
// Held B: the wheel moves the black point, clamped so a positive display range remains.
float new_background = background + event->angleDelta().y() / 120.0f;
float new_background = background + delta / 120.0f;
new_background = std::clamp(new_background, 0.0f, std::max(0.0f, foreground - 1.0f));
changeBackground(new_background);
emit backgroundChanged(background);
@@ -181,10 +187,10 @@ void JFJochImage::wheelEvent(QWheelEvent *event) {
float new_foreground = foreground;
if (exp_fg_adjust) {
const float step = (event->angleDelta().y() > 0) ? zoomFactor : (1.0 / zoomFactor);
const float step = (delta > 0) ? zoomFactor : (1.0 / zoomFactor);
new_foreground = foreground * step;
} else {
new_foreground = foreground + event->angleDelta().y() / 120.0f;
new_foreground = foreground + delta / 120.0f;
}
// Keep the white point above the black point (1.0 when the background sits at zero).
@@ -194,7 +200,7 @@ void JFJochImage::wheelEvent(QWheelEvent *event) {
changeForeground(new_foreground);
emit foregroundChanged(foreground);
} else {
pending_zoom_steps_ += (event->angleDelta().y() > 0) ? 1 : -1;
pending_zoom_steps_ += (delta > 0) ? 1 : -1;
zoom_anchor_vp_ = event->position().toPoint();
if (RemoteDisplayMode() && zoom_rate_.isValid() && zoom_rate_.elapsed() < kHoverIntervalMs) {
zoom_tail_timer_->start(kHoverIntervalMs);
+1 -1
View File
@@ -44,7 +44,7 @@ JFJochViewerMagnifier::JFJochViewerMagnifier(QWidget *parent) : QWidget(parent)
image_ = new JFJochFollowerImage(this);
image_->setMinimumHeight(200);
image_->setToolTip("Move the cursor over the diffraction image with Shift held to move the magnifier");
image_->setToolTip("Hold Shift and move the cursor over the diffraction image to update");
image_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
layout->addWidget(image_, 1);
connect(image_, &JFJochFollowerImage::fieldChanged, this, &JFJochViewerMagnifier::fieldChanged);
+18 -5
View File
@@ -11,23 +11,36 @@ namespace {
struct Section { QString title; QVector<Shortcut> rows; };
QString BuildHtml() {
// Qt reads the Command key as Ctrl on macOS, and a Mac keyboard often has no Home/End/Page keys
#ifdef Q_OS_MACOS
const QString ctrl = "Cmd (\u2318)";
const QString home_end = "Home / End (Fn + \u2190 / \u2192)";
const QString page_up_down = "Page Up / Page Down (Fn + \u2191 / \u2193)";
const QString right_click = "Right click (Ctrl + click)";
#else
const QString ctrl = "Ctrl";
const QString home_end = "Home / End";
const QString page_up_down = "Page Up / Page Down";
const QString right_click = "Right click";
#endif
const QVector<Section> sections = {
// JFJochImage / JFJochDiffractionImage mouse handling
{"Diffraction image", {
{"Wheel", "Zoom in / out, centred on the cursor"},
{"Shift + wheel", "Move the foreground (upper contrast limit) in linear steps"},
{"Ctrl + wheel", "Move the foreground in multiplicative steps (&times;1.15 per notch)"},
{ctrl + " + wheel", "Move the foreground in multiplicative steps (&times;1.15 per notch)"},
{"F held + wheel", "Same as Shift + wheel, for as long as F is held"},
{"B held + wheel", "Move the background (lower contrast limit) in linear steps, for as long as B is held"},
{"A", "Apply auto-contrast once; press again to switch on continuous Auto"},
{"Home / End", "Jump to the first / last image in the dataset"},
{"Page Up / Page Down", "Step one image forward / back"},
{home_end, "Jump to the first / last image in the dataset"},
{page_up_down, "Step one image forward / back"},
{"Hover", "Status bar shows the pixel position, its value and the resolution"},
{"Drag", "Pan the image"},
{"Shift + move", "Move the magnifier panel to the cursor; a frame shows the area it covers"},
{"Shift + drag", "Draw a rectangular ROI"},
{"Shift + Ctrl + drag", "Draw a circular ROI"},
{"Shift + " + ctrl + " + drag", "Draw a circular ROI"},
{"Drag an ROI or its handle", "Move or resize the selected ROI"},
{"Right click", "Copy / save the image, fit to view, clear the ROI"},
{right_click, "Copy / save the image, fit to view, clear the ROI"},
}},
// JFJochGridScanImage
{"Grid scan", {