mirror of
https://github.com/deathmarine/Luyten.git
synced 2024-11-23 04:40:07 +00:00
Fix text zoom when high-precision scrolling input is used
Touchpad / MagicMouse provide high-precision scrolling events,
and getWheelRotation() often turns out to be 0
Just ignore the events for now since proper handling of high precision is complicated
see 21c99af7c7/bin/idea.properties (L133-L156)
This commit is contained in:
parent
6042502552
commit
eade1865d9
@ -227,6 +227,13 @@ public class OpenFile implements SyntaxConstants {
|
||||
scrollPane.addMouseWheelListener(new MouseWheelListener() {
|
||||
@Override
|
||||
public void mouseWheelMoved(MouseWheelEvent e) {
|
||||
if (e.getWheelRotation() == 0) {
|
||||
// Nothing to do here. This happens when scroll event is delivered from a touchbar
|
||||
// or MagicMouse. There's getPreciseWheelRotation, however it looks like there's no
|
||||
// trivial and consistent way to use that
|
||||
// See https://github.com/JetBrains/intellij-community/blob/21c99af7c78fc82aefc4d05646389f4991b08b38/bin/idea.properties#L133-L156
|
||||
return;
|
||||
}
|
||||
|
||||
if ((e.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) != 0) {
|
||||
Font font = textArea.getFont();
|
||||
|
Loading…
Reference in New Issue
Block a user