-
-
Notifications
You must be signed in to change notification settings - Fork 90
Add search to code views #853
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
|
Since this is a continuation of #364 it would be nice to mention it in the PR description It's a bit late/difficult to do now so before merging, I will make sure you're both credited as author of the commit. |
|
I didn't use #364 directly - I copied some code from the demo, and I also used Text Editor and other code as reference. But @SoNiC-HeRE should be credited for sure - should I amend the commit message? |
|
There is a problem with this branch:
It can be reproduced with other demos too as long as there are empty windows that can be searched, but they should be empty on start. It also seems to be time dependent. I'm not sure how to handle this. |
sonnyp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great, well done. Sorry for the delay.
I can't reproduce the issue you mentioned but see https://gitlab.gnome.org/GNOME/gjs/-/issues/327
Coul you add the Ctrl+F keyboard shortcut to the keyboard shortcut window?
| using Gtk 4.0; | ||
|
|
||
| template $Search: Revealer { | ||
| transition-type: slide_up; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine for me even after the merge.
src/widgets/Search.blp
Outdated
|
|
||
| Button button_previous { | ||
| icon-name: "up"; | ||
| tooltip-text: "Move to previous match (Ctrl+Shift+G)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| tooltip-text: "Move to previous match (Ctrl+Shift+G)"; | |
| tooltip-text: _("Move to previous match (Ctrl+Shift+G)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/widgets/Search.blp
Outdated
|
|
||
| Button button_next { | ||
| icon-name: "down"; | ||
| tooltip-text: "Move to next match (Ctrl+G)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| tooltip-text: "Move to next match (Ctrl+G)"; | |
| tooltip-text: _("Move to next match (Ctrl+G)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
I modeled it after Text Editor, since it was created later and is supposedly more modern and in line with recent design: As for the close buttons - we already discussed it and decided that using ESC is fine for now. I may add a breakpoint to show\hide the close button depending on the available space later on. |
|
I added the shortcut to the shortcut window, although it is not a global shortcut. |
|
Can we merge this and polish it later or do there is something missing? |
I'm concerned about #853 (comment) But we can proceed and ship this "hidden" to polish. I made some tweaks e9a6b5e |



No description provided.