Skip to content

Commit

Permalink
Lay copyright on top of image in http_cats example
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorstrate committed Nov 10, 2024
1 parent cf22cb7 commit b9c0556
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions xilem/examples/http_cats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use winit::window::Window;
use xilem::core::fork;
use xilem::core::one_of::OneOf3;
use xilem::view::{
button, flex, image, inline_prose, portal, prose, sized_box, spinner, worker, Axis, FlexExt,
FlexSpacer, Padding,
button, flex, image, inline_prose, portal, prose, sized_box, spinner, worker, zstack, Axis,
FlexExt, FlexSpacer, Padding,
};
use xilem::{Color, EventLoop, EventLoopBuilder, TextAlignment, WidgetView, Xilem};

Expand Down Expand Up @@ -197,10 +197,11 @@ impl Status {
.text_size(20.)
.alignment(TextAlignment::Middle),
FlexSpacer::Fixed(10.),
image,
// TODO: Overlay on top of the image?
sized_box(prose("Copyright ©️ https://http.cat").alignment(TextAlignment::End))
.padding(Padding::trailing(20.)),
zstack((
image,
sized_box(prose("Copyright ©️ https://http.cat").alignment(TextAlignment::End))
.padding((30., 40., 0., 0.)),
)),
))
.main_axis_alignment(xilem::view::MainAxisAlignment::Start)
}
Expand Down

0 comments on commit b9c0556

Please sign in to comment.