-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Is your issue REALLY a bug?
- My issue is indeed a bug!
- I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.
Is there an existing issue for this?
- I have searched the existing issues.
Is this issue related to iced?
- My hardware is compatible and my graphics drivers are up-to-date.
What happened?
When running under the tiny-skia renderer, the window doesn't refresh, and the right side is cut off.
A minimal reproduction:
use iced::alignment::Horizontal;
use iced::widget::{self, row, text};
use iced::{time, Element, Length, Subscription, Task};
use std::time::Duration;
struct Minimal {
value: u32,
}
#[derive(Debug, Clone)]
pub enum Message {
Tick,
}
impl Minimal {
fn new() -> (Self, Task<Message>) {
(Self { value: 0 }, widget::focus_next())
}
fn update(&mut self, message: Message) -> Task<Message> {
match message {
Message::Tick => {
self.value += 1;
}
}
Task::none()
}
fn subscription(&self) -> Subscription<Message> {
time::every(Duration::from_secs(1)).map(|_instant| Message::Tick)
}
fn view(&self) -> Element<Message> {
row![text("Value"), text(format!("{}%", self.value)).width(Length::Fill).align_x(Horizontal::Right)]
.padding([0, 10])
.into()
}
}
pub fn main() {
let _ = iced::application("minimal", Minimal::update, Minimal::view)
.subscription(Minimal::subscription)
.run_with(Minimal::new);
}My Cargo.toml:
[package]
name = "minimal"
version = "0.2.0"
edition = "2021"
[dependencies]
iced = { version = "0.13.1", features = ["tokio"] }
[build-dependencies]
iced = "0.13.1"
[profile.release]
strip = true
lto = true
codegen-units = 1What is the expected behavior?
Behaves the same as the wgpu renderer.
Version
crates.io release
Operating System
Arch Linux X11
Do you have any log output?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
