pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark R. Chambers" <m...@mrchambers.org>
Subject RE: Inherited Styles in Sub Components
Date Tue, 28 Jan 2014 12:11:51 GMT
Hi Sandro,

1)	How do you set the font size for the tab label in a TabPane?
2)	How to set the background color of a Boxpane?
3)	Does anybody have a fully fleshed out .json file for most components
that we can use as a reference?
4)	I would recommend using overloaded stylename constructors.

It does seem like some fundamentals still need a bit of work in pivot, I am
continually finding things that don't seem intuitive.
Like for example:
1)	How do you set the font size for the label in a TabPane?
2)	How to set the background color of a Boxpane?

If anybody has a fully fleshed out .json file for most components that we
can use as a reference? I will finish filling it out and we can post it on
the Wiki somewhere.
Because currently that information is not available, it does not work in the
component explorer, and all of the tutorials and examples only show the
really basic stuff.. like color...

I would recommend using a standard approach to simple things like background
and foreground colors.
Also I would recommend using overloaded style constructors so that you can
add multiple styles to a component. So for example:
<BoxPane orientation="vertical" styleName="applicationstyle"
styleName="boxpanedefaultstyle" styles="{padding:4,
Also since no inheritance allow things like this:
        var vMainStyle = "applicationstyle";
<BoxPane orientation="vertical" styleName="$vMainStyle"
styleName="boxpanedefaultstyle" styles="{padding:4,

So then you .json file would be relatively simple.
Currently you basically need a different .json entry for each component in
your gui fully fleshed out... which makes it almost no improvement in
Also you get a huge number of warnings if you apply a generic fully fleshed
out style sheet to all components.

You would expect to be able to apply some values to every single component
and container. For example color and backgroundcolor...

-----Original Message-----
From: Sandro Martini [mailto:sandro.martini@gmail.com] 
Sent: Friday, 24 January 2014 5:30 AM
To: Users - Apache Pivot
Subject: Re: Inherited Styles in Sub Components

Hi Mark,
styles in Pivot are different than css styles in HTML, this is feature
discussed since the beginning of Pivot :-) .
But the visual appearance of components is handled by the Skin (where for
example there is a pre-defined color palette), and any Component has a
related skin visual counterpart ... there are some global settings (color
palette, fonts, etc) in the skin but components draw themselves.

I agree that we could improve this, so be free to add a JIRA as Improvement,
or write/attach some test/idea/sample code.

Some old discussion here:

Maybe using inline styles could help in your case now, some info here for

Tell us for more info.


2014/1/22 Ripgiblet <mark@mrchambers.org>:
> Should Styles of subcomponents inherit from their parent components in 
> Apache pivot?
> If not why not? and can we do this in the future?
> This is maybe a problem, or maybe a feature request.
> Currently my styles don't seem to be inherited to SubComponents, so I 
> have to set the styles manually for all sub components... Is this the 
> way it is supposed to work?
> If this is the case I would recommend adding an inherited style model 
> like HTML etc. So all styles are inherited from parent objects, unless 
> they are overridden.
> regards,
> Mark.
> --
> View this message in context: 
> http://apache-pivot-users.399431.n3.nabble.com/Inherited-Styles-in-Sub
> -Components-tp4022835.html Sent from the Apache Pivot - Users mailing 
> list archive at Nabble.com.

View raw message