only add border radius to the visible part
This commit is contained in:
parent
9902e77816
commit
1e2965d542
2 changed files with 10 additions and 4 deletions
|
|
@ -367,6 +367,7 @@ pub fn draw<T, R>(
|
|||
} else {
|
||||
style_sheet.active(style)
|
||||
};
|
||||
let border_radius: [f32; 4] = style.rail.border_radius.into();
|
||||
|
||||
let (handle_width, handle_height, handle_border_radius) =
|
||||
match style.handle.shape {
|
||||
|
|
@ -403,7 +404,8 @@ pub fn draw<T, R>(
|
|||
width: offset + handle_width / 2.0,
|
||||
height: style.rail.width,
|
||||
},
|
||||
border_radius: style.rail.border_radius,
|
||||
border_radius: [border_radius[0], 0.0, 0.0, border_radius[3]]
|
||||
.into(),
|
||||
border_width: 0.0,
|
||||
border_color: Color::TRANSPARENT,
|
||||
},
|
||||
|
|
@ -418,7 +420,8 @@ pub fn draw<T, R>(
|
|||
width: bounds.width - offset - handle_width / 2.0,
|
||||
height: style.rail.width,
|
||||
},
|
||||
border_radius: style.rail.border_radius,
|
||||
border_radius: [0.0, border_radius[1], border_radius[2], 0.0]
|
||||
.into(),
|
||||
border_width: 0.0,
|
||||
border_color: Color::TRANSPARENT,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -365,6 +365,7 @@ pub fn draw<T, R>(
|
|||
} else {
|
||||
style_sheet.active(style)
|
||||
};
|
||||
let border_radius: [f32; 4] = style.rail.border_radius.into();
|
||||
|
||||
let (handle_width, handle_height, handle_border_radius) =
|
||||
match style.handle.shape {
|
||||
|
|
@ -401,7 +402,8 @@ pub fn draw<T, R>(
|
|||
width: style.rail.width,
|
||||
height: offset + handle_width / 2.0,
|
||||
},
|
||||
border_radius: style.rail.border_radius,
|
||||
border_radius: [border_radius[0], border_radius[1], 0.0, 0.0]
|
||||
.into(),
|
||||
border_width: 0.0,
|
||||
border_color: Color::TRANSPARENT,
|
||||
},
|
||||
|
|
@ -416,7 +418,8 @@ pub fn draw<T, R>(
|
|||
width: style.rail.width,
|
||||
height: bounds.height - offset - handle_width / 2.0,
|
||||
},
|
||||
border_radius: style.rail.border_radius,
|
||||
border_radius: [0.0, 0.0, border_radius[2], border_radius[3]]
|
||||
.into(),
|
||||
border_width: 0.0,
|
||||
border_color: Color::TRANSPARENT,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue