diff --git a/egui/src/containers/collapsing_header.rs b/egui/src/containers/collapsing_header.rs index 0411c163..66c6b213 100644 --- a/egui/src/containers/collapsing_header.rs +++ b/egui/src/containers/collapsing_header.rs @@ -198,12 +198,6 @@ impl CollapsingHeader { self } - #[deprecated = "Replaced by: CollapsingHeader::new(RichText::new(text).text_style(…))"] - pub fn text_style(mut self, text_style: TextStyle) -> Self { - self.text = self.text.text_style(text_style); - self - } - /// If you set this to `false`, the `CollapsingHeader` will be grayed out and un-clickable. /// /// This is a convenience for [`Ui::set_enabled`]. diff --git a/egui/src/context.rs b/egui/src/context.rs index 493c2b06..dae82ee2 100644 --- a/egui/src/context.rs +++ b/egui/src/context.rs @@ -436,11 +436,6 @@ impl Context { self.fonts().font_image() } - #[deprecated = "Renamed font_image"] - pub fn texture(&self) -> Arc { - self.fonts().font_image() - } - /// Tell `egui` which fonts to use. /// /// The default `egui` fonts only support latin and cyrillic alphabets, diff --git a/egui/src/widgets/button.rs b/egui/src/widgets/button.rs index e5866e56..599d77c1 100644 --- a/egui/src/widgets/button.rs +++ b/egui/src/widgets/button.rs @@ -80,18 +80,6 @@ impl Button { self } - #[deprecated = "Replaced by: Button::new(RichText::new(text).color(…))"] - pub fn text_color(mut self, text_color: Color32) -> Self { - self.text = self.text.color(text_color); - self - } - - #[deprecated = "Replaced by: Button::new(RichText::new(text).text_style(…))"] - pub fn text_style(mut self, text_style: TextStyle) -> Self { - self.text = self.text.text_style(text_style); - self - } - /// Override background fill color. Note that this will override any on-hover effects. /// Calling this will also turn on the frame. pub fn fill(mut self, fill: impl Into) -> Self { @@ -241,18 +229,6 @@ impl<'a> Checkbox<'a> { text: text.into(), } } - - #[deprecated = "Replaced by: Checkbox::new(RichText::new(text).color(…))"] - pub fn text_color(mut self, text_color: Color32) -> Self { - self.text = self.text.color(text_color); - self - } - - #[deprecated = "Replaced by: Checkbox::new(RichText::new(text).text_style(…))"] - pub fn text_style(mut self, text_style: TextStyle) -> Self { - self.text = self.text.text_style(text_style); - self - } } impl<'a> Widget for Checkbox<'a> { @@ -347,18 +323,6 @@ impl RadioButton { text: text.into(), } } - - #[deprecated = "Replaced by: RadioButton::new(RichText::new(text).color(…))"] - pub fn text_color(mut self, text_color: Color32) -> Self { - self.text = self.text.color(text_color); - self - } - - #[deprecated = "Replaced by: RadioButton::new(RichText::new(text).text_style(…))"] - pub fn text_style(mut self, text_style: TextStyle) -> Self { - self.text = self.text.text_style(text_style); - self - } } impl Widget for RadioButton { diff --git a/egui/src/widgets/hyperlink.rs b/egui/src/widgets/hyperlink.rs index f8c7b996..764d4036 100644 --- a/egui/src/widgets/hyperlink.rs +++ b/egui/src/widgets/hyperlink.rs @@ -6,8 +6,13 @@ use crate::*; /// /// ``` /// # egui::__run_test_ui(|ui| { +/// // These are equivalent: /// ui.hyperlink("https://github.com/emilk/egui"); -/// ui.add(egui::Hyperlink::new("https://github.com/emilk/egui").text("My favorite repo").small()); +/// ui.add(egui::Hyperlink::new("https://github.com/emilk/egui")); +/// +/// // These are equivalent: +/// ui.hyperlink_to("My favorite repo", "https://github.com/emilk/egui"); +/// ui.add(egui::Hyperlink::from_label_and_url("My favorite repo", "https://github.com/emilk/egui")); /// # }); /// ``` #[must_use = "You should put this widget in an ui with `ui.add(widget);`"] @@ -33,25 +38,6 @@ impl Hyperlink { text: text.into(), } } - - #[deprecated = "Use Hyperlink::from_label_and_url instead"] - #[allow(clippy::needless_pass_by_value)] - pub fn text(mut self, text: impl ToString) -> Self { - self.text = text.to_string().into(); - self - } - - #[deprecated = "Use Hyperlink::from_label_and_url instead"] - pub fn text_style(mut self, text_style: TextStyle) -> Self { - self.text = self.text.text_style(text_style); - self - } - - #[deprecated = "Use Hyperlink::from_label_and_url instead"] - pub fn small(mut self) -> Self { - self.text = self.text.text_style(TextStyle::Small); - self - } } impl Widget for Hyperlink { diff --git a/egui/src/widgets/label.rs b/egui/src/widgets/label.rs index 704d394e..77dd15cc 100644 --- a/egui/src/widgets/label.rs +++ b/egui/src/widgets/label.rs @@ -43,90 +43,6 @@ impl Label { self } - #[deprecated = "Replaced by Label::new(RichText::new(…).text_style(…))"] - pub fn text_style(mut self, text_style: TextStyle) -> Self { - self.text = self.text.text_style(text_style); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).heading())"] - pub fn heading(mut self) -> Self { - self.text = self.text.heading(); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).monospace())"] - pub fn monospace(mut self) -> Self { - self.text = self.text.monospace(); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).code())"] - pub fn code(mut self) -> Self { - self.text = self.text.code(); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).strong())"] - pub fn strong(mut self) -> Self { - self.text = self.text.strong(); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).weak())"] - pub fn weak(mut self) -> Self { - self.text = self.text.weak(); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).underline())"] - pub fn underline(mut self) -> Self { - self.text = self.text.underline(); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).strikethrough())"] - pub fn strikethrough(mut self) -> Self { - self.text = self.text.strikethrough(); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).italics())"] - pub fn italics(mut self) -> Self { - self.text = self.text.italics(); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).small())"] - pub fn small(mut self) -> Self { - self.text = self.text.small(); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).small_raised())"] - pub fn small_raised(mut self) -> Self { - self.text = self.text.small_raised(); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).raised())"] - pub fn raised(mut self) -> Self { - self.text = self.text.raised(); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).background_color(…))"] - pub fn background_color(mut self, background_color: impl Into) -> Self { - self.text = self.text.background_color(background_color); - self - } - - #[deprecated = "Replaced by Label::new(RichText::new(…).text_color())"] - pub fn text_color(mut self, text_color: impl Into) -> Self { - self.text = self.text.color(text_color); - self - } - /// Make the label respond to clicks and/or drags. /// /// By default, a label is inert and does not respond to click or drags. diff --git a/egui/src/widgets/selected_label.rs b/egui/src/widgets/selected_label.rs index e364883b..bf08b41c 100644 --- a/egui/src/widgets/selected_label.rs +++ b/egui/src/widgets/selected_label.rs @@ -34,12 +34,6 @@ impl SelectableLabel { text: text.into(), } } - - #[deprecated = "Replaced by: Button::new(RichText::new(text).text_style(…))"] - pub fn text_style(mut self, text_style: TextStyle) -> Self { - self.text = self.text.text_style(text_style); - self - } } impl Widget for SelectableLabel {