fix(input): remember "draw with the finger", on by default on Android (Issue #50)

The setting was never saved and always started off, so one finger only
moved the page after every start. On a phone without a pen nothing could
be written until it was switched on again, and an update restarts the
app. It is now saved with the other UI settings and starts on on
Android, where phones usually have no pen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
haraldandClaude Opus 5.5 committed 2026-11-05 12:20:52 +01:00
1 parent 298932cb32
commit 0d9e9aa2ea
3 files changed
+28 -7

No files matched your search

+14 -7
View File
@@ -319,6 +319,8 @@ pub enum UiAction {
SetSidebarSide(SidebarSide),
/// Compute handwritten math after `=` on or off (Issue #46)
SetMathAssist(bool),
/// One finger draws or moves the page (saved, Issue #50)
SetTouchDraw(bool),
/// Sprache der Oberfläche; `None` = Sprache des Systems
SetLanguage(Option<crate::i18n::Language>),
/// Papierfarbe der Anzeige und Aufhellen dunkler Tinte (wird gespeichert)
@@ -4613,13 +4615,18 @@ pub fn render_ui(
});
section(ui, t!("EINGABE"));
ui.checkbox(
&mut state.touch_draw_enabled,
t!("Mit dem Finger zeichnen"),
)
.on_hover_text(
t!("Aus: ein Finger verschiebt, zwei Finger zoomen (empfohlen mit Stift).\nAn: ein Finger zeichnet."),
);
if ui
.checkbox(
&mut state.touch_draw_enabled,
t!("Mit dem Finger zeichnen"),
)
.on_hover_text(
t!("Aus: ein Finger verschiebt, zwei Finger zoomen (empfohlen mit Stift).\nAn: ein Finger zeichnet."),
)
.changed()
{
actions.push(UiAction::SetTouchDraw(state.touch_draw_enabled));
}
let mut math = state.math.enabled;
if ui
.checkbox(&mut math, t!("Formeln nach „=“ ausrechnen"))