Skip to content

MacOS window doesn't round #3188

@unsecretised

Description

@unsecretised

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?

The window isn't having proper rounding, even when the container and the child element should
Image

        container(contents)
            .style(|_| iced::widget::container::Style {
                background: Some(iced::Background::Color(Color::TRANSPARENT)),
                text_color: None,
                border: iced::Border {
                    color: tile.config.theme.text_color(1.),
                    width: 1.,
                    radius: iced::border::Radius {
                        top_left: 20.,
                        top_right: 20.,
                        bottom_right: 20.,
                        bottom_left: 20.,
                    },
                },
                ..Default::default()
            })
            .padding(0)
            .clip(true)
            .into()

this is the return of my view fn and contents is:

        let title_input = text_input(tile.config.placeholder.as_str(), &tile.query)
            .on_input(move |a| Message::SearchQueryChanged(a, wid))
            .on_paste(move |a| Message::SearchQueryChanged(a, wid))
            .font(tile.config.theme.font())
            .on_submit_maybe({
                if !tile.results.is_empty() {
                    match tile.results.first().unwrap().to_owned().open_command {
                        AppCommand::Function(func) => Some(Message::RunFunction(func)),
                        AppCommand::Message(msg) => Some(msg),
                        AppCommand::Display => None,
                    }
                } else {
                    None
                }
            })
            .id("query")
            .width(Fill)
            .line_height(LineHeight::Relative(1.5))
            .style(|_, _| text_input_style(&tile.config.theme))
            .padding(20);

        let scrollbar_direction = if tile.config.theme.show_scroll_bar {
            Direction::Vertical(Scrollbar::new().width(2).scroller_width(2))
        } else {
            Direction::Vertical(Scrollbar::hidden())
        };
        let contents = match tile.page {
            Page::Main => {
                let mut search_results = Column::new();
                for result in &tile.results {
                    search_results = search_results.push(result.render(&tile.config.theme));
                }

                let scrollable = Scrollable::with_direction(search_results, scrollbar_direction);
                Column::new().push(title_input).push(scrollable)
            }
            Page::ClipboardHistory => {
                let mut clipboard_history = Column::new();
                for result in &tile.clipboard_content {
                    clipboard_history = clipboard_history
                        .push(result.render_clipboard_item(tile.config.theme.clone()));
                }
                let scrollable = Scrollable::with_direction(clipboard_history, scrollbar_direction);
                Column::new().push(title_input).push(scrollable)
            }
        };

What is the expected behavior?

The window should be rounded with the "corners" being transparent or some other way to make them not visible

Version

crates.io release

Operating System

Windows

Do you have any log output?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions