-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Make "find and replace" window always appear on top of the parent editor #6603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
czghzc
commented
Oct 9, 2017
I'm sorry, but now I understand your reply, it is ashamed.
I tested it, and now the find window is above all windows, but it finds another problem.
If there are other windows in the system, such as a browser, the find window will also be on top of the browser window, which will interfere with the operation of the browser window, and we hope that the find window is just above the Arduino main window.
What we want is like this picture below:
2017年10月07日_093944
Hi @czghzc ,
I had the chance to test it on Windows and indeed it behaves exactly as you described.
I just pushed 09f5196 which should make the behaviour consistent across all OSes. The build by @ArduinoBot should arrive soon 😉
✅ Build completed.
Please test this code using one of the following:
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-732-linux32.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-732-linux64.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-732-windows.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-732-macosx.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-732-linuxarm.tar.xz
i️ The linuxarm
build is still experimental and may not be always available.
czghzc
commented
Oct 10, 2017
Hi @facchinm ,
I tested the windows version because i only had windows system, just as I wanted it, it worked very well and thank you so much thanks!
If the editor is focused, acquire alwaysOnTop capabilities but drop them as soon as both the editor and the dialog are out of focus
As implemented in Notepad++, a partially transparent search/replace window could make it easier to interact with the editor (particularly in fullscreen contexts, when the "always on top" window could hide the search results). Unfortunately, Java can only apply the transparency to undecorated window, so it's a no-go. Java gurus, please come to the rescue :D
Probably this approach could be adopted by all OSes with a little care on the window lifecycle.
09f5196
to
71418ca
Compare
✅ Build completed.
Please test this code using one of the following:
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-740-linux32.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-740-linux64.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-740-windows.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-740-macosx.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-740-linuxarm.tar.xz
i️ The linuxarm
build is still experimental and may not be always available.
✅ Build completed.
Please test this code using one of the following:
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-742-linux32.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-742-linux64.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-742-windows.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-742-macosx.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-6603-BUILD-742-linuxarm.tar.xz
i️ The linuxarm
build is still experimental and may not be always available.
With 6603 the behavior is noticeably better, for doggone sure! (Linux Mint) Only thing is, still, I when I file-save via the menu dropdown, the "find" window still goes behind right when I select the final menu selection and stays there. I some other menu selections do the same (some in help menu, at least), but others (save-as, for example) work the "find" window just fine.
czghzc
commented
Mar 9, 2018
pic2
The beginning is good, there is no problem, but after clicking the window's title bar with a mouse is not normal, the search window goes to the back of the main window.
When programming in C++, setting the search window to the child window of the main window can achieve the desired effect. However, I will not use Java. I do not know if Java has the same operation method.
In addition, I also have a suggestion that when the search window comes out, the content of the search text box is selected, which facilitates us to modify the content to be searched.
I agree with causing the text to be selected when re-pressing ctrl-f. I just thought you had a reason for not having it that way in the first place. Otherwise oftentimes a person enters new test unintentionally appending to previous. Additionally, you could replace the text with any text currently selected in the main window, just like when the search gets newly activated.
Uh oh!
There was an error while loading. Please reload this page.
Fixes #6408 and #4883