-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix/ime position #494
Fix/ime position #494
Conversation
cf794ca
to
6b32cca
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #494 +/- ##
==========================================
- Coverage 85.45% 85.23% -0.22%
==========================================
Files 177 178 +1
Lines 24378 24631 +253
==========================================
+ Hits 20832 20995 +163
- Misses 3546 3636 +90 ☔ View full report in Codecov by Sentry. |
750ddb3
to
c1a169d
Compare
dbb4a11
to
09d4042
Compare
core/src/builtin_widgets/anchor.rs
Outdated
pub fn new(x: HAnchor, y: VAnchor) -> Self { Self { x: Some(x), y: Some(y) } } | ||
|
||
/// Return Anchor that positions the widget's left top corner to the position | ||
pub fn from_position(pos: Point) -> Self { Self::new(HAnchor::Left(pos.x), VAnchor::Top(pos.y)) } |
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.
from_point?
match (self, other) { | ||
(HAnchor::Left(x1), HAnchor::Left(x2)) => HAnchor::Left(x1.lerp(x2, t)), | ||
(HAnchor::Right(x1), HAnchor::Right(x2)) => HAnchor::Right(x1.lerp(x2, t)), | ||
_ => unreachable!(), |
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.
Right None, None Left should implement Lerp
, and should not panic when hit left <-->right
child | ||
.widget_build(ctx!()) |
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.
seems unnecessary attach
type Child = Widget; | ||
#[inline] | ||
fn compose_child(this: impl StateWriter<Value = Self>, child: Self::Child) -> impl WidgetBuilder { | ||
fn eq(f1: Anchor, f2: Anchor) -> bool { f1.x == f2.x && f1.y == f2.y } |
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.
Does Anchor
Derive PartialEq
core/src/builtin_widgets.rs
Outdated
pub fn lazy_host_id(&self) -> LazyWidgetId { self.builtin.lazy_host_id() } | ||
|
||
/// Return the LazyWidgetId of the external widget (wrapped with the built-in | ||
/// host), through which you can access the WidgetId after building. |
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.
/// Return the LazyWidgetId point to WidgetId
of the root of the sub widget tree after the
/// FatObj has built.
impl<W> FatObj<W> { | ||
/// Anchor the widget's horizontal position to the left edge of the widget | ||
/// with WidgetId wid . | ||
pub fn relative_to_left( |
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.
left_align_to ? and relative is a f32
not HAnchor
…ttom) into anchor
09d4042
to
808276f
Compare
No description provided.