Fix quad glitch when rounding borders of a Slider rail
This commit is contained in:
parent
ee0dd4c623
commit
66d4decc0c
2 changed files with 4 additions and 10 deletions
|
|
@ -367,7 +367,6 @@ pub fn draw<T, R>(
|
||||||
} else {
|
} else {
|
||||||
style_sheet.active(style)
|
style_sheet.active(style)
|
||||||
};
|
};
|
||||||
let border_radius: [f32; 4] = style.rail.border_radius.into();
|
|
||||||
|
|
||||||
let (handle_width, handle_height, handle_border_radius) =
|
let (handle_width, handle_height, handle_border_radius) =
|
||||||
match style.handle.shape {
|
match style.handle.shape {
|
||||||
|
|
@ -404,8 +403,7 @@ pub fn draw<T, R>(
|
||||||
width: offset + handle_width / 2.0,
|
width: offset + handle_width / 2.0,
|
||||||
height: style.rail.width,
|
height: style.rail.width,
|
||||||
},
|
},
|
||||||
border_radius: [border_radius[0], 0.0, 0.0, border_radius[3]]
|
border_radius: style.rail.border_radius,
|
||||||
.into(),
|
|
||||||
border_width: 0.0,
|
border_width: 0.0,
|
||||||
border_color: Color::TRANSPARENT,
|
border_color: Color::TRANSPARENT,
|
||||||
},
|
},
|
||||||
|
|
@ -420,8 +418,7 @@ pub fn draw<T, R>(
|
||||||
width: bounds.width - offset - handle_width / 2.0,
|
width: bounds.width - offset - handle_width / 2.0,
|
||||||
height: style.rail.width,
|
height: style.rail.width,
|
||||||
},
|
},
|
||||||
border_radius: [0.0, border_radius[1], border_radius[2], 0.0]
|
border_radius: style.rail.border_radius,
|
||||||
.into(),
|
|
||||||
border_width: 0.0,
|
border_width: 0.0,
|
||||||
border_color: Color::TRANSPARENT,
|
border_color: Color::TRANSPARENT,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,6 @@ pub fn draw<T, R>(
|
||||||
} else {
|
} else {
|
||||||
style_sheet.active(style)
|
style_sheet.active(style)
|
||||||
};
|
};
|
||||||
let border_radius: [f32; 4] = style.rail.border_radius.into();
|
|
||||||
|
|
||||||
let (handle_width, handle_height, handle_border_radius) =
|
let (handle_width, handle_height, handle_border_radius) =
|
||||||
match style.handle.shape {
|
match style.handle.shape {
|
||||||
|
|
@ -402,8 +401,7 @@ pub fn draw<T, R>(
|
||||||
width: style.rail.width,
|
width: style.rail.width,
|
||||||
height: offset + handle_width / 2.0,
|
height: offset + handle_width / 2.0,
|
||||||
},
|
},
|
||||||
border_radius: [border_radius[0], border_radius[1], 0.0, 0.0]
|
border_radius: style.rail.border_radius,
|
||||||
.into(),
|
|
||||||
border_width: 0.0,
|
border_width: 0.0,
|
||||||
border_color: Color::TRANSPARENT,
|
border_color: Color::TRANSPARENT,
|
||||||
},
|
},
|
||||||
|
|
@ -418,8 +416,7 @@ pub fn draw<T, R>(
|
||||||
width: style.rail.width,
|
width: style.rail.width,
|
||||||
height: bounds.height - offset - handle_width / 2.0,
|
height: bounds.height - offset - handle_width / 2.0,
|
||||||
},
|
},
|
||||||
border_radius: [0.0, 0.0, border_radius[2], border_radius[3]]
|
border_radius: style.rail.border_radius,
|
||||||
.into(),
|
|
||||||
border_width: 0.0,
|
border_width: 0.0,
|
||||||
border_color: Color::TRANSPARENT,
|
border_color: Color::TRANSPARENT,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue