Rename horizontal_rule to rule and introduce Rule::vertical

This commit is contained in:
Héctor Ramón Jiménez 2025-09-11 06:51:53 +02:00
parent c70ce5af89
commit c684fbd6af
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
7 changed files with 63 additions and 86 deletions

View file

@ -51,10 +51,7 @@ use crate::core::theme;
use crate::core::{
self, Color, Element, Length, Padding, Pixels, Theme, color,
};
use crate::{
column, container, horizontal_rule, rich_text, row, rule, scrollable, span,
text, vertical_rule,
};
use crate::{column, container, rich_text, row, scrollable, span, text};
use std::borrow::BorrowMut;
use std::cell::{Cell, RefCell};
@ -1391,7 +1388,7 @@ where
Renderer: core::text::Renderer<Font = Font> + 'a,
{
row![
vertical_rule(4),
crate::rule(4).vertical(),
column(
contents
.iter()
@ -1413,7 +1410,7 @@ where
Theme: Catalog + 'a,
Renderer: core::text::Renderer<Font = Font> + 'a,
{
horizontal_rule(2).into()
crate::rule(2).into()
}
/// Displays a table using the default look.
@ -1637,8 +1634,8 @@ where
pub trait Catalog:
container::Catalog
+ scrollable::Catalog
+ rule::Catalog
+ text::Catalog
+ crate::rule::Catalog
+ crate::table::Catalog
{
/// The styling class of a Markdown code block.