Introduce new iced_highlighter subcrate
This commit is contained in:
parent
c0a141ab02
commit
f806d001e6
9 changed files with 302 additions and 260 deletions
|
|
@ -1,6 +1,5 @@
|
|||
//! Change the appearance of a text editor.
|
||||
use crate::core::text::highlighter;
|
||||
use crate::core::{self, Background, BorderRadius, Color};
|
||||
use crate::core::{Background, BorderRadius, Color};
|
||||
|
||||
/// The appearance of a text input.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
|
|
@ -46,16 +45,3 @@ pub trait StyleSheet {
|
|||
/// Produces the style of a disabled text input.
|
||||
fn disabled(&self, style: &Self::Style) -> Appearance;
|
||||
}
|
||||
|
||||
pub trait Highlight<Font = core::Font, Theme = crate::Theme> {
|
||||
fn format(&self, theme: &Theme) -> highlighter::Format<Font>;
|
||||
}
|
||||
|
||||
impl<Font, Theme> Highlight<Font, Theme> for () {
|
||||
fn format(&self, _theme: &Theme) -> highlighter::Format<Font> {
|
||||
highlighter::Format {
|
||||
color: None,
|
||||
font: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue