Skip to content
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

ItemList highlight selected items and draw cursor-stylebox last #99361

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

havi05
Copy link
Contributor

@havi05 havi05 commented Nov 17, 2024

Hovered items of an ItemList are now highlighted even if they are already selected.
This fixes godotengine/godot-proposals#7404 by adding two new hover styleboxes to preserve the functionality of the selected and selected focus styleboxes. I've added the new styleboxes to the default_theme.cpp and to the editor_theme_manager.cpp to add this functionality to the filesystem of the editor.

This fixes also the issue that the cursor stylebox was drawn behind some styleboxes. (See 2. row of images)

Old New
2024-11-17.16-34-02.mp4
2024-11-17.16-34-57.mp4
Screenshot 2024-11-17 162709 Screenshot 2024-11-17 162842
Video of Filesystem

2024-11-17.16-36-12_.mp4

scene/gui/item_list.cpp Outdated Show resolved Hide resolved
scene/gui/item_list.cpp Outdated Show resolved Hide resolved
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tree could also get a hovered_selected stylebox.

@KoBeWi KoBeWi modified the milestones: 4.x, 4.4 Dec 13, 2024
@havi05 havi05 force-pushed the itemlist-hover-on-selected branch from 6e46623 to 555ef3d Compare December 13, 2024 22:40
@havi05
Copy link
Contributor Author

havi05 commented Dec 13, 2024

Tree could also get a hovered_selected stylebox.

I would start a new pull request for the Tree node, or would you prefer to have it in this pr?

@KoBeWi
Copy link
Member

KoBeWi commented Dec 13, 2024

In a new one.

@havi05 havi05 force-pushed the itemlist-hover-on-selected branch 2 times, most recently from 28e52e5 to 352f907 Compare December 14, 2024 09:23
@havi05
Copy link
Contributor Author

havi05 commented Dec 14, 2024

Added font_hovered_selected_color to the ItemList-Theme, which is set to white by default. (like the color of font_selected_color)

@havi05 havi05 requested a review from KoBeWi December 14, 2024 09:28
@havi05 havi05 force-pushed the itemlist-hover-on-selected branch from 352f907 to 97ccf51 Compare December 14, 2024 09:42
@akien-mga
Copy link
Member

Needs rebase after #99355.

@havi05 havi05 force-pushed the itemlist-hover-on-selected branch from 97ccf51 to b051117 Compare December 14, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hightlight hovered items even if they are selected already in the FileSystem
5 participants