Coder Social home page Coder Social logo

Comments (5)

ogoffart avatar ogoffart commented on July 21, 2024

You could use Rectangle for that, right?
Also you can add @children in your own component.

eg:

export component TopLevel { @children } 

from slint.

felipetesc avatar felipetesc commented on July 21, 2024

You could use Rectangle for that, right? Also you can add @children in your own component.

eg:

export component TopLevel { @children } 

Yes, it's possible to use rectangle, and I'm already using it while I'm configuring it's z property.
However every top level widget inheriting rectangle will need a way to control what components comes first and what components comes later.
For example, I'm creaing an app, which will have a menubar and I need to draw this widget after the toolbar element. Even though it's ok to put the menu bar after the tools bar, it seems wrong, and sometimes the behaviour we need is: if some event occurs to a given top level element the previous top level opened element is automatically closed. Maybe, by allowing us to access the end of the drawing loop we can have that easily.

There is also another point, with top level widgets, perhaps it will be a litle bit easier to create dockpanels, and fully dragable panels, because those componets will always deal with a layer closer to user, which can have predefined areas where we can place panels, and so on. Who knows, maybe SlintPad will benefit from this, and you won't need lumino anymore.

Nothing changes the fact it's alredy possible to create top level elements with Slint as it is, but with a lot of control code working inside the ui.
TopLevel as part of the default widget's list will make the life of every one better. AboutSlint can be used as a start point.

Thanks 4 your time.

Amazing project!

from slint.

ogoffart avatar ogoffart commented on July 21, 2024

I see, So you're looking at something like PopupWindow then.

from slint.

felipetesc avatar felipetesc commented on July 21, 2024

I see, So you're looking at something like PopupWindow then.

Yes, PopupWindow, as part of the default list of widgets, can do it all it's needed to the creation of menubars, dock panels, draggable widgets, dragging regions, droppable areas, popups, message boxes, touch and drag areas. Since, this library can be used with MCU(s), softbuffer (that's really great), that will bring a great flexibility. Why not to use z since it's already done ? Rust is faster than Slint, and pass this functionality to core of the Slint render runtime will allow faster drawing too. If we team up with UI designers this brings an over simplified way to achieve better results faster. I always think about how to create menus with css, for example. Unordered list for menus?That's wrong !

Again, thanks.

from slint.

ogoffart avatar ogoffart commented on July 21, 2024

Thanks.
I'll close this issue since this doesn't seem like something that is actionable. (PopupWindow has many bugs bug we have already issues for them)

from slint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.