Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Selectable to the default style #495

Merged
merged 1 commit into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,7 @@ define_builtin_props!(
FontStyle font_style nocb: Option<cosmic_text::Style> { inherited } = None,
CursorColor cursor_color nocb: Color {} = Color::BLACK.with_alpha_factor(0.3),
SelectionCornerRadius selection_corer_radius nocb: f64 {} = 1.,
Selectable selectable: bool {} = true,
TextOverflowProp text_overflow: TextOverflow {} = TextOverflow::Wrap,
LineHeight line_height nocb: Option<LineHeightValue> { inherited } = None,
AspectRatio aspect_ratio: Option<f32> {} = None,
Expand Down
8 changes: 3 additions & 5 deletions src/views/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use crate::{
event::{Event, EventPropagation},
id::ViewId,
keyboard::KeyEvent,
prop, prop_extractor,
prop_extractor,
style::{
CursorColor, FontProps, LineHeight, SelectionCornerRadius, SelectionStyle, Style,
TextColor, TextOverflow, TextOverflowProp,
CursorColor, FontProps, LineHeight, Selectable, SelectionCornerRadius, SelectionStyle,
Style, TextColor, TextOverflow, TextOverflowProp,
},
style_class,
unit::PxPct,
Expand All @@ -25,8 +25,6 @@ use taffy::tree::NodeId;

use super::{Decorators, TextCommand};

prop!(pub Selectable: bool {} = true);

prop_extractor! {
Extractor {
color: TextColor,
Expand Down