Skip to content

Instantly share code, notes, and snippets.

@ctrueden
Created October 25, 2023 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ctrueden/198c8c2207b76e0d1d84ca27224a791b to your computer and use it in GitHub Desktop.
Save ctrueden/198c8c2207b76e0d1d84ca27224a791b to your computer and use it in GitHub Desktop.
Fiji Plugins menu too tall
/*
* Is your Fiji installation's Plugins menu too tall on Linux,
* where it runs past the bottom of your screen?
* Here is a hacky script to shrink the font, so that you can
* fit more items before running out of screen real estate!
*
* License: CC0
*/
#@ Float squashFactor (value=0.75f)
import ij.Menus
menubar = Menus.getMenuBar()
pluginsMenu = menubar.getMenu(5)
for (i=0; i<pluginsMenu.getItemCount(); i++) {
item = pluginsMenu.getItem(i)
font = item.getFont()
size = (float) (squashFactor * font.getSize())
item.setFont(font.deriveFont(size))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment