Merge branch 'master' into wgpu/better-architecture

This commit is contained in:
Héctor Ramón Jiménez 2024-04-07 14:01:05 +02:00
commit 13289dbd19
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
41 changed files with 318 additions and 267 deletions

View file

@ -10,6 +10,9 @@ homepage.workspace = true
categories.workspace = true
keywords.workspace = true
[lints]
workspace = true
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
all-features = true

View file

@ -2,13 +2,6 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/iced-rs/iced/9ab6923e943f784985e9ef9ca28b10278297225d/docs/logo.svg"
)]
#![forbid(unsafe_code, rust_2018_idioms)]
#![deny(
missing_debug_implementations,
missing_docs,
unused_results,
rustdoc::broken_intra_doc_links
)]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
pub use iced_renderer as renderer;
pub use iced_renderer::graphics;

View file

@ -110,6 +110,21 @@ where
self
}
/// Sets the text size of the [`TextEditor`].
pub fn size(mut self, size: impl Into<Pixels>) -> Self {
self.text_size = Some(size.into());
self
}
/// Sets the [`text::LineHeight`] of the [`TextEditor`].
pub fn line_height(
mut self,
line_height: impl Into<text::LineHeight>,
) -> Self {
self.line_height = line_height.into();
self
}
/// Sets the [`Padding`] of the [`TextEditor`].
pub fn padding(mut self, padding: impl Into<Padding>) -> Self {
self.padding = padding.into();

View file

@ -713,7 +713,8 @@ where
match key.as_ref() {
keyboard::Key::Character("c")
if state.keyboard_modifiers.command() =>
if state.keyboard_modifiers.command()
&& !self.is_secure =>
{
if let Some((start, end)) =
state.cursor.selection(&self.value)
@ -727,7 +728,8 @@ where
return event::Status::Captured;
}
keyboard::Key::Character("x")
if state.keyboard_modifiers.command() =>
if state.keyboard_modifiers.command()
&& !self.is_secure =>
{
if let Some((start, end)) =
state.cursor.selection(&self.value)