diff --git a/ui/components/story.slint b/ui/components/story.slint index 740abb3..8fd6d90 100644 --- a/ui/components/story.slint +++ b/ui/components/story.slint @@ -59,23 +59,6 @@ export component StoryView { callback load-game(); callback stop-video(); - TouchArea { - width: parent.width; - height: parent.height; - - scroll-event(event) => { - if (root.is-video) { - accept - } else if (event.delta-y > 0) { - root.backlog(); - is_backlog = true; - accept - } else { - reject - } - } - } - Rectangle { width: container-width; height: container-height; @@ -91,6 +74,18 @@ export component StoryView { root.clicked(); } } + + scroll-event(event) => { + if (root.is-video) { + accept + } else if (event.delta-y > 0) { + root.backlog(); + is_backlog = true; + accept + } else { + reject + } + } } // 背景图片 diff --git a/ui/main_window.slint b/ui/main_window.slint index 0f7cb01..1a6287c 100644 --- a/ui/main_window.slint +++ b/ui/main_window.slint @@ -65,6 +65,8 @@ export component MainWindow inherits Window { width: parent.width; height: parent.height; + init => { self.focus(); } + key-pressed(event) => { if (event.text == Key.F11) { root.toggle-fullscreen();