Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Theming

Theme inheritance or 'fallback' theme

 

 

MythTV theming RSS feed   Index | Next | Previous | View Threaded


cpinkham at bc2va

May 2, 2012, 9:46 AM

Post #1 of 13 (2235 views)
Permalink
Theme inheritance or 'fallback' theme

I want to get an opinion on whether people see a feature
as having any value before I investigate it further.

I've mentioned in IRC several times about an idea I had about
allowing theme inheritance or the concept of a 'fallback'
theme that would be used before falling back to default or
default-wide.

It's a simple concept so I worked up a patch last night to
test the theory. Basically, a theme would be allowed to
define a <fallbackTheme> tag in themeinfo.xml. The
fallbackTheme would be added to the search path before
the default-wide and default theme directories. This would
allow a themer to create variations on a theme by just
creating a new directory containing at a minimum a themeinfo.xml
and base.xml.

This would allow a lot of different scenarios without having to
duplicate everything in the base theme, here are a couple
examples:

- Base 16:9 theme and -narrow 4:3 version
- the -narrow version could just redefine .xml and use the
images from the base
- Base theme and -blue, -red, -green variations
- the -COLOR versions could just supply some different images
or .xml depending on what colors were changing.
- Base theme and -over40 version
- the -over40 version could just have changes to the .xml to
use larger font sizes.

I think this might make it easier for new themers to play with
things because they only need to override .xml and image files,
they wouldn't have to start with a full copy of a theme and
hacking away.

--
Chris
_______________________________________________
mythtv-theming mailing list
mythtv-theming [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-theming


jppoet at gmail

May 2, 2012, 9:30 AM

Post #2 of 13 (2154 views)
Permalink
Re: Theme inheritance or 'fallback' theme [In reply to]

On Wed, May 2, 2012 at 10:46 AM, Chris Pinkham <cpinkham [at] bc2va> wrote:
> I want to get an opinion on whether people see a feature
> as having any value before I investigate it further.
>
> I've mentioned in IRC several times about an idea I had about
> allowing theme inheritance or the concept of a 'fallback'
> theme that would be used before falling back to default or
> default-wide.
>
> It's a simple concept so I worked up a patch last night to
> test the theory.  Basically, a theme would be allowed to
> define a <fallbackTheme> tag in themeinfo.xml.  The
> fallbackTheme would be added to the search path before
> the default-wide and default theme directories.  This would
> allow a themer to create variations on a theme by just
> creating a new directory containing at a minimum a themeinfo.xml
> and base.xml.
>
> This would allow a lot of different scenarios without having to
> duplicate everything in the base theme, here are a couple
> examples:
>
> - Base 16:9 theme and -narrow 4:3 version
>  - the -narrow version could just redefine .xml and use the
>    images from the base
> - Base theme and -blue, -red, -green variations
>  - the -COLOR versions could just supply some different images
>    or .xml depending on what colors were changing.
> - Base theme and -over40 version
>  - the -over40 version could just have changes to the .xml to
>    use larger font sizes.
>
> I think this might make it easier for new themers to play with
> things because they only need to override .xml and image files,
> they wouldn't have to start with a full copy of a theme and
> hacking away.

Interesting idea. If someone downloads a theme which uses
<fallbackTheme>, the system would automatically download that
dependency as well?

John
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
_______________________________________________
mythtv-theming mailing list
mythtv-theming [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-theming


managementboy at gmail

May 2, 2012, 11:08 AM

Post #3 of 13 (2164 views)
Permalink
Re: Theme inheritance or 'fallback' theme [In reply to]

Hi Chris,

I like the idea. I am sure some people use my themes by changing them
to their needs. This would help them a lot.

Cheers,

Elkin
_______________________________________________
mythtv-theming mailing list
mythtv-theming [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-theming


mtdean at thirdcontact

May 2, 2012, 11:39 AM

Post #4 of 13 (2153 views)
Permalink
Re: Theme inheritance or 'fallback' theme [In reply to]

On 05/02/2012 12:46 PM, Chris Pinkham wrote:
> I want to get an opinion on whether people see a feature
> as having any value before I investigate it further.
>
> I've mentioned in IRC several times about an idea I had about
> allowing theme inheritance or the concept of a 'fallback'
> theme that would be used before falling back to default or
> default-wide.
>
> It's a simple concept so I worked up a patch last night to
> test the theory. Basically, a theme would be allowed to
> define a<fallbackTheme> tag in themeinfo.xml. The
> fallbackTheme would be added to the search path before
> the default-wide and default theme directories. This would
> allow a themer to create variations on a theme by just
> creating a new directory containing at a minimum a themeinfo.xml
> and base.xml.
>
> This would allow a lot of different scenarios without having to
> duplicate everything in the base theme, here are a couple
> examples:
>
> - Base 16:9 theme and -narrow 4:3 version
> - the -narrow version could just redefine .xml and use the
> images from the base
> - Base theme and -blue, -red, -green variations
> - the -COLOR versions could just supply some different images
> or .xml depending on what colors were changing.
> - Base theme and -over40 version
> - the -over40 version could just have changes to the .xml to
> use larger font sizes.
>
> I think this might make it easier for new themers to play with
> things because they only need to override .xml and image files,
> they wouldn't have to start with a full copy of a theme and
> hacking away.

I think it's a great idea--and fits well with my plan to make
default/default-wide full-fledged user-selectable themes that are
available in both 16:9 and 4:3 versions.

I'd been wanting to recommend a switch to Steppes as the new
default--since it's a great theme and, TTBOMK, the only one that's
available in 16:9 and 4:3 versions--but since its design wouldn't
necessarily "fit" well with other theme styles/designs (since it's not a
neutral style with traditional design), was afraid that it would be too
different from many of the other themes to work as a good fallback.
This would allow themers to choose a more-appropriate,
more-closely-designed fallback, even if the default/default-wide themes
were useful/pretty/non-neutral/non-boring themes.

Mike
_______________________________________________
mythtv-theming mailing list
mythtv-theming [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-theming


cpinkham at bc2va

May 2, 2012, 12:32 PM

Post #5 of 13 (2141 views)
Permalink
Re: Theme inheritance or 'fallback' theme [In reply to]

* On Wed May 02, 2012 at 10:30:41AM -0600, John P Poet wrote:
> Interesting idea. If someone downloads a theme which uses
> <fallbackTheme>, the system would automatically download that
> dependency as well?

Yes, that's the part of the patch that I didn't want to delve into
unless there was support for the idea. I'd modify the Theme Chooser
to understand the dependency and install the fallback theme as well.
We'd also probably want something like a fallbackThemeVersion as well
to specify that MyTheme-narrow v1.5 depended on MyTheme-wide v1.5.

Stuart Morgan has also mentioned adding a field to the themeinfo.xml
file to indicate which version of MythTV a particular theme version
was compatible with. I'd need to handle that as well to make sure
that the theme and it's fallback were compatible with the same version
of MythTV.

--
Chris
_______________________________________________
mythtv-theming mailing list
mythtv-theming [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-theming


miststlkr at gmail

May 2, 2012, 1:32 PM

Post #6 of 13 (2145 views)
Permalink
Re: Theme inheritance or 'fallback' theme [In reply to]

I think it is a great idea. The "themes" I do for my systems are almost
always an existing theme with some tweaks for personal preference so i copy
s theme, rename it something like "Arclite Custom" and fiddle with the xml
for things like clock placement, colors, font size, etc. I would
absolutely use the inheritance system if implemented.
On May 2, 2012 12:32 PM, "Chris Pinkham" <cpinkham [at] bc2va> wrote:

> * On Wed May 02, 2012 at 10:30:41AM -0600, John P Poet wrote:
> > Interesting idea. If someone downloads a theme which uses
> > <fallbackTheme>, the system would automatically download that
> > dependency as well?
>
> Yes, that's the part of the patch that I didn't want to delve into
> unless there was support for the idea. I'd modify the Theme Chooser
> to understand the dependency and install the fallback theme as well.
> We'd also probably want something like a fallbackThemeVersion as well
> to specify that MyTheme-narrow v1.5 depended on MyTheme-wide v1.5.
>
> Stuart Morgan has also mentioned adding a field to the themeinfo.xml
> file to indicate which version of MythTV a particular theme version
> was compatible with. I'd need to handle that as well to make sure
> that the theme and it's fallback were compatible with the same version
> of MythTV.
>
> --
> Chris
> _______________________________________________
> mythtv-theming mailing list
> mythtv-theming [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-theming
>


killerkiwi2005 at gmail

May 2, 2012, 4:27 PM

Post #7 of 13 (2144 views)
Permalink
Re: Theme inheritance or 'fallback' theme [In reply to]

Would be awesome, as usually I tweak the background image/colors when I
get bored of a theme but other wise don't change any thing

Jason Taylor
--
"Weekends don't count unless you spend them doing something completely
pointless. " - Calven


mtdean at thirdcontact

May 2, 2012, 4:36 PM

Post #8 of 13 (2143 views)
Permalink
Re: Theme inheritance or 'fallback' theme [In reply to]

On 05/02/2012 07:27 PM, Jason Taylor wrote:
> Would be awesome, as usually I tweak the background image/colors when
> I get bored of a theme but other wise don't change any thing

And, for those who are taking this approach to customizing themes, it
would allow them to still pick up changes to the upstream/"starting"
themes without having to re-apply their changes.

(But it begs the question how much fallback support do we need--i.e. if
the fallback theme specifies a fallback theme...)

Mike
_______________________________________________
mythtv-theming mailing list
mythtv-theming [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-theming


cpinkham at bc2va

May 2, 2012, 8:06 PM

Post #9 of 13 (2148 views)
Permalink
Re: Theme inheritance or 'fallback' theme [In reply to]

* On Wed May 02, 2012 at 07:36:53PM -0400, Michael T. Dean wrote:
> (But it begs the question how much fallback support do we need--i.e.
> if the fallback theme specifies a fallback theme...)

I wasn't planning on supporting multiple inheritance. It's probably
only 10-20 more lines of code to recurse through on the libmythui
side, but I don't want to have to deal with that at the Theme Chooser
side, so I think it's just easier to say no multi-level inheritance.

--
Chris
_______________________________________________
mythtv-theming mailing list
mythtv-theming [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-theming


jyavenard at gmail

May 2, 2012, 9:45 PM

Post #10 of 13 (2142 views)
Permalink
Re: Theme inheritance or 'fallback' theme [In reply to]

On 3 May 2012 13:06, Chris Pinkham <cpinkham [at] bc2va> wrote:
> I wasn't planning on supporting multiple inheritance.  It's probably
> only 10-20 more lines of code to recurse through on the libmythui
> side, but I don't want to have to deal with that at the Theme Chooser
> side, so I think it's just easier to say no multi-level inheritance.

I'm waiting for a theme the default back to one, which default back to
one ..... which default back to the first :)
_______________________________________________
mythtv-theming mailing list
mythtv-theming [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-theming


federico.ferri at yahoo

May 3, 2012, 1:09 AM

Post #11 of 13 (2147 views)
Permalink
Re: Theme inheritance or 'fallback' theme [In reply to]

In data mercoledė 2 maggio 2012 12:46:25, Chris Pinkham ha scritto:
> I want to get an opinion on whether people see a feature
> as having any value before I investigate it further.
>
> I've mentioned in IRC several times about an idea I had about
> allowing theme inheritance or the concept of a 'fallback'
> theme that would be used before falling back to default or
> default-wide.
>
> It's a simple concept so I worked up a patch last night to
> test the theory. Basically, a theme would be allowed to
> define a <fallbackTheme> tag in themeinfo.xml. The
> fallbackTheme would be added to the search path before
> the default-wide and default theme directories. This would
> allow a themer to create variations on a theme by just
> creating a new directory containing at a minimum a themeinfo.xml
> and base.xml.
>
> This would allow a lot of different scenarios without having to
> duplicate everything in the base theme, here are a couple
> examples:
>
> - Base 16:9 theme and -narrow 4:3 version
> - the -narrow version could just redefine .xml and use the
> images from the base
> - Base theme and -blue, -red, -green variations
> - the -COLOR versions could just supply some different images
> or .xml depending on what colors were changing.
> - Base theme and -over40 version
> - the -over40 version could just have changes to the .xml to
> use larger font sizes.
>
> I think this might make it easier for new themers to play with
> things because they only need to override .xml and image files,
> they wouldn't have to start with a full copy of a theme and
> hacking away.
>
> --
> Chris
> _______________________________________________
> mythtv-theming mailing list
> mythtv-theming [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-theming


Hi,
i think it's a very good idea!
Themers who wants to get different versions but especially for no-themers who want to customize one...

I did it before start on developing a-forest

Bye,
Federico
_______________________________________________
mythtv-theming mailing list
mythtv-theming [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-theming


cpinkham at bc2va

May 3, 2012, 7:26 AM

Post #12 of 13 (2135 views)
Permalink
Re: Theme inheritance or 'fallback' theme [In reply to]

* On Thu May 03, 2012 at 02:45:53PM +1000, Jean-Yves Avenard wrote:
> On 3 May 2012 13:06, Chris Pinkham <cpinkham [at] bc2va> wrote:
> > I wasn't planning on supporting multiple inheritance.  It's probably
> > only 10-20 more lines of code to recurse through on the libmythui
> > side, but I don't want to have to deal with that at the Theme Chooser
> > side, so I think it's just easier to say no multi-level inheritance.
>
> I'm waiting for a theme the default back to one, which default back to
> one ..... which default back to the first :)

Yeah, and I guess I probably should add a couple lines of code to make
sure that a theme doesn't fallback to itself. :) More importantly for the
Theme Chooser download side than the search optimization in libmythui.

--
Chris
_______________________________________________
mythtv-theming mailing list
mythtv-theming [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-theming


cpinkham at bc2va

May 3, 2012, 5:39 PM

Post #13 of 13 (2137 views)
Permalink
Re: Theme inheritance or 'fallback' theme [In reply to]

* On Thu May 03, 2012 at 10:26:38AM -0400, Chris Pinkham wrote:
> Yeah, and I guess I probably should add a couple lines of code to make
> sure that a theme doesn't fallback to itself. :) More importantly for the
> Theme Chooser download side than the search optimization in libmythui.

If fixed this as well as the startup background issue, we weren't
falling back searching for qtlook.txt in anything other than the actual
theme dir. My patch fixes this to do the same fallback search as we do
for other files. The only remaining issue I know of is to handle the
random image loading like Arclight uses for it's Backgroups/
subdirectory. Then I can tackle the theme chooser side of things.

--
Chris
_______________________________________________
mythtv-theming mailing list
mythtv-theming [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-theming

MythTV theming RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.