[Sugar-devel] Dynamically set number of control panel columns

Anish Mangal anishmangal2002 at gmail.com
Fri Jun 25 00:55:51 EDT 2010


Hi Michael,

Thanks for reviewing this.

I discussed this with tomeu and the problem actually lies in the fact that
icons take up as much horizontal space as they want (which is primarily
governed by the text-label width below the icon).

Longer text labels should be broken into two or more lines and the overall
icon width (including the label) should be kept confined.

I'll rework this patch and send it to the m.l. again.

While we're discussing this, I also noticed that currently, there is no
minimum row spacing between the icons. So if I were to display 4 or more
rows, the layout would seem a little cramped vertically. You can test this
in your environment with 1024x768 resolution by commenting the following
line

>> +        self._table.set_row_spacings(style.GRID_CELL_SIZE)

Should this be kept as is or should the above line be included (probably
introducing a vertical scrollbar).

--
Anish


On Fri, Jun 25, 2010 at 5:26 AM, Michael Stone <michael at laptop.org> wrote:

> On Sun, Jun 20, 2010 at 10:27:46PM -0000, Anish Mangal wrote:
>
>> From: anishmangal2002 <anishmangal2002 at gmail.com>
>>
>> This patch sets the number of icon-columns in the control
>> panel based on the screen resolution. This patch also sets
>> the table row spacing to GRID_CELL_SIZE.
>>
>
> Anish,
>
> I like the basic idea underlying this patch but I'm not really satisfied
> with the current results.
>
> With 8 icons at 1024x768, I get two vertical columns of icons, each with
> four rows. Three rows scan be displayed at a time.
>
> With 8 icons at 800x600, I get one horizontal row of icons with four
> icons initially displayed.
>
> Neither of these layouts seems ideal.
>
> Thoughts?
>
> Michael
>
> P.S. - This problem actually reminds me rather strongly of the "how do
> we place activity icons?" problem that we had when activity icons were
> stuck on the frame. Do we have enough control panel entries now that we
> should think about re-using the home-view layout to place control panel
> icons too?
>
> P.P.S. - In any case, thanks for the patch!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/sugar-devel/attachments/20100625/658fbbbb/attachment.htm 


More information about the Sugar-devel mailing list