-
Notifications
You must be signed in to change notification settings - Fork 22
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
Cursor should change when operating sliders #314
Comments
@joulei At the same time, I noticed that Makepad currently doesn't support a "close hand" cursor— |
@Guocork thanks for working on this, I forgot about the cursor issue in Linux. But I'm glad that you found a solution for it. |
@joulei Alright, I'm happy to handle this issue in Makepad. Currently, I’m facing a problem as I haven’t found the API documentation for the respective platform. Do you have any related documentation? Or could you tell me where I can find the platform’s API documentation? |
@Guocork we don't have much documentation surrounding |
OK,that's great, thank you. |
@Guocork ok so after a quick look it seems like the necessary changes are as follows:
You might have to do some research into the names of the pointers in each plaform. // apple_util.rs
pub fn load_mouse_cursor(cursor: MouseCursor) -> ObjcId {
match cursor {
...
// added these two lines
MouseCursor::Grab => load_native_cursor("openHandCursor"),
MouseCursor::Grabbing => load_native_cursor("closedHandCursor"), You can debug this by using <View> {
// ...
cursor: Grab
}
<View> {
// ...
cursor: Grabbing
} Screen.Recording.2024-11-28.at.2.44.14.PM.movI can help you test on macOS and Windows. |
Okay, thank you. I got it. I'll fix this issue. |
@joulei |
@Guocork great work! I'll review it and add the cursor on Windows, thanks! |
Context
Currently when operating the sliders on the chat settings panel, the cursor always stays as a pointer.
We should add behavior to the sliders to match the visual effects of most platforms.
Goal
When hovering over the handle of a slider, the cursor should change to an open hand, indicating the user to drag. When dragging, the open hand should change to a close hand.
This might require to add the behaviour directly into Makepad's Slider widget.
The text was updated successfully, but these errors were encountered: