You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Vicente de Rivera III <th...@gmail.com> on 2009/10/08 18:18:02 UTC

Re: TerraTheme json file

Is this still working? I can see TerraTheme_dark from
org.apache.pivot.tutorials

        args = new
String[]{"--terraColors=org/apache/pivot/tutorials/TerraTheme_dark.json"};
        DesktopApplicationContext.main(KitchenSink.class, args);

I'd like to set the default font size bigger, how do I do that?

thanks

On Tue, Sep 8, 2009 at 8:54 PM, Sandro Martini <sa...@gmail.com>wrote:

> Hi to all,
> I've just submitted this feature in Subversion, scheduled for the 1.3
> release.
>
> You can try it in the Kitchen Sink (at the moment from the trunk), but
> you have to pass a command-line argument like the following:
>
> --terraColors=org/apache/pivot/tutorials/TerraTheme_dark.json
> or
> --terraColors=org/apache/pivot/wtk/skin/terra/TerraTheme_test.json
>
> The TerraTheme_dark.json contains comments on the usage of Palette
> Colors from the TerraTheme, so you can make your experiments in a
> simpler way.
>
>
> Tell me what do you think.
>
> Bye,
> Sandro
>

Fwd: TerraTheme json file

Posted by Sandro Martini <sa...@gmail.com>.
Hi Greg,

>>> Really think this should get a demo, I'm sure lots of design hobbyist would love to create themes for Pivot.
>>
>> I agree completely with you, and this was one of my objectives for
>> enabling this feature ... i hope we can have time for the 1.4 release
>> to write something on this feature in one of out tutorials.
>
>I don't think there's enough here to justify a tutorial, but a demo would be effective and easy to write. We won't be releasing 1.4 for a while yet, so you have plenty of time to write one.
Ok, but an interesting example for this is one that containg many (if
not all) Pivot widgets, so what better than "Kitchen Sink" ?

So, instead of a full new example, I think only some text explaining
this feature (maybe inside one of existing pages, we have to choose)
could be enough.
For our users I think this is an interesting feature to show, because
gives them the ability to stylize/branding a little their
applications, in a limited (only colors) but simple way. Like
customizing only a little a css file for a web site.

But if wanted, i could try to make it for the 1.4 ...


Bye,
Sandro

Re: TerraTheme json file

Posted by Greg Brown <gk...@mac.com>.
>> Really think this should get a demo, I'm sure lots of design  
>> hobbyist would love to create themes for Pivot.
> I agree completely with you, and this was one of my objectives for
> enabling this feature ... i hope we can have time for the 1.4 release
> to write something on this feature in one of out tutorials.

I don't think there's enough here to justify a tutorial, but a demo  
would be effective and easy to write. We won't be releasing 1.4 for a  
while yet, so you have plenty of time to write one.

>> Is it possible to dynamically change themes?

No. We actually used to support this, but it wasn't very well tested,  
and it complicated the theming implementation. Since it is not a  
common use case, we dropped it. However, you can easily achieve  
something like this by simply restarting your app.

>> Also, can I set a default font for all button? I'd like to make  
>> them all Bold
> For this it's better an answer from Todd or Greg ...

This isn't currently supported. However, you can specify the URL of a  
JSON-based style declaration in the "styles" attribute of your buttons:

<PushButton buttonData="Click Me" styles="@button_styles.json"/>

button_styles.json:
{  font: {
     bold:true
   }
}


Re: TerraTheme json file

Posted by Sandro Martini <sa...@gmail.com>.
Hi Vicente,

> -Dorg.apache.pivot.wtk.skin.terra.location=org/apache/pivot/tutorials/TerraTheme_dark.json is infinitely Awesome!!
Thanks, it has been a little work from all us, but for users is a good feature.

> Really think this should get a demo, I'm sure lots of design hobbyist would love to create themes for Pivot.
I agree completely with you, and this was one of my objectives for
enabling this feature ... i hope we can have time for the 1.4 release
to write something on this feature in one of out tutorials.

To advance on this field we have some little enhancements to this, to
do as soon as possible.


> Is it possible to dynamically change themes?
For this it's better an answer from Todd or Greg ...

> Also, can I set a default font for all button? I'd like to make them all Bold
For this it's better an answer from Todd or Greg ...

Bye,
Sandro

Re: TerraTheme json file

Posted by Vicente de Rivera III <th...@gmail.com>.
-Dorg.apache.pivot.wtk.skin.terra.location=org/apache/pivot/tutorials/TerraTheme_dark.json
is infinitely Awesome!! Really think this should get a demo, I'm sure lots
of design hobbyist would love to create themes for Pivot.

Is it possible to dynamically change themes?

Also, can I set a default font for all button? I'd like to make them all
Bold

thanks!!

On Fri, Oct 9, 2009 at 1:51 AM, Todd Volkert <tv...@gmail.com> wrote:

> As you found, you can call theme.setFont() to override the the theme's
> font.  If you want to load a custom theme properties file (including the
> theme colors), this is now accomplished via the
> "org.apache.pivot.wtk.skin.terra.location" system property. If unspecified,
> this defaults to "org/apache/pivot/wtk/skin/terra/TerraTheme_default.json".
>
> -T
>
>
> On Thu, Oct 8, 2009 at 12:18 PM, Vicente de Rivera III <
> thirdy.derivera@gmail.com> wrote:
>
>> Is this still working? I can see TerraTheme_dark from
>> org.apache.pivot.tutorials
>>
>>         args = new
>> String[]{"--terraColors=org/apache/pivot/tutorials/TerraTheme_dark.json"};
>>         DesktopApplicationContext.main(KitchenSink.class, args);
>>
>> I'd like to set the default font size bigger, how do I do that?
>>
>> thanks
>>
>> On Tue, Sep 8, 2009 at 8:54 PM, Sandro Martini <sa...@gmail.com>wrote:
>>
>>> Hi to all,
>>> I've just submitted this feature in Subversion, scheduled for the 1.3
>>> release.
>>>
>>> You can try it in the Kitchen Sink (at the moment from the trunk), but
>>> you have to pass a command-line argument like the following:
>>>
>>> --terraColors=org/apache/pivot/tutorials/TerraTheme_dark.json
>>> or
>>> --terraColors=org/apache/pivot/wtk/skin/terra/TerraTheme_test.json
>>>
>>> The TerraTheme_dark.json contains comments on the usage of Palette
>>> Colors from the TerraTheme, so you can make your experiments in a
>>> simpler way.
>>>
>>>
>>> Tell me what do you think.
>>>
>>> Bye,
>>> Sandro
>>>
>>
>>
>

Re: TerraTheme json file

Posted by Todd Volkert <tv...@gmail.com>.
As you found, you can call theme.setFont() to override the the theme's
font.  If you want to load a custom theme properties file (including the
theme colors), this is now accomplished via the
"org.apache.pivot.wtk.skin.terra.location" system property. If unspecified,
this defaults to "org/apache/pivot/wtk/skin/terra/TerraTheme_default.json".

-T

On Thu, Oct 8, 2009 at 12:18 PM, Vicente de Rivera III <
thirdy.derivera@gmail.com> wrote:

> Is this still working? I can see TerraTheme_dark from
> org.apache.pivot.tutorials
>
>         args = new
> String[]{"--terraColors=org/apache/pivot/tutorials/TerraTheme_dark.json"};
>         DesktopApplicationContext.main(KitchenSink.class, args);
>
> I'd like to set the default font size bigger, how do I do that?
>
> thanks
>
> On Tue, Sep 8, 2009 at 8:54 PM, Sandro Martini <sa...@gmail.com>wrote:
>
>> Hi to all,
>> I've just submitted this feature in Subversion, scheduled for the 1.3
>> release.
>>
>> You can try it in the Kitchen Sink (at the moment from the trunk), but
>> you have to pass a command-line argument like the following:
>>
>> --terraColors=org/apache/pivot/tutorials/TerraTheme_dark.json
>> or
>> --terraColors=org/apache/pivot/wtk/skin/terra/TerraTheme_test.json
>>
>> The TerraTheme_dark.json contains comments on the usage of Palette
>> Colors from the TerraTheme, so you can make your experiments in a
>> simpler way.
>>
>>
>> Tell me what do you think.
>>
>> Bye,
>> Sandro
>>
>
>

Re: TerraTheme json file

Posted by Vicente de Rivera III <th...@gmail.com>.
whoa, this is cool, way easier than theme-ing Swing (although there's
Substance)
        Theme.getTheme().setFont(new Font(Font.SANS_SERIF, Font.BOLD, 14));

I think there should be tutorial for this, cool

On Fri, Oct 9, 2009 at 12:18 AM, Vicente de Rivera III <
thirdy.derivera@gmail.com> wrote:

> Is this still working? I can see TerraTheme_dark from
> org.apache.pivot.tutorials
>
>         args = new
> String[]{"--terraColors=org/apache/pivot/tutorials/TerraTheme_dark.json"};
>         DesktopApplicationContext.main(KitchenSink.class, args);
>
> I'd like to set the default font size bigger, how do I do that?
>
> thanks
>
> On Tue, Sep 8, 2009 at 8:54 PM, Sandro Martini <sa...@gmail.com>wrote:
>
>> Hi to all,
>> I've just submitted this feature in Subversion, scheduled for the 1.3
>> release.
>>
>> You can try it in the Kitchen Sink (at the moment from the trunk), but
>> you have to pass a command-line argument like the following:
>>
>> --terraColors=org/apache/pivot/tutorials/TerraTheme_dark.json
>> or
>> --terraColors=org/apache/pivot/wtk/skin/terra/TerraTheme_test.json
>>
>> The TerraTheme_dark.json contains comments on the usage of Palette
>> Colors from the TerraTheme, so you can make your experiments in a
>> simpler way.
>>
>>
>> Tell me what do you think.
>>
>> Bye,
>> Sandro
>>
>
>