selectable text option
Add a selectable text option to various note views. We don't want selection events to interfere with back drag, so this is the first step toward ensure back drag works. Vertical scrollviews also interfere with back drag, so we'll still need a way to compose gestures. It's not clear if this is currently possibly with egui (union of responses somehow maybe?) Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -110,6 +110,7 @@ fn render_note_contents(
|
||||
#[cfg(feature = "profiling")]
|
||||
puffin::profile_function!();
|
||||
|
||||
let selectable = options.has_selectable_text();
|
||||
let images: Vec<String> = vec![];
|
||||
let mut inline_note: Option<(&[u8; 32], &str)> = None;
|
||||
|
||||
@@ -173,7 +174,7 @@ fn render_note_contents(
|
||||
BlockType::Text => {
|
||||
#[cfg(feature = "profiling")]
|
||||
puffin::profile_scope!("text contents");
|
||||
ui.label(block.as_str());
|
||||
ui.add(egui::Label::new(block.as_str()).selectable(selectable));
|
||||
}
|
||||
|
||||
_ => {
|
||||
|
||||
Reference in New Issue
Block a user