Michael Murphy (S76)

I’m a System76 engineer / Pop!_OS maintainer. I’ve been a Linux user since 2007; and Rust since 2015. I’m currently working on COSMIC-related projects.

  • 56 Posts
  • 278 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle


  • In practice, because Rust libraries are always statically-linked, the MPL-2.0 is equivalent to the LGPL in spirit. Meanwhile, because of the static linking restrictions in the LGPL, the LGPL is effectively no different from the GPL. Hence, you’re going to find a lot of open source copyleft projects from the Rust ecosystem preferring either GPL or MPL-2.0, where MPL-2.0 is used in libraries where LGPL would have used previously in C projects. Dynamic linking is essentially going the way of the Dodo.

















  • You can either return cosmic::Element<Message>, impl Into<cosmic::Element<Message>>, or cosmic::widget::Button<Message> with your functions.

    Every widget can .into() or .apply(Element::from) into a cosmic::Element.

    I’d recommend using the Grid widget so that your buttons can scale with the window.

    cosmic::widget::grid()
        .push(widget1())
        .push(widget2())
        .push(widget3())
        .insert_row()
        .push(widget4())
        .push(widget5())
        .push(widget6())
        .row_spacing(12)
        .column_spacing(12)
        .justify_content(JustifyContent::Stretch)
        .width(Length::Fill)
        .height(Length::Fill)
        .into()