From a4af235eaba95528ac6c41209afb0ecf30aaa6df Mon Sep 17 00:00:00 2001 From: Developer Date: Sun, 24 May 2026 07:56:13 +0800 Subject: [PATCH] ui: move sidebar toggle button to left side next to back button --- src/reader.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/reader.rs b/src/reader.rs index 3f2a5b4..8ea9501 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -324,6 +324,9 @@ pub fn reading_view( if ui.button("← 返回").on_hover_text("返回书架").clicked() { action.go_back = true; } + if ui.button("☰").on_hover_text("打开/关闭目录").clicked() { + *sidebar_open = !*sidebar_open; + } ui.separator(); ui.label(format!("《{}》", &book.title)); ui.label(format!("[{}]", book.layout.label())); @@ -390,9 +393,6 @@ pub fn reading_view( } }); } - if ui.button("☰").on_hover_text("打开/关闭目录").clicked() { - *sidebar_open = !*sidebar_open; - } }); }); });