mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Implement Clone & PartialEq on RichText WidgetTextJob WidgetTextGalley
This commit is contained in:
@@ -9,7 +9,7 @@ use crate::{
|
|||||||
///
|
///
|
||||||
/// The style choices (font, color) are applied to the entire text.
|
/// The style choices (font, color) are applied to the entire text.
|
||||||
/// For more detailed control, use [`crate::text::LayoutJob`] instead.
|
/// For more detailed control, use [`crate::text::LayoutJob`] instead.
|
||||||
#[derive(Default)]
|
#[derive(Clone, Default, PartialEq)]
|
||||||
pub struct RichText {
|
pub struct RichText {
|
||||||
text: String,
|
text: String,
|
||||||
text_style: Option<TextStyle>,
|
text_style: Option<TextStyle>,
|
||||||
@@ -555,6 +555,7 @@ impl From<Arc<Galley>> for WidgetText {
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#[derive(Clone, PartialEq)]
|
||||||
pub struct WidgetTextJob {
|
pub struct WidgetTextJob {
|
||||||
pub job: LayoutJob,
|
pub job: LayoutJob,
|
||||||
pub job_has_color: bool,
|
pub job_has_color: bool,
|
||||||
@@ -574,6 +575,7 @@ impl WidgetTextJob {
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
/// Text that has been layed out and ready to be painted.
|
/// Text that has been layed out and ready to be painted.
|
||||||
|
#[derive(Clone, PartialEq)]
|
||||||
pub struct WidgetTextGalley {
|
pub struct WidgetTextGalley {
|
||||||
pub galley: Arc<Galley>,
|
pub galley: Arc<Galley>,
|
||||||
pub galley_has_color: bool,
|
pub galley_has_color: bool,
|
||||||
|
|||||||
Reference in New Issue
Block a user