feat: ellipsize text (#1132)

This commit is contained in:
Hojjat Abdollahi 2026-02-19 10:06:45 -07:00 committed by GitHub
parent 1f6086e5ea
commit b9bd773940
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 20 additions and 2 deletions

View file

@ -23,7 +23,7 @@ use iced::{
event, keyboard, mouse, touch, window,
};
use iced_core::mouse::ScrollDelta;
use iced_core::text::{LineHeight, Renderer as TextRenderer, Shaping, Wrapping};
use iced_core::text::{Ellipsize, LineHeight, Renderer as TextRenderer, Shaping, Wrapping};
use iced_core::widget::operation::Focusable;
use iced_core::widget::{self, operation, tree};
use iced_core::{Border, Point, Renderer as IcedRenderer, Shadow, Text};
@ -274,6 +274,7 @@ where
vertical_alignment: alignment::Vertical::Center,
shaping: Shaping::Advanced,
wrapping: Wrapping::None,
ellipsize: Ellipsize::None,
line_height: self.line_height,
};
@ -602,6 +603,7 @@ where
vertical_alignment: alignment::Vertical::Center,
shaping: Shaping::Advanced,
wrapping: Wrapping::default(),
ellipsize: Ellipsize::default(),
line_height: self.line_height,
})
});