-
Notifications
You must be signed in to change notification settings - Fork 566
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
New widgets #39
New widgets #39
Conversation
fix slider positioning
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.
Looks good, I'll merge soon if other people don't have comments. Thanks!
Yeah, I'm getting this .width() measurement from this trait in Piet: pub trait TextLayout {
type Coord: Into<f64> + RoundFrom<f64>;
/// Measure the advance width of the text.
fn width(&self) -> Self::Coord;
} In addition to fixing this, I believe we'll need more detail about the text layout to position the cursor within the string as well. |
Yes, at the very least the
I would like to get a "good enough" solution in place pretty soon, as this is clearly very important, but at the same time don't want to put stuff in that's broken by design and needs to be reworked later. |
Would adding something similar to these "hit_test" methods from directwrite be a necessary first step either way? |
Yes, that code is a good start. I am open to the idea of adding something provisional to get stuff working, with the clear understanding that it will need to be reworked at some point. |
Slider and progress bar feel pretty good. TextBox is still pretty much a hack.