diff options
| author | Polesznyák Márk <contact@pml68.dev> | 2026-02-06 09:52:41 +0100 |
|---|---|---|
| committer | Polesznyák Márk <contact@pml68.dev> | 2026-02-06 09:52:41 +0100 |
| commit | 90a8cf14cab1f9255e3c95f9c32c1845b475bf06 (patch) | |
| tree | 436a42643dd17648b6c111b9108746cbe581af22 | |
| parent | docs: update changelog (diff) | |
| download | iced_selection-90a8cf14cab1f9255e3c95f9c32c1845b475bf06.tar.gz | |
chore: update as necessary for upstream iced changes (PR#3238)
| -rw-r--r-- | src/text.rs | 7 | ||||
| -rw-r--r-- | src/text/rich.rs | 11 |
2 files changed, 6 insertions, 12 deletions
diff --git a/src/text.rs b/src/text.rs index 72bdbf8..433cf60 100644 --- a/src/text.rs +++ b/src/text.rs @@ -26,7 +26,6 @@ pub use text::{Fragment, Highlighter, IntoFragment, Span}; use crate::click; use crate::core::alignment; -use crate::core::clipboard; use crate::core::keyboard::{self, key}; use crate::core::layout; use crate::core::mouse; @@ -381,7 +380,6 @@ where layout: Layout<'_>, cursor: mouse::Cursor, _renderer: &Renderer, - clipboard: &mut dyn core::Clipboard, shell: &mut core::Shell<'_, Message>, viewport: &core::Rectangle, ) { @@ -493,9 +491,8 @@ where if state.keyboard_modifiers.command() && !state.selection.is_empty() => { - clipboard.write( - clipboard::Kind::Standard, - state.selection.text(&state.paragraph), + shell.write_clipboard( + state.selection.text(&state.paragraph).into(), ); shell.capture_event(); diff --git a/src/text/rich.rs b/src/text/rich.rs index c148566..60e2637 100644 --- a/src/text/rich.rs +++ b/src/text/rich.rs @@ -3,7 +3,6 @@ use iced_widget::graphics::text::cosmic_text; use crate::click; use crate::core::alignment; -use crate::core::clipboard; use crate::core::keyboard; use crate::core::keyboard::key; use crate::core::layout; @@ -15,8 +14,8 @@ use crate::core::touch; use crate::core::widget::text::{Alignment, LineHeight, Shaping, Wrapping}; use crate::core::widget::tree::{self, Tree}; use crate::core::{ - self, Clipboard, Element, Event, Font, Layout, Length, Pixels, Point, - Rectangle, Shell, Size, Vector, Widget, + self, Element, Event, Font, Layout, Length, Pixels, Point, Rectangle, + Shell, Size, Vector, Widget, }; use crate::selection::{Selection, SelectionEnd}; use crate::text::{Catalog, Dragging, Style, StyleFn}; @@ -557,7 +556,6 @@ where layout: Layout<'_>, cursor: mouse::Cursor, _renderer: &Renderer, - clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, Message>, viewport: &Rectangle, ) { @@ -711,9 +709,8 @@ where if state.keyboard_modifiers.command() && !state.selection.is_empty() => { - clipboard.write( - clipboard::Kind::Standard, - state.selection.text(&state.paragraph), + shell.write_clipboard( + state.selection.text(&state.paragraph).into(), ); shell.capture_event(); |
