Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
[*] improve ui
Browse files Browse the repository at this point in the history
  • Loading branch information
heng30 committed Jan 15, 2024
1 parent 6e027b4 commit 49e4f00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cpnews/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ impl App {

ui.add_space(theme::SPACING);

ui.label(&item.summary);
ui.label(
RichText::new(&item.summary)
.font(FontId::proportional(theme::NEWS_SUMMARY_FONT_SIZE)),
);

ui.add_space(theme::SPACING);

Expand Down
1 change: 1 addition & 0 deletions cpnews/src/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub const SMALL_ICON_SIZE: Vec2 = Vec2::new(20.0, 20.0);
pub const BACK_ICON_SIZE: Vec2 = Vec2::new(16.0, 16.0);

pub const NEWS_TITLE_FONT_SIZE: f32 = 16.0;
pub const NEWS_SUMMARY_FONT_SIZE: f32 = 15.0;
pub const NEWS_TITLE_COLOR: Color32 = Color32::from_rgb(0, 0, 200);

pub const BRAND_COLOR: Color32 = Color32::from_rgb(0, 0, 139);
Expand Down

0 comments on commit 49e4f00

Please sign in to comment.