[Sugar-devel] [PATCH][record] Fixes to the UI
Anish Mangal
anishmangal2002 at gmail.com
Tue Jun 8 15:05:09 EDT 2010
> There was probably a reason why it moved them off screen instead of hiding them.
> Do you have any idea what it is?
This comment in ui.py explains why
#we move offscreen to resize or else we get flashes on screen,
and setting hide() doesn't allow resize & moves
* * *
The original code works like this
1. Decide what widgets to display determining their size and position.
2. Move everything off screen.
3. Resize and move the widgets decided in (1) accordingly.
The problem is in step (2). Moving a widget offscreen actually dumps
it in the bottom right corner.
How the patch fixes it.
1. Decide what widgets to display and what size they should be.
2. Move everything off screen.
3. Resize and move the widgets decided in (1) accordingly.
4. Resize to 1x1 _OR_ hide all remaining widgets.
> If we are no longer moving windows offscreen, I would expect your
> patch to remove a load of code that does that, but I don't see it.
Incorporated in the updated patch.
> Also, if you are hiding widgets, I don't see any reason to resize them
> to 1x1.
For some widgets, when I attempt to hide them, the UI doesn't work, so
I have to resize them to 1x1.
(I only resize those widgets which I can't hide, so there is no redundancy)
Cheers,
Anish
On Mon, Jun 7, 2010 at 9:38 PM, Daniel Drake <dsd at laptop.org> wrote:
> On 6 June 2010 15:54, Anish Mangal <anishmangal2002 at gmail.com> wrote:
>>> At least for myself, I'd like to see more detail here -- how was
>>> it broken?
>>
>> Sure. The record UI consists of many windows/widgets. In a particular
>> mode or view, it displays and resizes the widgets appropriate for that
>> view the tries to hide the other windows by moving them off-screen.
>
> There was probably a reason why it moved them off screen instead of hiding them.
> Do you have any idea what it is?
>
>> The patch (which I must confess is not an ideal fix), works by
>> resizing (to size 1px by 1px) and hiding the widgets not required in a
>> particular view/mode. To accomplish that, I created the
>> 'resizewindows' method. Also, in the 'updatevideocomponents' method I
>> hide the widgets not required in a particular view.
>
> This is a great start but we should look towards that 'ideal fix' route.
> If we are no longer moving windows offscreen, I would expect your
> patch to remove a load of code that does that, but I don't see it.
> Also, if you are hiding widgets, I don't see any reason to resize them
> to 1x1.
>
> Daniel
>
More information about the Sugar-devel
mailing list