Skip to content

Commit

Permalink
Merge pull request iced-rs#2 from cryptowatch/update/trade-activity
Browse files Browse the repository at this point in the history
Iced fixes for trade activity
  • Loading branch information
mtkennerly authored Sep 1, 2022
2 parents 4407385 + f336db6 commit d6552f1
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions native/src/overlay/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ where
},
border_color: appearance.border_color,
border_width: appearance.border_width,
border_radius: 0.0,
border_radius: appearance.border_radius,
},
appearance.background,
);
Expand Down Expand Up @@ -457,7 +457,7 @@ where
bounds,
border_color: Color::TRANSPARENT,
border_width: 0.0,
border_radius: 0.0,
border_radius: appearance.border_radius,
},
appearance.selected_background,
);
Expand Down
12 changes: 11 additions & 1 deletion native/src/widget/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,20 @@ pub fn layout<Renderer>(
limits: &layout::Limits,
width: Length,
height: Length,
max_width: u32,
max_height: u32,
padding: Padding,
horizontal_alignment: alignment::Horizontal,
vertical_alignment: alignment::Vertical,
layout_content: impl FnOnce(&Renderer, &layout::Limits) -> layout::Node,
) -> layout::Node {
let limits = limits.loose().width(width).height(height).pad(padding);
let limits = limits
.loose()
.max_width(max_width)
.max_height(max_height)
.width(width)
.height(height)
.pad(padding);

let mut content = layout_content(renderer, &limits.loose());
let size = limits.resolve(content.size());
Expand Down Expand Up @@ -171,6 +179,8 @@ where
limits,
self.width,
self.height,
self.max_width,
self.max_height,
self.padding,
self.horizontal_alignment,
self.vertical_alignment,
Expand Down
2 changes: 2 additions & 0 deletions pure/src/widget/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ where
limits,
self.width,
self.height,
self.max_width,
self.max_height,
self.padding,
self.horizontal_alignment,
self.vertical_alignment,
Expand Down
2 changes: 1 addition & 1 deletion pure/src/widget/tooltip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ where
) -> mouse::Interaction {
self.content.as_widget().mouse_interaction(
&tree.children[0],
layout.children().next().unwrap(),
layout,
cursor_position,
viewport,
renderer,
Expand Down
1 change: 1 addition & 0 deletions style/src/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub struct Appearance {
pub text_color: Color,
pub background: Background,
pub border_width: f32,
pub border_radius: f32,
pub border_color: Color,
pub selected_text_color: Color,
pub selected_background: Background,
Expand Down
1 change: 1 addition & 0 deletions style/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ impl menu::StyleSheet for Theme {
text_color: palette.background.weak.text,
background: palette.background.weak.color.into(),
border_width: 1.0,
border_radius: 0.0,
border_color: palette.background.strong.color,
selected_text_color: palette.primary.strong.text,
selected_background: palette.primary.strong.color.into(),
Expand Down

0 comments on commit d6552f1

Please sign in to comment.