Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Fill Colour for relationship text #271

Closed
alcedocoenen opened this issue Sep 15, 2017 · 15 comments
Closed

[Feature Request] Fill Colour for relationship text #271

alcedocoenen opened this issue Sep 15, 2017 · 15 comments
Assignees
Projects

Comments

@alcedocoenen
Copy link

alcedocoenen commented Sep 15, 2017

Using lots of relationship names, it is disturbing that the arrow is crossing the text (when positioned middle), making the text less readable. The text-box is transparant by default, and this is not changeable.
image
image

It would be nice of we also could define the Fill Colour for the relationship text. The colour by default, I would say, should be white:
image
image

What do you think?

@alcedocoenen alcedocoenen changed the title [Feature] Fill Colour for relationship text [Feature Request] Fill Colour for relationship text Sep 15, 2017
@Phillipus
Copy link
Member

Yes, this is possible. Also better would be multi-line text and free positioning of the text label rather than the limited three positions currently implemented. I can implement the first two but not the free positioning - this requires better GEF/Draw2d expertise than I currently have. Perhaps that would be something that someone in the OS community might try.

@jbsarrodie
Copy link
Member

Hi,

I have a small patch to add this background (in fact I created it more than a year ago). It only miss some options (and obsiously to adapt ecore model to store the color). I can confrm this has been prooven useful.

Multi-line would be useful too.

@jbsarrodie jbsarrodie added this to In progress in Archi 4.3 Mar 23, 2018
@jbsarrodie jbsarrodie self-assigned this Mar 23, 2018
@jbsarrodie
Copy link
Member

I'm working on it. My current approach is to not draw the part of the relationship under the label. This would remove the need to set an explicit background.

@Phillipus
Copy link
Member

Set opacity of label?

@Phillipus
Copy link
Member

Surely a simple fix is in AbstractDiagramConnectionFigure:

    public Label getConnectionLabel() {
        if(fConnectionLabel == null) {
            fConnectionLabel = new Label(""); //$NON-NLS-1$
            fConnectionLabel.setOpaque(true); // <------- ADD THIS LINE!
            add(fConnectionLabel);
        }
        return fConnectionLabel;
    }

image 1

@jbsarrodie
Copy link
Member

I have to test. This seems very similar in effect.

@Phillipus
Copy link
Member

Phillipus commented Mar 25, 2018

I guess the problem with setting it to opaque is this:

image 2

@Phillipus
Copy link
Member

But then if we add opacity value or fill color the user could adjust as needed

@jbsarrodie
Copy link
Member

OK, that's why I did it differetly. Look at the branch I pushed yesterday. This is a test that works great. I should be able to optimize it through a better clipping area.

@Phillipus
Copy link
Member

But maybe if the user has options of (1) Opacity and (2) Fill color it provides them with more choice? Perhaps they would like a white label on a grey background?

@jbsarrodie
Copy link
Member

In this context I'm all for the KISS principle. IMHO our real issue is that label is not readable when set in the middle, not that someone misses label background.

@jbsarrodie
Copy link
Member

@Phillipus I've just re-pushed my branch with my "final" fix. You can test it and merge it if ok for you.

@Phillipus
Copy link
Member

@jbsarrodie Yeah, that seems to do the trick. I guess we should merge it and see what users think. If there are any problems with it we can either tweak it, remove it, add an opacity/fill option....

@janwilmans
Copy link

I'm curious to test this too, I have this also:
image

in a grey-folder background making it hard to read. I will try the head version to test

@jbsarrodie
Copy link
Member

Closing as this has been fixed for some time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archi 4.3
  
In progress
Development

No branches or pull requests

4 participants