Skip to content

Commit

Permalink
add_column: use weak color for descriptions
Browse files Browse the repository at this point in the history
This matches the figma

Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Feb 27, 2025
1 parent cee8ab7 commit 9713503
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/notedeck_columns/src/ui/add_column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ impl<'a> AddColumnView<'a> {
f.layout(
data.description.to_string(),
desc_max_font,
Color32::WHITE,
ui.style().visuals.noninteractive().fg_stroke.color,
max_wrap_width,
)
});
Expand Down Expand Up @@ -407,8 +407,8 @@ impl<'a> AddColumnView<'a> {
);

let wrap_width = max_width - (cur_icon_width + (icon_padding * 2.0));
let text_color = ui.ctx().style().visuals.text_color();
let fallback_color = ui.ctx().style().visuals.weak_text_color();
let text_color = ui.style().visuals.text_color();
let fallback_color = ui.style().visuals.noninteractive().fg_stroke.color;

let title_galley = painter.layout(
data.title.to_string(),
Expand All @@ -419,7 +419,7 @@ impl<'a> AddColumnView<'a> {
let desc_galley = painter.layout(
data.description.to_string(),
desc_cur_font,
text_color,
fallback_color,
wrap_width,
);

Expand All @@ -438,7 +438,7 @@ impl<'a> AddColumnView<'a> {
let icon_rect = Rect::from_center_size(pos2(cur_icon_x_pos, icon_cur_y), cur_icon_size);

icon_img.paint_at(ui, icon_rect);
painter.galley(title_corner_pos, title_galley, fallback_color);
painter.galley(title_corner_pos, title_galley, text_color);
painter.galley(desc_corner_pos, desc_galley, fallback_color);

helper.take_animation_response()
Expand Down

0 comments on commit 9713503

Please sign in to comment.