javascript API for setting up interface defaults

Marco Martin notmart at gmail.com
Thu Sep 1 14:43:04 UTC 2011


On Thursday 01 September 2011, Aaron J. Seigo wrote:
> or, put another way, how much influence do we wish to give the javascript
> setup on the shape of the shell?
> 
> i'd rather see the QML define the shell, and the javascript merely populate
> it. in which case the JS should only be able to see which panels are
> available. it would be very smart imho if those panels were given some

+1
the homescreen root element could expose some well defined/documented 
properties that the js gets to read..

> meaning as well: the StatusPanel, for instance, would be where all status
> icons and what not would go.
> 
> in fact, i almost wonder if these two things shouldn't just come together:
> the homescreen qml and the javascript that populates it on first run. if
> you want to change the javascript, you ship a new package with the

either if whe chose to run that js in the same engine of the qml shell or not, 
i would like to distribute the js in the same package of the shell.

there could be perhaps some path that can "override" the js in the shell 
package, for easier customizations.


> of communicating "left, right, center" to the containment when asking for
> the addition of the widget. the containment could even perhaps advertise
> where it allows widgets to be added, giving various keywords.
> 
> i haven't figured out how to do this yet in the code, but from an API
> perspective it's, at least to me, the obviously right thing to do.

to me as well, was simply implementation detail doubts ;)
(could also get done by writing in the configuration, hmm...)

> > but it could be easily converted in number of cells, so:
> > Application:0,0,1,1;Resource:1,3,4,1;
> 
> how are the cells calculated currently? is there a fixed unit (e.g. 178px)?
> is the unit based on screen resolution? etc...

yes there is a fixed size for a "cell", right now is just defined in a js file 
in a single location, will be trivial making it calculate from screen 
resolution, dpi, whatever is available or gives good results.

also, if nothing or a fixed taken cell is given, the boxes will be laid out 
like text: starting from upper left corner to the right, ging to a new line 
when needed etc

-- 
Marco Martin


More information about the Active mailing list