iced icon indicating copy to clipboard operation
iced copied to clipboard

The button rendering part is missing

Open kumudiaorong opened this issue 10 months ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

Is this issue related to iced?

  • [X] My hardware is compatible and my graphics drivers are up-to-date.

What happened?

If I use Fill, part of the rendering is lost, but Fixed doesn't have this problem. image image

What is the expected behavior?

like the second photo

Version

crates.io release

Operating System

Linux

Do you have any log output?

No response

kumudiaorong avatar Sep 13 '23 11:09 kumudiaorong

Replace with text and specify width as fill to render correctly

Screenshot from 2023-09-14 09-10-19

If you do not specify the button width as fill, an error will still occur. However, if you specify the button parent component width as fill, you will find that the width is sufficient, but I don’t know why it is not rendered.

Screenshot from 2023-09-14 09-16-08

kumudiaorong avatar Sep 14 '23 01:09 kumudiaorong

If I set the height, the display will be abnormal. The following is the sample code

image

image

use iced::widget::Column;
use iced::widget::{self};
use iced::{executor, Application, Command, Element, Theme};

fn main() -> iced::Result {
    App::run(iced::Settings::default())
}

#[derive(Debug, Clone)]
pub struct App {}

impl Application for App {
    type Executor = executor::Default;
    type Message = ();
    type Theme = Theme;
    type Flags = ();

    fn new(_: Self::Flags) -> (Self, Command<Self::Message>) {
        (Self {}, Command::none())
    }

    fn title(&self) -> String {
        String::from("Qst")
    }

    fn update(&mut self, _: Self::Message) -> Command<Self::Message> {
        Command::none()
    }
    fn view(&self) -> Element<Self::Message> {
        widget::scrollable(Column::with_children(vec![widget::button(widget::text(
            "Visual Studio Code+",
        ))
        // .height(35)
        .into()]))
        .into()
    }
}

kumudiaorong avatar Sep 14 '23 05:09 kumudiaorong