From rjmorris.list at zoho.com Sat Mar 16 15:41:55 2013
From: rjmorris.list at zoho.com (Joey Morris)
Date: Sat, 16 Mar 2013 11:41:55 -0400
Subject: [mythtv-theming] can't override size of checkbox
Message-ID: <20130316154155.GW31227@conquistador.dnsalias.org>
I'm running 0.26-fixes. I've defined a checkbox widget in base.xml
that looks something like this:
0,0,80,30
...
In recordings-ui.xml, I want to inherit from base_checkbox and
override the y-position and the width, so I tried this:
0,120,500,30
However, only the y-position was changed. The width was still 80. I
also tested the height, and I couldn't override that, either. I looked
at a few themes, and I could only find examples of people overriding
the checkbox's position, never its size. Is the inability to override
the size a design decision or a bug?
The reason I want to change the width is that I'm trying to highlight
both the box itself and the textarea beside the box when the checkbox
is selected. If I make the checkbox wide enough to accommodate both
the box and the textarea, when I change the background color of the
checkbox it will also change the background color of the textarea. The
space allocated to the textarea may be different in the various places
checkboxes are used.
From mythtv at comhem.se Sat Mar 16 17:55:00 2013
From: mythtv at comhem.se (Jonatan Lindblad)
Date: Sat, 16 Mar 2013 18:55:00 +0100
Subject: [mythtv-theming] can't override size of checkbox
In-Reply-To: <20130316154155.GW31227@conquistador.dnsalias.org>
References: <20130316154155.GW31227@conquistador.dnsalias.org>
Message-ID: <5144B1F4.2010907@comhem.se>
On 2013-03-16 16:41, Joey Morris wrote:
> I'm running 0.26-fixes. I've defined a checkbox widget in base.xml
> that looks something like this:
>
>
> 0,0,80,30
> ...
>
>
> In recordings-ui.xml, I want to inherit from base_checkbox and
> override the y-position and the width, so I tried this:
>
>
> 0,120,500,30
>
>
> However, only the y-position was changed. The width was still 80. I
> also tested the height, and I couldn't override that, either. I looked
> at a few themes, and I could only find examples of people overriding
> the checkbox's position, never its size. Is the inability to override
> the size a design decision or a bug?
It would help if you showed us the complete definition of base_checkbox,
although I think you're simply not setting the area of the statetypes or
their children to say 0,0,100%,100%.
--
Jonatan
From rjmorris.list at zoho.com Sat Mar 16 19:26:14 2013
From: rjmorris.list at zoho.com (Joey Morris)
Date: Sat, 16 Mar 2013 15:26:14 -0400
Subject: [mythtv-theming] can't override size of checkbox
In-Reply-To: <5144B1F4.2010907@comhem.se>
References: <20130316154155.GW31227@conquistador.dnsalias.org>
<5144B1F4.2010907@comhem.se>
Message-ID: <20130316192614.GX31227@conquistador.dnsalias.org>
Jonatan Lindblad wrote on Sat, Mar 16, 2013 at 06:55:00PM +0100:
> On 2013-03-16 16:41, Joey Morris wrote:
> >I'm running 0.26-fixes. I've defined a checkbox widget in base.xml
> >that looks something like this:
> >
> >
> > 0,0,80,30
> > ...
> >
> >
> >In recordings-ui.xml, I want to inherit from base_checkbox and
> >override the y-position and the width, so I tried this:
> >
> >
> > 0,120,500,30
> >
> >
> >However, only the y-position was changed. The width was still 80. I
> >also tested the height, and I couldn't override that, either. I looked
> >at a few themes, and I could only find examples of people overriding
> >the checkbox's position, never its size. Is the inability to override
> >the size a design decision or a bug?
>
> It would help if you showed us the complete definition of
> base_checkbox, although I think you're simply not setting the area
> of the statetypes or their children to say 0,0,100%,100%.
I've had problems in the past setting the area appropriately for
statetypes, so that very well could be the problem. Here's my full
base_checkbox:
0,0,80,34
0,0,100%,100%
0,0,100%,100%
box
10,9,16,16
box
0,0,100%,100%
box
0,0,100%,100%
10,9,16,16
box
10,17,16,8
From mythtv at comhem.se Sat Mar 16 21:03:33 2013
From: mythtv at comhem.se (Jonatan Lindblad)
Date: Sat, 16 Mar 2013 22:03:33 +0100
Subject: [mythtv-theming] can't override size of checkbox
In-Reply-To: <20130316192614.GX31227@conquistador.dnsalias.org>
References: <20130316154155.GW31227@conquistador.dnsalias.org>
<5144B1F4.2010907@comhem.se>
<20130316192614.GX31227@conquistador.dnsalias.org>
Message-ID: <5144DE25.1010007@comhem.se>
On 2013-03-16 20:26, Joey Morris wrote:
> Jonatan Lindblad wrote on Sat, Mar 16, 2013 at 06:55:00PM +0100:
>> On 2013-03-16 16:41, Joey Morris wrote:
>>> I'm running 0.26-fixes. I've defined a checkbox widget in base.xml
>>> that looks something like this:
>>>
>>>
>>> 0,0,80,30
>>> ...
>>>
>>>
>>> In recordings-ui.xml, I want to inherit from base_checkbox and
>>> override the y-position and the width, so I tried this:
>>>
>>>
>>> 0,120,500,30
>>>
>>>
>>> However, only the y-position was changed. The width was still 80. I
>>> also tested the height, and I couldn't override that, either. I looked
>>> at a few themes, and I could only find examples of people overriding
>>> the checkbox's position, never its size. Is the inability to override
>>> the size a design decision or a bug?
>>
>> It would help if you showed us the complete definition of
>> base_checkbox, although I think you're simply not setting the area
>> of the statetypes or their children to say 0,0,100%,100%.
>
> I've had problems in the past setting the area appropriately for
> statetypes, so that very well could be the problem. Here's my full
> base_checkbox:
>
>
>
> 0,0,80,34
>
Add 0,0,100%,100% here and it should work.
--
Jonatan
From rjmorris.list at zoho.com Sat Mar 16 23:02:08 2013
From: rjmorris.list at zoho.com (Joey Morris)
Date: Sat, 16 Mar 2013 19:02:08 -0400
Subject: [mythtv-theming] can't override size of checkbox
In-Reply-To: <5144DE25.1010007@comhem.se>
References: <20130316154155.GW31227@conquistador.dnsalias.org>
<5144B1F4.2010907@comhem.se>
<20130316192614.GX31227@conquistador.dnsalias.org>
<5144DE25.1010007@comhem.se>
Message-ID: <20130316230208.GY31227@conquistador.dnsalias.org>
Jonatan Lindblad wrote on Sat, Mar 16, 2013 at 10:03:33PM +0100:
> On 2013-03-16 20:26, Joey Morris wrote:
> >Jonatan Lindblad wrote on Sat, Mar 16, 2013 at 06:55:00PM +0100:
> >>On 2013-03-16 16:41, Joey Morris wrote:
> >>>I'm running 0.26-fixes. I've defined a checkbox widget in base.xml
> >>>that looks something like this:
> >>>
> >>>
> >>> 0,0,80,30
> >>> ...
> >>>
> >>>
> >>>In recordings-ui.xml, I want to inherit from base_checkbox and
> >>>override the y-position and the width, so I tried this:
> >>>
> >>>
> >>> 0,120,500,30
> >>>
> >>>
> >>>However, only the y-position was changed. The width was still 80. I
> >>>also tested the height, and I couldn't override that, either. I looked
> >>>at a few themes, and I could only find examples of people overriding
> >>>the checkbox's position, never its size. Is the inability to override
> >>>the size a design decision or a bug?
> >>
> >>It would help if you showed us the complete definition of
> >>base_checkbox, although I think you're simply not setting the area
> >>of the statetypes or their children to say 0,0,100%,100%.
> >
> >I've had problems in the past setting the area appropriately for
> >statetypes, so that very well could be the problem. Here's my full
> >base_checkbox:
> >
> >
> >
> > 0,0,80,34
> >
>
> Add 0,0,100%,100% here and it should work.
That works. Thanks! I think I understand why it works. Can you tell me
if the following explanation is correct:
Because I didn't define an area for the statetype, it was assigned the
area from its parent, the base_checkbox, which was 0,0,80,34. When I
inherited from base_checkbox, I overrode the base_checkbox's area,
changing it to 0,120,500,34. However, that had no effect on the
statetype's area, which stayed at 0,0,80,34, thus constraining my
background shape to a width of 80.
By explicitly defining the area of the statetype to be 0,0,100%,100%,
it didn't need to get its area from the base_checkbox. If I had used
base_checkbox directly, the width of the statetype would have been
100% the width of the base_checkbox, or 80. When I inherited from
base_checkbox and changed its width to 500, the width of the statetype
was recomputed as 100% of 500.
Did I get that right?
The part I was confused about was that for some reason I thought the
statetype didn't actually have an area. I thought it was just a
container for widgets that do have areas. I also thought the same
thing about states, but I gave them areas anyway because it fixed some
things even though I didn't know why. But now I think I do, so thanks
for helping me out.