mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Re-add Visuals::clip_rect_margin as a deprecated no-op (#8380)
Follow-up to #8366, which removed `Visuals::clip_rect_margin` outright Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1074,6 +1074,14 @@ pub struct Visuals {
|
|||||||
/// How the text cursor acts.
|
/// How the text cursor acts.
|
||||||
pub text_cursor: TextCursorStyle,
|
pub text_cursor: TextCursorStyle,
|
||||||
|
|
||||||
|
/// Unused. Kept only for backwards compatibility.
|
||||||
|
///
|
||||||
|
/// Used to allow widgets to paint this much outside the scroll area rect.
|
||||||
|
/// Setting it now has no effect.
|
||||||
|
/// Use [`crate::ScrollArea::content_margin`] instead.
|
||||||
|
#[deprecated(note = "This is now unused and has no effect")]
|
||||||
|
pub clip_rect_margin: f32,
|
||||||
|
|
||||||
/// Show a background behind buttons.
|
/// Show a background behind buttons.
|
||||||
pub button_frame: bool,
|
pub button_frame: bool,
|
||||||
|
|
||||||
@@ -1481,6 +1489,7 @@ impl Default for Interaction {
|
|||||||
|
|
||||||
impl Visuals {
|
impl Visuals {
|
||||||
/// Default dark theme.
|
/// Default dark theme.
|
||||||
|
#[expect(deprecated)]
|
||||||
pub fn dark() -> Self {
|
pub fn dark() -> Self {
|
||||||
Self {
|
Self {
|
||||||
dark_mode: true,
|
dark_mode: true,
|
||||||
@@ -1528,6 +1537,7 @@ impl Visuals {
|
|||||||
|
|
||||||
text_cursor: Default::default(),
|
text_cursor: Default::default(),
|
||||||
|
|
||||||
|
clip_rect_margin: 0.0,
|
||||||
button_frame: true,
|
button_frame: true,
|
||||||
collapsing_header_frame: false,
|
collapsing_header_frame: false,
|
||||||
indent_has_left_vline: true,
|
indent_has_left_vline: true,
|
||||||
@@ -2256,6 +2266,7 @@ impl WidgetVisuals {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Visuals {
|
impl Visuals {
|
||||||
|
#[expect(deprecated)]
|
||||||
pub fn ui(&mut self, ui: &mut crate::Ui) {
|
pub fn ui(&mut self, ui: &mut crate::Ui) {
|
||||||
let Self {
|
let Self {
|
||||||
dark_mode,
|
dark_mode,
|
||||||
@@ -2290,6 +2301,7 @@ impl Visuals {
|
|||||||
|
|
||||||
text_cursor,
|
text_cursor,
|
||||||
|
|
||||||
|
clip_rect_margin: _,
|
||||||
button_frame,
|
button_frame,
|
||||||
collapsing_header_frame,
|
collapsing_header_frame,
|
||||||
indent_has_left_vline,
|
indent_has_left_vline,
|
||||||
|
|||||||
Reference in New Issue
Block a user