-
-
Notifications
You must be signed in to change notification settings - Fork 43
Enhance patch UI with buttons for better interaction #279
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
Enhance patch UI with buttons for better interaction #279
Conversation
Added buttons for moving patches between lists, reordering selected patches, and improving patch selection clarity in the UI. Updated methods to handle button actions and ensure smoother interaction logic.
Perhaps, we could also remove the other buttons for a cleaner UI? |
Also, I just realised, I forgot to hide buttons when not hovering over them. |
Introduced a reusable style `HoverVisibleButtonStyle` to manage button visibility on hover. Replaced `StackPanel` with `Grid` for better layout management and for putting buttons on top of the text. Improved user interactivity by ensuring buttons only appear when hovered over related elements.
After a bit of testing:
Otherwise, the code looks fine. And yeah, I don't think we need to keep the old arrows if we add these ones. |
Removed unused navigation buttons and adjusted margins for consistency. Moved the help button next to the filter box for better user guidance.
Removed image resources and replaced arrow buttons' images with Unicode emoji. Updated button styles and templates for consistent appearance and simplified resource management.
Improved grid structure by adjusting margins, row definitions, and text wrapping for better readability. Simplified bindings and rearranged buttons to ensure consistent alignment and user experience.
Reorganized grid columns to improve logical layout and added a border to distinguish the source patch title. Updated text and button alignment.
…ange styling of the treeview elements. Added a shared style (TextBlockCommonStyle) to simplify and standardize TextBlock properties across the UI. This reduces code duplication and ensures consistent alignment, wrapping, and trimming behavior. Updated existing TextBlock elements to use the new style where applicable.
Removed unnecessary margin from Grid background. Adjusted padding and added MaxHeight to text elements for better alignment and visual consistency.
Introduced a new header text style for improved UI consistency and applied it to section headers. Updated grid layout to better organize elements and added explanatory text for patch application order.
This is probably as good as it gets, unless we want to add some kind of animation or "moved here" style. Alternativly, I guess we could do drag & drop for reordering. |
The description of what patches do were moved to the Page's description. While the order is available under the Selected Patches header.
2025-03-13.22-41-02.mp4Tested out touch behavior. If your finger happens to touch the spot where the arrow is when you hover with the mouse, that arrow's action is performed automatically. If you just select an item with the touch screen though, the arrows show up where they should. |
Added `IsFirst`, `IsLast`, and their inverted properties to better manage patch selection states. Updated UI buttons to conditionally display based on these properties, improving usability for moving patches up or down.
If I'm correct all of those points should have been addressed in some capacity in the above changes. |
Looks good. |
I'll do a more proper test when I'm home, but I can test on Linux with touchscreen right now. EDIT: Wine itself doesn't seem to support touchscreen at all. I'll do my testing on Windows when I get home, but testing touchscreen stuff in Wine, for now, seems completely pointless |
For future reference: cccab28 Some platforms we support don't show emojis correctly |
Quick comment about your latest commit, I don't see Page2_advanced.PropertyChanged being used anywhere, and because of that, I don't think the inheritance on INotifyPropertyChanged is useful. Does PropertyChanged do something just by existing, or is that something from a previous test that your forgot to remove? |
Pretty sure Bindings don't work without it, even if they're get only. |
I tested it in Windows 7 and works, but for whatever reason the Wingdings arrows are misaligned. If anyone has any idea, they're free to contribute, but otherwise, if this also works on XP I would merge this and worry about touch support in a different, perhaps more comprehensive issue. |
Well, I'm using a lot of bindings in https://github.com/thpatch/thcrap/blob/patch_editor/thcrap_configure_v3/Page2_PatchEditor.xaml , and no class in https://github.com/thpatch/thcrap/blob/patch_editor/thcrap_configure_v3/Page2_PatchEditor.xaml.cs inherits from INotifyPropertyChanged or declares a PropertyChanged member. And I just tested on your latest changes quickly on Windows 10, it seems to work properly without them. |
thcrap_configure_v3 uses .NET Framework 4.8 which isn't compatible with Windows XP, so there's nothing to test there. |
Test it in Win7 without, it's the font binding that will won't work, if I remember correctly. |
Never mind, after a little bit of searching, 4.8 doesn't support Vista either. |
I just tried on a Windows 7 VM (installing .NET Framework 4.8 was surprisingly hard because it depends on a few Windows updates and Windows Update seems dead), and it seems to work fine for me. |
Added buttons for moving patches between lists, reordering selected patches, and improving patch selection clarity in the UI. Updated methods to handle button actions and ensure smoother interaction logic.
Fixes #274 .