On Thu, Sep 3, 2015 at 11:39 AM, Andrei Chis <chisvasileandrei@gmail.com> wrote:
You are right it does not work.

In Pharo 5/Moose 6 we could safely remove that line and check as a RubScrolledTextMorph takes the default settings of the theme.
This does not happen in Pharo 4/Moose 5.1. Through the solution is very simple. Changing RubAbstractTextArea class>>textColor
to return the default textColor from the theme instead of black could make it possible to remove that check. This would require updating
the configurations of both rubric and glamour for moose 5.1. 

A branch would be one solution. Creating a repo Moose/Moose51 and putting the fixes there. The second would to prefix the package. Something like Glamour-Morphic-Renderer.Moose51.Author.xyz ?

Logically, we should create a 5.1 repo (project in STHub) to keep things separate and clean, even for a minor non-blocking bug like this. Looking at separate branches of a repo inside Monticello looks a bit weird to me.

Then we'll probably have to upgrade the configuration of Glamour Core for Moose 5.1 to load the fix.

If ok with you, I can take care of the two tasks.

regards.
 

Cheers,
Andrei






On Thu, Sep 3, 2015 at 10:56 AM, Usman Bhatti <usman.bhatti@gmail.com> wrote:


On Thu, Sep 3, 2015 at 10:21 AM, Andrei Chis <chisvasileandrei@gmail.com> wrote:


On Tue, Sep 1, 2015 at 2:01 PM, Usman Bhatti <usman.bhatti@gmail.com> wrote:


On Tue, Sep 1, 2015 at 12:07 PM, Andrei Chis <chisvasileandrei@gmail.com> wrote:
Hi Usman,

Are you loading Moose 5.0 in Pharo 3, 4 or 5?

I'm loading it in Pharo 4.0.
 

From what I remember due to issues with black/white theme we decided to have the glamour presentation for rubric use the default theme settings.
In Moose 6 the check can be removed but not the settings of the setting of the textColor:

Is there an issue you are having because of this?

Yes. When I apply some text coloration and display the text with Rubric presentation, it is overwritten with default text color.
Is there any other text presentation using Rubric that might cover my use case?

How do you set the text color?
Below is an example where the color is set to red:

composite :=  GLMCompositePresentation new.
composite rubricText
title: 'Red string';
format: [ :object | Text string: object asString attribute: TextColor red ].
composite openOn: 'text'.

Yes, I am doing similarly and expect the 'text' to be red.

However, in Moose 5.1 image, 'text' is black. This is because the theme color overwrites all precedent color attributes (in GLMMorphicRubricTextRenderer>>morph). 

Inline image 1
 

Cheers,
Andrei


 
 

Cheers,
Andrei

On Mon, Aug 31, 2015 at 4:29 PM, Usman Bhatti <usman.bhatti@gmail.com> wrote:
Hi,

There seems to be a problem with simple the rubric presentation in Moose 5.0. TextColor attributes are overridden with default text color from the theme when the morph is created.

There is a flag in the morph creation code that says that the code needs reviewing in Pharo 4.0. So removing two lines below after the flag resolve this issue:

GLMMorphicRubricTextRenderer>>morph
|morph|
morph := RubScrolledTextMorph new
getSelectionSelector: #primarySelectionInterval;
model: textModel;
color: Smalltalk ui theme backgroundColor;
textFont: StandardFonts defaultFont;
yourself.
self flag: 'Temporary solution until Moose moves to Pharo 4'.
(Smalltalk ui theme class canPerform: #textColor) ifTrue: [ 
morph textColor: Smalltalk ui theme  textColor ].
^ morph

Should I commit a fix removing the flagged lines? Should I create a new branch for the fix?


_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev