feat(ui): add discussions and semantic theming
Generate web discussion snapshots in CI; native builds use the public feed and an offline cache.
This commit is contained in:
parent
4bf14baea4
commit
28d8246c68
16 changed files with 960 additions and 98 deletions
|
|
@ -869,7 +869,7 @@ impl Ribbon {
|
|||
// on it flips that state instead of bubbling up to the row's
|
||||
// make-active handler (#133).
|
||||
let icon_btn = |bytes: &'static [u8], msg: Message| -> Element<'_, Message> {
|
||||
button(crate::ui::icons::raw(bytes, 14.0))
|
||||
button(crate::ui::icons::semantic(bytes, 14.0))
|
||||
.on_press(msg)
|
||||
.style(popup_row_style)
|
||||
.padding([2, 4])
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ pub(super) fn flush_small_col<'a>(
|
|||
pub(super) fn make_icon(icon: IconKind, size: f32) -> Element<'static, Message> {
|
||||
match icon {
|
||||
IconKind::Glyph(s) => text(s).size(size * 0.7).into(),
|
||||
IconKind::Svg(bytes) => icons::themed(bytes, size),
|
||||
IconKind::Svg(bytes) => icons::semantic(bytes, size),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ pub(super) fn start_dimmed(state: &ToggleState, event: &ModuleEvent) -> bool {
|
|||
&& !matches!(event, ModuleEvent::Command(c) if crate::app::commands::start_allowed(c))
|
||||
}
|
||||
|
||||
/// `make_icon`, greyed out when `dim` (SVGs render monochrome via tint).
|
||||
/// `make_icon`, faded when `dim` without flattening multi-colour SVGs.
|
||||
pub(super) fn make_icon_dim(icon: IconKind, size: f32, dim: bool) -> Element<'static, Message> {
|
||||
if !dim {
|
||||
return make_icon(icon, size);
|
||||
|
|
@ -149,7 +149,7 @@ pub(super) fn make_icon_dim(icon: IconKind, size: f32, dim: bool) -> Element<'st
|
|||
color: Some(theme.extended_palette().background.base.text.scale_alpha(0.42)),
|
||||
})
|
||||
.into(),
|
||||
IconKind::Svg(bytes) => icons::themed_disabled(bytes, size),
|
||||
IconKind::Svg(bytes) => icons::semantic_disabled(bytes, size),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -625,9 +625,9 @@ pub(super) fn render_large<'a>(
|
|||
let ll = info.map(|l| l.locked).unwrap_or(false);
|
||||
let is_open = open_dd.as_deref() == Some(LAYER_COMBO_ID);
|
||||
|
||||
let vis_icon = icons::raw(icons::layer_visible(lv), 14.0);
|
||||
let freeze_icon = icons::raw(icons::layer_freeze(lf), 14.0);
|
||||
let lock_icon = icons::raw(icons::layer_lock(ll), 14.0);
|
||||
let vis_icon = icons::semantic(icons::layer_visible(lv), 14.0);
|
||||
let freeze_icon = icons::semantic(icons::layer_freeze(lf), 14.0);
|
||||
let lock_icon = icons::semantic(icons::layer_lock(ll), 14.0);
|
||||
let swatch = container(text(""))
|
||||
.style(move |theme: &Theme| container::Style {
|
||||
background: Some(Background::Color(lc)),
|
||||
|
|
|
|||
Loading…
Reference in a new issue