1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

Replace Stroke::none() with Stroke::NONE

This commit is contained in:
Emil Ernerfeldt
2022-12-05 12:59:02 +01:00
parent df01db2df1
commit be6d23eed1
15 changed files with 30 additions and 28 deletions

View File

@@ -303,7 +303,7 @@ impl SidePanel {
// TOOD(emilk): distinguish resizable from non-resizable
ui.style().visuals.widgets.noninteractive.bg_stroke
} else {
Stroke::none()
Stroke::NONE
};
// TODO(emilk): draw line on top of all panels in this ui when https://github.com/emilk/egui/issues/1516 is done
let resize_x = side.opposite().side_x(rect);
@@ -752,7 +752,7 @@ impl TopBottomPanel {
// TOOD(emilk): distinguish resizable from non-resizable
ui.style().visuals.widgets.noninteractive.bg_stroke
} else {
Stroke::none()
Stroke::NONE
};
// TODO(emilk): draw line on top of all panels in this ui when https://github.com/emilk/egui/issues/1516 is done
let resize_y = side.opposite().side_y(rect);

View File

@@ -66,10 +66,10 @@ impl std::ops::DerefMut for BarState {
fn set_menu_style(style: &mut Style) {
style.spacing.button_padding = vec2(2.0, 0.0);
style.visuals.widgets.active.bg_stroke = Stroke::none();
style.visuals.widgets.hovered.bg_stroke = Stroke::none();
style.visuals.widgets.active.bg_stroke = Stroke::NONE;
style.visuals.widgets.hovered.bg_stroke = Stroke::NONE;
style.visuals.widgets.inactive.bg_fill = Color32::TRANSPARENT;
style.visuals.widgets.inactive.bg_stroke = Stroke::none();
style.visuals.widgets.inactive.bg_stroke = Stroke::NONE;
}
/// The menu bar goes well in a [`TopBottomPanel::top`],

View File

@@ -293,12 +293,12 @@ impl RichText {
let underline = if underline {
crate::Stroke::new(1.0, line_color)
} else {
crate::Stroke::none()
crate::Stroke::NONE
};
let strikethrough = if strikethrough {
crate::Stroke::new(1.0, line_color)
} else {
crate::Stroke::none()
crate::Stroke::NONE
};
let valign = if raised {

View File

@@ -48,7 +48,7 @@ impl Widget for Link {
let underline = if response.hovered() || response.has_focus() {
Stroke::new(visuals.fg_stroke.width, color)
} else {
Stroke::none()
Stroke::NONE
};
ui.painter().add(epaint::TextShape {

View File

@@ -176,7 +176,7 @@ impl Widget for Label {
let underline = if response.has_focus() {
Stroke::new(1.0, response_color)
} else {
Stroke::none()
Stroke::NONE
};
let override_text_color = if text_galley.galley_has_color {

View File

@@ -605,7 +605,7 @@ impl PlotItem for Polygon {
let fill = Rgba::from(stroke.color).to_opaque().multiply(fill_alpha);
let shape = Shape::convex_polygon(values_tf.clone(), fill, Stroke::none());
let shape = Shape::convex_polygon(values_tf.clone(), fill, Stroke::NONE);
shapes.push(shape);
values_tf.push(*values_tf.first().unwrap());
style.style_line(values_tf, *stroke, *highlight, shapes);

View File

@@ -78,12 +78,8 @@ impl Widget for ProgressBar {
let visuals = ui.style().visuals.clone();
let rounding = outer_rect.height() / 2.0;
ui.painter().rect(
outer_rect,
rounding,
visuals.extreme_bg_color,
Stroke::none(),
);
ui.painter()
.rect(outer_rect, rounding, visuals.extreme_bg_color, Stroke::NONE);
let inner_rect = Rect::from_min_size(
outer_rect.min,
vec2(
@@ -103,7 +99,7 @@ impl Widget for ProgressBar {
inner_rect,
rounding,
Color32::from(Rgba::from(visuals.selection.bg_fill) * color_factor as f32),
Stroke::none(),
Stroke::NONE,
);
if animate {