Skip to content

Add command finder to header bar - #2191

Open
petebankhead wants to merge 7 commits into
qupath:mainfrom
petebankhead:header
Open

Add command finder to header bar#2191
petebankhead wants to merge 7 commits into
qupath:mainfrom
petebankhead:header

Conversation

@petebankhead

@petebankhead petebankhead commented Sep 6, 2026

Copy link
Copy Markdown
Member

This makes use of the HeaderBar preview feature of JavaFX, in anticipation of it being a full feature in JavaFX 27.

It adds a version of View → Show command list to the header bar, making it more discoverable.

The search box can be focused by pressing Ctrl/Cmd+F and, in combination with Up/Down/Enter makes many QuPath commands easily runnable from the keyboard.

Also, while it provides a searchable way to access all menu commands, the search box also can be used to access previously-run commands. To do this, type Up or Down without any search text entered. It maintains a Set of past commands, to keep the list short (i.e. duplicates are removed, while ensuring that the commands run most recently are at the top of the list).

header-search

While HeaderBar is in preview, using this requires

./gradlew run --args="-Djavafx.enablePreview=true"

but I'm hoping JavaFX 27 will make that simpler.

Notes

  • I could only test this on macOS so far. Feedback on behavior on other platforms would be very welcome.
  • This PR removes the old feature of having a command finder attached to a viewer. I'm not aware of anyone using (or liking) that feature, and it adds complexity.
old-finder

@petebankhead petebankhead added this to the v0.8.0 milestone Sep 6, 2026
@zindy

zindy commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Hello,

just wanted to say, your instructions worked on Windows 11 and I do get the search text box.

There seems to be a bug I can mostly repeat by doing the following. Also I have other extensions (some badly written by me) installed, not sure whether that would cause the problem or not:

  • open qupath with your gradlew run instruction,
  • type instan and all you see ... instead of the menu entry string. But the line points to the right entry.
  • type space -> No content in table
  • type backspace and the search results appear correctly.
  • repeat the last two steps and you may get a different outcome (the ... again, or not).

Cheers,
Egor

Screenshot 2026-09-08 204536 Screenshot 2026-09-08 205828 image

@alanocallaghan

Copy link
Copy Markdown
Contributor

Works great on Linux; interestingly 0on GNOME desktop it seems to remove the slightly unsightly default top bar:

without:

image

with:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants