Skip to content

Commit

Permalink
[*] improve ui
Browse files Browse the repository at this point in the history
  • Loading branch information
heng30 committed Apr 28, 2024
1 parent 8d1721a commit 8676a97
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/version.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pub static VERSION: &str = "v0.7.6";
pub static VERSION: &str = "v0.7.7";
3 changes: 0 additions & 3 deletions ui/appwindow.slint
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
12 changes: 10 additions & 2 deletions ui/base/head.slint
Original file line number Diff line number Diff line change
@@ -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<string> title;
in-out property <bool> is-show-divider;
in-out property <string> title;
in-out property icon <=> ic.icon;
in-out property icon-width <=> ic.icon-width;
in-out property<LayoutAlignment> hbox-alignment: LayoutAlignment.stretch;
in-out property <LayoutAlignment> hbox-alignment: LayoutAlignment.stretch;

callback clicked <=> ic.clicked;

Expand All @@ -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;
}
}
1 change: 1 addition & 0 deletions ui/panel/bodyer/favorite.slint
Original file line number Diff line number Diff line change
Expand Up @@ -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, "收藏夹");

Expand Down
1 change: 1 addition & 0 deletions ui/panel/bodyer/rss.slint
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8676a97

Please sign in to comment.