From 8732b7e50b5fae8d82a61e457e9dd0300f83471d Mon Sep 17 00:00:00 2001 From: MarcinZiabek Date: Sun, 27 Mar 2022 20:12:22 +0200 Subject: [PATCH] Renaming --- QuestPDF.Examples/TextExamples.cs | 2 +- QuestPDF/Elements/Text/Items/TextBlockSpan.cs | 2 +- QuestPDF/Fluent/TextSpanDescriptorExtensions.cs | 4 ++-- QuestPDF/Fluent/TextStyleExtensions.cs | 4 ++-- QuestPDF/Infrastructure/TextStyle.cs | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/QuestPDF.Examples/TextExamples.cs b/QuestPDF.Examples/TextExamples.cs index 778aa85..1b26a24 100644 --- a/QuestPDF.Examples/TextExamples.cs +++ b/QuestPDF.Examples/TextExamples.cs @@ -397,7 +397,7 @@ namespace QuestPDF.Examples text.DefaultTextStyle(x => x.BackgroundColor(Colors.Red.Lighten3).FontSize(24)); text.Span(" " + Placeholders.LoremIpsum()); - text.Span(" 0123456789012345678901234567890123456789012345678901234567890123456789 ").BreakAnywhere(); + text.Span(" 0123456789012345678901234567890123456789012345678901234567890123456789 ").WrapAnywhere(); }); }); }); diff --git a/QuestPDF/Elements/Text/Items/TextBlockSpan.cs b/QuestPDF/Elements/Text/Items/TextBlockSpan.cs index 7fed20d..39d493e 100644 --- a/QuestPDF/Elements/Text/Items/TextBlockSpan.cs +++ b/QuestPDF/Elements/Text/Items/TextBlockSpan.cs @@ -102,7 +102,7 @@ namespace QuestPDF.Elements.Text.Items return (textLength, textLength + 1); // breaking anywhere - if (Style.BreakAnywhere ?? false) + if (Style.WrapAnywhere ?? false) return (textLength, textLength); // current line ends at word, next character is space, perfect place to wrap diff --git a/QuestPDF/Fluent/TextSpanDescriptorExtensions.cs b/QuestPDF/Fluent/TextSpanDescriptorExtensions.cs index 0421b5a..f30653b 100644 --- a/QuestPDF/Fluent/TextSpanDescriptorExtensions.cs +++ b/QuestPDF/Fluent/TextSpanDescriptorExtensions.cs @@ -63,9 +63,9 @@ namespace QuestPDF.Fluent return descriptor; } - public static T BreakAnywhere(this T descriptor, bool value = true) where T : TextSpanDescriptor + public static T WrapAnywhere(this T descriptor, bool value = true) where T : TextSpanDescriptor { - descriptor.TextStyle.BreakAnywhere = value; + descriptor.TextStyle.WrapAnywhere = value; return descriptor; } diff --git a/QuestPDF/Fluent/TextStyleExtensions.cs b/QuestPDF/Fluent/TextStyleExtensions.cs index e115f01..2686432 100644 --- a/QuestPDF/Fluent/TextStyleExtensions.cs +++ b/QuestPDF/Fluent/TextStyleExtensions.cs @@ -72,9 +72,9 @@ namespace QuestPDF.Fluent return style.Mutate(x => x.HasUnderline = value); } - public static TextStyle BreakAnywhere(this TextStyle style, bool value = true) + public static TextStyle WrapAnywhere(this TextStyle style, bool value = true) { - return style.Mutate(x => x.BreakAnywhere = value); + return style.Mutate(x => x.WrapAnywhere = value); } #region Weight diff --git a/QuestPDF/Infrastructure/TextStyle.cs b/QuestPDF/Infrastructure/TextStyle.cs index bdc216d..a0a72df 100644 --- a/QuestPDF/Infrastructure/TextStyle.cs +++ b/QuestPDF/Infrastructure/TextStyle.cs @@ -16,7 +16,7 @@ namespace QuestPDF.Infrastructure internal bool? IsItalic { get; set; } internal bool? HasStrikethrough { get; set; } internal bool? HasUnderline { get; set; } - internal bool? BreakAnywhere { get; set; } + internal bool? WrapAnywhere { get; set; } internal object PaintKey { get; private set; } internal object FontMetricsKey { get; private set; } @@ -32,7 +32,7 @@ namespace QuestPDF.Infrastructure IsItalic = false, HasStrikethrough = false, HasUnderline = false, - BreakAnywhere = false + WrapAnywhere = false }; public static TextStyle Default => new TextStyle(); @@ -60,7 +60,7 @@ namespace QuestPDF.Infrastructure IsItalic ??= parentStyle.IsItalic; HasStrikethrough ??= parentStyle.HasStrikethrough; HasUnderline ??= parentStyle.HasUnderline; - BreakAnywhere ??= parentStyle.BreakAnywhere; + WrapAnywhere ??= parentStyle.WrapAnywhere; } internal void OverrideStyle(TextStyle parentStyle) @@ -74,7 +74,7 @@ namespace QuestPDF.Infrastructure IsItalic = parentStyle.IsItalic ?? IsItalic; HasStrikethrough = parentStyle.HasStrikethrough ?? HasStrikethrough; HasUnderline = parentStyle.HasUnderline ?? HasUnderline; - BreakAnywhere = parentStyle.BreakAnywhere ?? BreakAnywhere; + WrapAnywhere = parentStyle.WrapAnywhere ?? WrapAnywhere; } internal TextStyle Clone()