drawing tabs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

drawing tabs

Tudor Girba-3
Hi,

We (me and Jorge) are having some problems with drawing TabGroupMorph  
properly.

The very first time the tabs are displayed, the background is not  
drawn correctly (see the attached picture). However, after we select  
another window or a tab, the tabs background are drawn correctly.

In the same time, when we execute UITheme exampleGroups, everything  
works fine. We think we are doing the same thing, but obviously we do  
not.

Could anyone indicate some possible tracks to look at?

Cheers,
Doru

--
www.tudorgirba.com

"Not knowing how to do something is not an argument for how it cannot  
be done."



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

tabs-drawing-problem.png (42K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: drawing tabs

Gary Chambers-4
Depends how the things are laid out. Browser bits can be a bit odd I've
found.

If you have some code I'll take a look.

Regards, Gary

----- Original Message -----
From: "Tudor Girba" <[hidden email]>
To: "Pharo Development" <[hidden email]>
Sent: Friday, August 07, 2009 11:48 AM
Subject: [Pharo-project] drawing tabs


> Hi,
>
> We (me and Jorge) are having some problems with drawing TabGroupMorph
> properly.
>
> The very first time the tabs are displayed, the background is not
> drawn correctly (see the attached picture). However, after we select
> another window or a tab, the tabs background are drawn correctly.
>
> In the same time, when we execute UITheme exampleGroups, everything
> works fine. We think we are doing the same thing, but obviously we do
> not.
>
> Could anyone indicate some possible tracks to look at?
>
> Cheers,
> Doru
>
> --
> www.tudorgirba.com
>
> "Not knowing how to do something is not an argument for how it cannot
> be done."
>
>
>


--------------------------------------------------------------------------------


> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: drawing tabs

Tudor Girba-3
Hi Gary,

It would be great to get some feedback on this.

The code can be downloaded with:
ScriptLoader loadLatestPackage: 'GlamourLoader' from: 'http://www.squeaksource.com/Glamour' 
.
(Smalltalk at: #GlamourLoader) load

To run the example, you can:
GLMMorphicExamples new stCodeBrowser.

The code that actually renders can be found in GLMMorphicRenderer.

Cheers,
Doru


On 7 Aug 2009, at 13:10, Gary Chambers wrote:

> Depends how the things are laid out. Browser bits can be a bit odd  
> I've
> found.
>
> If you have some code I'll take a look.
>
> Regards, Gary
>
> ----- Original Message -----
> From: "Tudor Girba" <[hidden email]>
> To: "Pharo Development" <[hidden email]>
> Sent: Friday, August 07, 2009 11:48 AM
> Subject: [Pharo-project] drawing tabs
>
>
>> Hi,
>>
>> We (me and Jorge) are having some problems with drawing TabGroupMorph
>> properly.
>>
>> The very first time the tabs are displayed, the background is not
>> drawn correctly (see the attached picture). However, after we select
>> another window or a tab, the tabs background are drawn correctly.
>>
>> In the same time, when we execute UITheme exampleGroups, everything
>> works fine. We think we are doing the same thing, but obviously we do
>> not.
>>
>> Could anyone indicate some possible tracks to look at?
>>
>> Cheers,
>> Doru
>>
>> --
>> www.tudorgirba.com
>>
>> "Not knowing how to do something is not an argument for how it cannot
>> be done."
>>
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"Problem solving should be concentrated on describing
the problem in a way that is relevant for the solution."




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: drawing tabs

Gary Chambers-4
Hi Tudor.

It seems the pane colour needs to be adopted after the presentations are
added to the container (since the layout changes when adding).

In GLMMorphicRenderer

renderPane: aPane
 | container |
 container := self emptyMorph.
 aPane whenMatchingPresentationsChanged: [ :ann |
  container
   removeAllMorphs;
   addMorph: (self renderPresentationsOf: aPane)
   fullFrame: (LayoutFrame new
    leftFraction: 0;
    rightFraction: 1;
    topFraction: 0;
    bottomFraction: 1);
   adoptPaneColor: container paneColor.
 ].
 container
  addMorph: (self renderPresentationsOf: aPane)
  fullFrame: (LayoutFrame new
    leftFraction: 0;
    rightFraction: 1;
    topFraction: 0;
    bottomFraction: 1);
  adoptPaneColor: container paneColor.
 ^ container

Also, although Polymorph fixes up splitters for SystemWindows, those of
BorderedMorph are left with the original code (which is why the tops of the
tabs are hidden). You might want an initial offset of SystemWindow
borderWidth for the moment.

Regards, Gary


----- Original Message -----
From: "Tudor Girba" <[hidden email]>
To: <[hidden email]>
Sent: Friday, August 07, 2009 12:31 PM
Subject: Re: [Pharo-project] drawing tabs


> Hi Gary,
>
> It would be great to get some feedback on this.
>
> The code can be downloaded with:
> ScriptLoader loadLatestPackage: 'GlamourLoader' from:
> 'http://www.squeaksource.com/Glamour'
> .
> (Smalltalk at: #GlamourLoader) load
>
> To run the example, you can:
> GLMMorphicExamples new stCodeBrowser.
>
> The code that actually renders can be found in GLMMorphicRenderer.
>
> Cheers,
> Doru
>
>
> On 7 Aug 2009, at 13:10, Gary Chambers wrote:
>
>> Depends how the things are laid out. Browser bits can be a bit odd
>> I've
>> found.
>>
>> If you have some code I'll take a look.
>>
>> Regards, Gary
>>
>> ----- Original Message -----
>> From: "Tudor Girba" <[hidden email]>
>> To: "Pharo Development" <[hidden email]>
>> Sent: Friday, August 07, 2009 11:48 AM
>> Subject: [Pharo-project] drawing tabs
>>
>>
>>> Hi,
>>>
>>> We (me and Jorge) are having some problems with drawing TabGroupMorph
>>> properly.
>>>
>>> The very first time the tabs are displayed, the background is not
>>> drawn correctly (see the attached picture). However, after we select
>>> another window or a tab, the tabs background are drawn correctly.
>>>
>>> In the same time, when we execute UITheme exampleGroups, everything
>>> works fine. We think we are doing the same thing, but obviously we do
>>> not.
>>>
>>> Could anyone indicate some possible tracks to look at?
>>>
>>> Cheers,
>>> Doru
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Not knowing how to do something is not an argument for how it cannot
>>> be done."
>>>
>>>
>>>
>>
>>
>> --------------------------------------------------------------------------------
>>
>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> www.tudorgirba.com
>
> "Problem solving should be concentrated on describing
> the problem in a way that is relevant for the solution."
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: drawing tabs

Tudor Girba-3
It works! Thanks a lot. You are the wizard of Morphic :)

Regarding the top delta of the tabs, this would have been my second  
question :). Thanks for the suggestion.

Cheers,
Doru


On 7 Aug 2009, at 14:50, Gary Chambers wrote:

> Hi Tudor.
>
> It seems the pane colour needs to be adopted after the presentations  
> are
> added to the container (since the layout changes when adding).
>
> In GLMMorphicRenderer
>
> renderPane: aPane
> | container |
> container := self emptyMorph.
> aPane whenMatchingPresentationsChanged: [ :ann |
>  container
>   removeAllMorphs;
>   addMorph: (self renderPresentationsOf: aPane)
>   fullFrame: (LayoutFrame new
>    leftFraction: 0;
>    rightFraction: 1;
>    topFraction: 0;
>    bottomFraction: 1);
>   adoptPaneColor: container paneColor.
> ].
> container
>  addMorph: (self renderPresentationsOf: aPane)
>  fullFrame: (LayoutFrame new
>    leftFraction: 0;
>    rightFraction: 1;
>    topFraction: 0;
>    bottomFraction: 1);
>  adoptPaneColor: container paneColor.
> ^ container
>
> Also, although Polymorph fixes up splitters for SystemWindows, those  
> of
> BorderedMorph are left with the original code (which is why the tops  
> of the
> tabs are hidden). You might want an initial offset of SystemWindow
> borderWidth for the moment.
>
> Regards, Gary
>
>
> ----- Original Message -----
> From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Sent: Friday, August 07, 2009 12:31 PM
> Subject: Re: [Pharo-project] drawing tabs
>
>
>> Hi Gary,
>>
>> It would be great to get some feedback on this.
>>
>> The code can be downloaded with:
>> ScriptLoader loadLatestPackage: 'GlamourLoader' from:
>> 'http://www.squeaksource.com/Glamour'
>> .
>> (Smalltalk at: #GlamourLoader) load
>>
>> To run the example, you can:
>> GLMMorphicExamples new stCodeBrowser.
>>
>> The code that actually renders can be found in GLMMorphicRenderer.
>>
>> Cheers,
>> Doru
>>
>>
>> On 7 Aug 2009, at 13:10, Gary Chambers wrote:
>>
>>> Depends how the things are laid out. Browser bits can be a bit odd
>>> I've
>>> found.
>>>
>>> If you have some code I'll take a look.
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message -----
>>> From: "Tudor Girba" <[hidden email]>
>>> To: "Pharo Development" <[hidden email]>
>>> Sent: Friday, August 07, 2009 11:48 AM
>>> Subject: [Pharo-project] drawing tabs
>>>
>>>
>>>> Hi,
>>>>
>>>> We (me and Jorge) are having some problems with drawing  
>>>> TabGroupMorph
>>>> properly.
>>>>
>>>> The very first time the tabs are displayed, the background is not
>>>> drawn correctly (see the attached picture). However, after we  
>>>> select
>>>> another window or a tab, the tabs background are drawn correctly.
>>>>
>>>> In the same time, when we execute UITheme exampleGroups, everything
>>>> works fine. We think we are doing the same thing, but obviously  
>>>> we do
>>>> not.
>>>>
>>>> Could anyone indicate some possible tracks to look at?
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>>
>>>> "Not knowing how to do something is not an argument for how it  
>>>> cannot
>>>> be done."
>>>>
>>>>
>>>>
>>>
>>>
>>> --------------------------------------------------------------------------------
>>>
>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> --
>> www.tudorgirba.com
>>
>> "Problem solving should be concentrated on describing
>> the problem in a way that is relevant for the solution."
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"What is more important: To be happy, or to make happy?"


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: drawing tabs

Alexandre Bergel
In reply to this post by Gary Chambers-4
Thanks Gary, this is an excellent help. This problem has been around  
for a while already.

Alexandre


On 7 Aug 2009, at 08:50, Gary Chambers wrote:

> Hi Tudor.
>
> It seems the pane colour needs to be adopted after the presentations  
> are
> added to the container (since the layout changes when adding).
>
> In GLMMorphicRenderer
>
> renderPane: aPane
> | container |
> container := self emptyMorph.
> aPane whenMatchingPresentationsChanged: [ :ann |
>  container
>   removeAllMorphs;
>   addMorph: (self renderPresentationsOf: aPane)
>   fullFrame: (LayoutFrame new
>    leftFraction: 0;
>    rightFraction: 1;
>    topFraction: 0;
>    bottomFraction: 1);
>   adoptPaneColor: container paneColor.
> ].
> container
>  addMorph: (self renderPresentationsOf: aPane)
>  fullFrame: (LayoutFrame new
>    leftFraction: 0;
>    rightFraction: 1;
>    topFraction: 0;
>    bottomFraction: 1);
>  adoptPaneColor: container paneColor.
> ^ container
>
> Also, although Polymorph fixes up splitters for SystemWindows, those  
> of
> BorderedMorph are left with the original code (which is why the tops  
> of the
> tabs are hidden). You might want an initial offset of SystemWindow
> borderWidth for the moment.
>
> Regards, Gary
>
>
> ----- Original Message -----
> From: "Tudor Girba" <[hidden email]>
> To: <[hidden email]>
> Sent: Friday, August 07, 2009 12:31 PM
> Subject: Re: [Pharo-project] drawing tabs
>
>
>> Hi Gary,
>>
>> It would be great to get some feedback on this.
>>
>> The code can be downloaded with:
>> ScriptLoader loadLatestPackage: 'GlamourLoader' from:
>> 'http://www.squeaksource.com/Glamour'
>> .
>> (Smalltalk at: #GlamourLoader) load
>>
>> To run the example, you can:
>> GLMMorphicExamples new stCodeBrowser.
>>
>> The code that actually renders can be found in GLMMorphicRenderer.
>>
>> Cheers,
>> Doru
>>
>>
>> On 7 Aug 2009, at 13:10, Gary Chambers wrote:
>>
>>> Depends how the things are laid out. Browser bits can be a bit odd
>>> I've
>>> found.
>>>
>>> If you have some code I'll take a look.
>>>
>>> Regards, Gary
>>>
>>> ----- Original Message -----
>>> From: "Tudor Girba" <[hidden email]>
>>> To: "Pharo Development" <[hidden email]>
>>> Sent: Friday, August 07, 2009 11:48 AM
>>> Subject: [Pharo-project] drawing tabs
>>>
>>>
>>>> Hi,
>>>>
>>>> We (me and Jorge) are having some problems with drawing  
>>>> TabGroupMorph
>>>> properly.
>>>>
>>>> The very first time the tabs are displayed, the background is not
>>>> drawn correctly (see the attached picture). However, after we  
>>>> select
>>>> another window or a tab, the tabs background are drawn correctly.
>>>>
>>>> In the same time, when we execute UITheme exampleGroups, everything
>>>> works fine. We think we are doing the same thing, but obviously  
>>>> we do
>>>> not.
>>>>
>>>> Could anyone indicate some possible tracks to look at?
>>>>
>>>> Cheers,
>>>> Doru
>>>>
>>>> --
>>>> www.tudorgirba.com
>>>>
>>>> "Not knowing how to do something is not an argument for how it  
>>>> cannot
>>>> be done."
>>>>
>>>>
>>>>
>>>
>>>
>>> --------------------------------------------------------------------------------
>>>
>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> --
>> www.tudorgirba.com
>>
>> "Problem solving should be concentrated on describing
>> the problem in a way that is relevant for the solution."
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: drawing tabs

Gary Chambers-4
No problem. The Glamour stuff looks interesting!

Regards, Gary

----- Original Message -----
From: "Alexandre Bergel" <[hidden email]>
To: <[hidden email]>
Sent: Monday, August 10, 2009 2:46 PM
Subject: Re: [Pharo-project] drawing tabs


> Thanks Gary, this is an excellent help. This problem has been around
> for a while already.
>
> Alexandre
>
>
> On 7 Aug 2009, at 08:50, Gary Chambers wrote:
>
>> Hi Tudor.
>>
>> It seems the pane colour needs to be adopted after the presentations
>> are
>> added to the container (since the layout changes when adding).
>>
>> In GLMMorphicRenderer
>>
>> renderPane: aPane
>> | container |
>> container := self emptyMorph.
>> aPane whenMatchingPresentationsChanged: [ :ann |
>>  container
>>   removeAllMorphs;
>>   addMorph: (self renderPresentationsOf: aPane)
>>   fullFrame: (LayoutFrame new
>>    leftFraction: 0;
>>    rightFraction: 1;
>>    topFraction: 0;
>>    bottomFraction: 1);
>>   adoptPaneColor: container paneColor.
>> ].
>> container
>>  addMorph: (self renderPresentationsOf: aPane)
>>  fullFrame: (LayoutFrame new
>>    leftFraction: 0;
>>    rightFraction: 1;
>>    topFraction: 0;
>>    bottomFraction: 1);
>>  adoptPaneColor: container paneColor.
>> ^ container
>>
>> Also, although Polymorph fixes up splitters for SystemWindows, those
>> of
>> BorderedMorph are left with the original code (which is why the tops
>> of the
>> tabs are hidden). You might want an initial offset of SystemWindow
>> borderWidth for the moment.
>>
>> Regards, Gary
>>
>>
>> ----- Original Message -----
>> From: "Tudor Girba" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Friday, August 07, 2009 12:31 PM
>> Subject: Re: [Pharo-project] drawing tabs
>>
>>
>>> Hi Gary,
>>>
>>> It would be great to get some feedback on this.
>>>
>>> The code can be downloaded with:
>>> ScriptLoader loadLatestPackage: 'GlamourLoader' from:
>>> 'http://www.squeaksource.com/Glamour'
>>> .
>>> (Smalltalk at: #GlamourLoader) load
>>>
>>> To run the example, you can:
>>> GLMMorphicExamples new stCodeBrowser.
>>>
>>> The code that actually renders can be found in GLMMorphicRenderer.
>>>
>>> Cheers,
>>> Doru
>>>
>>>
>>> On 7 Aug 2009, at 13:10, Gary Chambers wrote:
>>>
>>>> Depends how the things are laid out. Browser bits can be a bit odd
>>>> I've
>>>> found.
>>>>
>>>> If you have some code I'll take a look.
>>>>
>>>> Regards, Gary
>>>>
>>>> ----- Original Message -----
>>>> From: "Tudor Girba" <[hidden email]>
>>>> To: "Pharo Development" <[hidden email]>
>>>> Sent: Friday, August 07, 2009 11:48 AM
>>>> Subject: [Pharo-project] drawing tabs
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> We (me and Jorge) are having some problems with drawing
>>>>> TabGroupMorph
>>>>> properly.
>>>>>
>>>>> The very first time the tabs are displayed, the background is not
>>>>> drawn correctly (see the attached picture). However, after we
>>>>> select
>>>>> another window or a tab, the tabs background are drawn correctly.
>>>>>
>>>>> In the same time, when we execute UITheme exampleGroups, everything
>>>>> works fine. We think we are doing the same thing, but obviously
>>>>> we do
>>>>> not.
>>>>>
>>>>> Could anyone indicate some possible tracks to look at?
>>>>>
>>>>> Cheers,
>>>>> Doru
>>>>>
>>>>> --
>>>>> www.tudorgirba.com
>>>>>
>>>>> "Not knowing how to do something is not an argument for how it
>>>>> cannot
>>>>> be done."
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --------------------------------------------------------------------------------
>>>>
>>>>
>>>>> _______________________________________________
>>>>> Pharo-project mailing list
>>>>> [hidden email]
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>> --
>>> www.tudorgirba.com
>>>
>>> "Problem solving should be concentrated on describing
>>> the problem in a way that is relevant for the solution."
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project 


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project