From 8676a9775fc05838db317a8efe3d631cfc34b758 Mon Sep 17 00:00:00 2001 From: blueJpg <2238288979@qq.com> Date: Sun, 28 Apr 2024 19:19:50 +0800 Subject: [PATCH] [*] improve ui --- src/version.rs | 2 +- ui/appwindow.slint | 3 --- ui/base/head.slint | 12 ++++++++++-- ui/panel/bodyer/favorite.slint | 1 + ui/panel/bodyer/rss.slint | 1 + 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/version.rs b/src/version.rs index a5e2abf..af505fe 100644 --- a/src/version.rs +++ b/src/version.rs @@ -1 +1 @@ -pub static VERSION: &str = "v0.7.6"; \ No newline at end of file +pub static VERSION: &str = "v0.7.7"; \ No newline at end of file diff --git a/ui/appwindow.slint b/ui/appwindow.slint index f7d0b42..b78fd8b 100644 --- a/ui/appwindow.slint +++ b/ui/appwindow.slint @@ -11,9 +11,6 @@ export component AppWindow inherits Window { preferred-width: Theme.default-width; preferred-height: Theme.default-height; - // width: Theme.default-width; - // height: Theme.default-height; - background: Theme.base-background-light; icon: Icons.brand; title: "rssbox"; diff --git a/ui/base/head.slint b/ui/base/head.slint index bf94131..f8b3a07 100644 --- a/ui/base/head.slint +++ b/ui/base/head.slint @@ -1,13 +1,16 @@ import { Theme, Icons } from "../theme.slint"; import { IconBtn } from "./icon-btn.slint"; +import { Divider } from "./divider.slint"; export component Head inherits Rectangle { height: Theme.header-height; + background: Theme.base-background-light; - in-out property title; + in-out property is-show-divider; + in-out property title; in-out property icon <=> ic.icon; in-out property icon-width <=> ic.icon-width; - in-out property hbox-alignment: LayoutAlignment.stretch; + in-out property hbox-alignment: LayoutAlignment.stretch; callback clicked <=> ic.clicked; @@ -26,4 +29,9 @@ export component Head inherits Rectangle { @children } + if is-show-divider : Divider { + x: 0; + y: root.height - self.height; + background: Theme.lighter-border-color; + } } diff --git a/ui/panel/bodyer/favorite.slint b/ui/panel/bodyer/favorite.slint index 73db4ba..9ff7326 100644 --- a/ui/panel/bodyer/favorite.slint +++ b/ui/panel/bodyer/favorite.slint @@ -9,6 +9,7 @@ import { Theme } from "../../theme.slint"; component FHead inherits Head { callback scroll-to-top <=> ta.clicked; + is-show-divider: true; icon: Icons.favorite-fill; title: Logic.tr(Store.is-cn, "收藏夹"); diff --git a/ui/panel/bodyer/rss.slint b/ui/panel/bodyer/rss.slint index 0bd0ae0..bbaf82a 100644 --- a/ui/panel/bodyer/rss.slint +++ b/ui/panel/bodyer/rss.slint @@ -11,6 +11,7 @@ component RHead inherits Head { icon: Icons.list; title: Logic.tr(Store.is-cn, "订阅"); + is-show-divider: true; HorizontalLayout { horizontal-stretch: 1;