New widgets#39
Conversation
fix slider positioning
raphlinus
left a comment
There was a problem hiding this comment.
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.