|
|
@ -508,7 +508,8 @@ pub struct Visuals { |
|
|
|
|
|
|
|
pub resize_corner_size: f32, |
|
|
|
|
|
|
|
pub text_cursor_width: f32, |
|
|
|
/// The color and width of the text cursor
|
|
|
|
pub text_cursor: Stroke, |
|
|
|
|
|
|
|
/// show where the text cursor would be if you clicked
|
|
|
|
pub text_cursor_preview: bool, |
|
|
@ -784,7 +785,7 @@ impl Visuals { |
|
|
|
|
|
|
|
popup_shadow: Shadow::small_dark(), |
|
|
|
resize_corner_size: 12.0, |
|
|
|
text_cursor_width: 2.0, |
|
|
|
text_cursor: Stroke::new(2.0, Color32::from_rgb(192, 222, 255)), |
|
|
|
text_cursor_preview: false, |
|
|
|
clip_rect_margin: 3.0, // should be at least half the size of the widest frame stroke + max WidgetVisuals::expansion
|
|
|
|
button_frame: true, |
|
|
@ -817,6 +818,7 @@ impl Visuals { |
|
|
|
panel_fill: Color32::from_gray(248), |
|
|
|
|
|
|
|
popup_shadow: Shadow::small_light(), |
|
|
|
text_cursor: Stroke::new(2.0, Color32::from_rgb(0, 83, 125)), |
|
|
|
..Self::dark() |
|
|
|
} |
|
|
|
} |
|
|
@ -1351,7 +1353,7 @@ impl Visuals { |
|
|
|
popup_shadow, |
|
|
|
|
|
|
|
resize_corner_size, |
|
|
|
text_cursor_width, |
|
|
|
text_cursor, |
|
|
|
text_cursor_preview, |
|
|
|
clip_rect_margin, |
|
|
|
button_frame, |
|
|
@ -1409,8 +1411,9 @@ impl Visuals { |
|
|
|
}); |
|
|
|
|
|
|
|
ui_color(ui, hyperlink_color, "hyperlink_color"); |
|
|
|
stroke_ui(ui, text_cursor, "Text Cursor"); |
|
|
|
|
|
|
|
ui.add(Slider::new(resize_corner_size, 0.0..=20.0).text("resize_corner_size")); |
|
|
|
ui.add(Slider::new(text_cursor_width, 0.0..=4.0).text("text_cursor_width")); |
|
|
|
ui.checkbox(text_cursor_preview, "Preview text cursor on hover"); |
|
|
|
ui.add(Slider::new(clip_rect_margin, 0.0..=20.0).text("clip_rect_margin")); |
|
|
|
|
|
|
|