this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

increase global scroll speed

It was very slow on Linux, at least, by default

+17
+17
src/main/java/app/Environment.java
··· 71 71 public static ImageIcon ICON_ERROR = null; 72 72 73 73 private static final int NUM_THREADS = Runtime.getRuntime().availableProcessors(); 74 + 75 + public static final int SCROLL_INCREMENT = 16; 74 76 public static final ExecutorService GLOBAL_EXECUTOR = Executors.newFixedThreadPool(NUM_THREADS); 75 77 76 78 public static ExecutorService getExecutor() ··· 254 256 UIManager.put("SplitPaneDivider.style", "plain"); 255 257 UIManager.put("Component.arrowType", "chevron"); 256 258 UIManager.put("Component.focusWidth", 1); 259 + 260 + fixScrollSpeed(); 257 261 258 262 if (fromJar && gitBuildTag != null && mainConfig.getBoolean(Options.CheckForUpdates)) 259 263 checkForUpdate(); ··· 722 726 Logger.logError("Exception while loading image " + resourceName); 723 727 return null; 724 728 } 729 + } 730 + 731 + /** Sets a reasonable scroll bar unit increment globally via an AWTEventListener. */ 732 + private static void fixScrollSpeed() 733 + { 734 + Toolkit.getDefaultToolkit().addAWTEventListener(e -> { 735 + if (e.getID() == java.awt.event.ContainerEvent.COMPONENT_ADDED) { 736 + var ce = (java.awt.event.ContainerEvent) e; 737 + if (ce.getChild() instanceof javax.swing.JScrollBar scrollBar) { 738 + scrollBar.setUnitIncrement(SCROLL_INCREMENT); 739 + } 740 + } 741 + }, java.awt.AWTEvent.CONTAINER_EVENT_MASK); 725 742 } 726 743 }