pub struct ReleaseNotes { /* private fields */ }Expand description
An app’s versions, newest first: the list on the left, what the chosen one brought on the right, and buttons that walk from one to the next.
It shows whichever version selected points at, so the app opens it on the
one it wants to talk about. It goes inside a Dialog, or
anywhere else with room for its height. In a narrow window the list goes away
and the buttons remain.
use ravenrs_reactive::State;
use ravenrs_widgets::{ReleaseNote, ReleaseNotes, Tone};
let selected = State::new(0);
let notes = ReleaseNotes::new(
vec![
ReleaseNote::new("Version 1.3", "Faster start")
.date("Nov 1, 2026")
.badge("New", Tone::Success)
.changes(["Opens in half the time"])
.section("Why update", "Large files no longer stall the window."),
ReleaseNote::new("Version 1.2", "Dark theme").badge("Installed", Tone::Neutral),
],
selected.binding(),
);Implementations§
Source§impl ReleaseNotes
impl ReleaseNotes
Sourcepub fn new(notes: Vec<ReleaseNote>, selected: Binding<usize>) -> ReleaseNotes
pub fn new(notes: Vec<ReleaseNote>, selected: Binding<usize>) -> ReleaseNotes
The versions in notes, newest first, on the one at selected.
Sourcepub fn height(self, height: f32) -> ReleaseNotes
pub fn height(self, height: f32) -> ReleaseNotes
The height, in logical pixels (460 by default). Longer notes scroll.
Trait Implementations§
Source§impl Debug for ReleaseNotes
impl Debug for ReleaseNotes
Auto Trait Implementations§
impl !RefUnwindSafe for ReleaseNotes
impl !Send for ReleaseNotes
impl !Sync for ReleaseNotes
impl !UnwindSafe for ReleaseNotes
impl Freeze for ReleaseNotes
impl Unpin for ReleaseNotes
impl UnsafeUnpin for ReleaseNotes
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T, U> ToSample<U> for Twhere
U: FromSample<T>,
impl<T, U> ToSample<U> for Twhere
U: FromSample<T>,
fn to_sample_(self) -> U
Source§impl<V> ViewExt for Vwhere
V: View,
impl<V> ViewExt for Vwhere
V: View,
Source§fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
Adds padding inside the box, in logical pixels.
Source§fn background(self, fill: impl Into<Fill>) -> Styled<Self>
fn background(self, fill: impl Into<Fill>) -> Styled<Self>
Paints a background behind the content.
Source§fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
Fixes the width and/or height in logical pixels;
None keeps the content size.