Skip to content

Commit 1f0d08a

Browse files
authored
Merge pull request #687 from kas-gui/push-zmtnvxmnxyzz
Revisions to editor fields
2 parents 11a6cba + a4762aa commit 1f0d08a

File tree

2 files changed

+150
-131
lines changed

2 files changed

+150
-131
lines changed

crates/kas-widgets/src/edit/edit_field.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ mod EditBoxCore {
127127

128128
#[inline]
129129
fn draw_with_offset(&self, mut draw: DrawCx, rect: Rect, offset: Offset) {
130-
self.editor.part().draw_with_offset(draw, rect, offset);
130+
self.editor.draw_with_offset(draw, rect, offset);
131131
}
132132
}
133133

@@ -239,7 +239,7 @@ mod EditBoxCore {
239239
core: Default::default(),
240240
width: (8.0, 16.0),
241241
lines: (1.0, 1.0),
242-
editor: Component::default(),
242+
editor: Component::new(false),
243243
guard,
244244
}
245245
}
@@ -296,7 +296,7 @@ impl<A: 'static> EditBoxCore<DefaultGuard<A>> {
296296
#[inline]
297297
pub fn text<S: ToString>(text: S) -> Self {
298298
EditBoxCore {
299-
editor: Component::from(text),
299+
editor: Component::new(false).with_text(text),
300300
..Default::default()
301301
}
302302
}

0 commit comments

Comments
 (0)