Skip to content

Commit

Permalink
chore: add scale factor
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Aug 21, 2023
1 parent be7578c commit 9eec345
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/widget/text_input/text_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ where
layout: Layout<'_>,
cursor_position: mouse::Cursor,
value: Option<&Value>,
style: &renderer::Style,
) {
draw(
renderer,
Expand All @@ -388,6 +389,7 @@ where
self.helper_size,
self.helper_line_height,
&layout.bounds(),
style,
);
}

Expand Down Expand Up @@ -615,7 +617,7 @@ where
tree: &Tree,
renderer: &mut crate::Renderer,
theme: &<crate::Renderer as iced_core::Renderer>::Theme,
_style: &renderer::Style,
style: &renderer::Style,
layout: Layout<'_>,
cursor_position: mouse::Cursor,
viewport: &Rectangle,
Expand Down Expand Up @@ -643,6 +645,7 @@ where
self.helper_size,
self.helper_line_height,
viewport,
style,
);
}

Expand Down Expand Up @@ -1688,6 +1691,7 @@ pub fn draw<'a, Message>(
helper_text_size: f32,
helper_line_height: text::LineHeight,
viewport: &Rectangle,
renderer_style: &renderer::Style,
) {
// all children should be icon images
let children = &tree.children;
Expand Down Expand Up @@ -1799,6 +1803,7 @@ pub fn draw<'a, Message>(
theme,
&renderer::Style {
text_color: appearance.text_color,
scale_factor: renderer_style.scale_factor,
},
icon_layout,
cursor_position,
Expand Down Expand Up @@ -1965,6 +1970,7 @@ pub fn draw<'a, Message>(
theme,
&renderer::Style {
text_color: appearance.text_color,
scale_factor: renderer_style.scale_factor,
},
icon_layout,
cursor_position,
Expand Down

0 comments on commit 9eec345

Please sign in to comment.