Skip to content

Commit

Permalink
Add selectable to the default style (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmoulton authored Jun 8, 2024
1 parent cf87613 commit a974e2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
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

0 comments on commit a974e2e

Please sign in to comment.