diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e51a2225..8b1bdf88e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file. - AS3 - empty P-code shown on clicking script - [#1888] AS3 - Coerces, module operator - [#1937] AS3 - declarations vs null +- [#1458] Quick find bar overlaying horizontal scrollbar ## [18.3.2] - 2023-01-10 ### Removed @@ -2891,6 +2892,7 @@ All notable changes to this project will be documented in this file. [#1892]: https://www.free-decompiler.com/flash/issues/1892 [#1936]: https://www.free-decompiler.com/flash/issues/1936 [#1937]: https://www.free-decompiler.com/flash/issues/1937 +[#1458]: https://www.free-decompiler.com/flash/issues/1458 [#1935]: https://www.free-decompiler.com/flash/issues/1935 [#1931]: https://www.free-decompiler.com/flash/issues/1931 [#1934]: https://www.free-decompiler.com/flash/issues/1934 diff --git a/lib/jsyntaxpane-0.9.5.jar b/lib/jsyntaxpane-0.9.5.jar index fcf9c95c9..4224447e4 100644 Binary files a/lib/jsyntaxpane-0.9.5.jar and b/lib/jsyntaxpane-0.9.5.jar differ diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/gui/QuickFindDialog.java b/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/gui/QuickFindDialog.java index c8aa88a75..f596833a2 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/gui/QuickFindDialog.java +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/actions/gui/QuickFindDialog.java @@ -27,6 +27,8 @@ import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; import javax.swing.JCheckBox; import javax.swing.JRootPane; +import javax.swing.JScrollBar; +import javax.swing.JScrollPane; import javax.swing.SwingUtilities; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; @@ -90,7 +92,7 @@ public class QuickFindDialog extends javax.swing.JDialog getRootPane().setWindowDecorationStyle(JRootPane.NONE); } - + public void showFor(final JTextComponent target) { oldCaretPosition = target.getCaretPosition(); Container view = target.getParent(); @@ -99,6 +101,13 @@ public class QuickFindDialog extends javax.swing.JDialog Point loc = new Point(0, view.getHeight()); setSize(wd); setLocationRelativeTo(view); + if (view.getParent() instanceof JScrollPane) { + JScrollPane scrollPane = (JScrollPane) view.getParent(); + JScrollBar horizontalScrollBar = scrollPane.getHorizontalScrollBar(); + if (horizontalScrollBar.isVisible()) { + loc.y += horizontalScrollBar.getHeight(); + } + } SwingUtilities.convertPointToScreen(loc, view); setLocation(loc); jTxtFind.setFont(target.getFont());