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

Icons for Blocks.Logical (LessThreshold, LessEqualThreshold, GreaterThreshold and GreaterEqualThreshold) misleading when flipped #2757

Closed
max-privato opened this issue Oct 26, 2018 · 3 comments · Fixed by #2758
Assignees
Labels
L: Blocks Issue addresses Modelica.Blocks
Milestone

Comments

@max-privato
Copy link
Contributor

The icon of LessThreshold is a sign "<". When the component is used as is, it is meaningful.
If the component flipped horizontally, the same icon "<" is displayed, which indicates greater instead of less!

Also GreaterThreshold is affected by this issue. The issue can be solved using a drawing for the less or greater symbol instead of a character.

Less, Greater, LessEqual and GreaterEqual are unaffected, since their icons are already drawings.

@beutlich beutlich self-assigned this Oct 28, 2018
@beutlich beutlich added the L: Blocks Issue addresses Modelica.Blocks label Oct 28, 2018
@beutlich beutlich added this to the MSL3.2.3 milestone Oct 28, 2018
@beutlich
Copy link
Member

Left over from #745. Will prepare a pull request.

beutlich added a commit to beutlich/ModelicaStandardLibrary that referenced this issue Oct 28, 2018
Ensure consistent looks of all 8 affected icons
@beutlich beutlich changed the title Very bad behaviour of two Blocks.Logical icons (LessThreshold and GreaterThreshold) Icons for Blocks.Logical (LessThreshold, LessEqualThreshold, GreaterThreshold and GreaterEqualThreshold) misleading when flipped Oct 28, 2018
@max-privato
Copy link
Contributor Author

max-privato commented Nov 2, 2018

Thank you for implementing my suggestion.
After some usage, and getting other people involved, I came to the conclusion that the icon is still confusing. The issue is that when we use the symbol "<" we want to have two terms to compare. In Greater and Less somehow we have them, in GreaterThreshold, and LessThreshold, even with the modification I suggested we still don't have.

I made some tests with both Dymola and Openmodelica, and using the text "Th" as a placeholder for threshold seems good enough, and well coordinated with the existing Less and Greater icons.
The annotation code for LessThreshold that I tested (for me satisfactorily) is as follows (excluding Documentation):

 annotation (Icon(coordinateSystem(preserveAspectRatio=true,
  extent={{-100,-100},
         {100,100}}), graphics={
          Line(points={{-36,20},{-82,0},{-36,-20}},
          thickness=0.5), Text(
          extent={{-26,48},{46,-48}},
          lineColor={0,0,0},
          textString="Th",
          horizontalAlignment=TextAlignment.Left)}),
          [...]

@beutlich, do you agree with this further enhancement? If you do, obviously also GreaterThreshold should be changed accordingly.

@beutlich
Copy link
Member

beutlich commented Nov 2, 2018

@beutlich, do you agree with this further enhancement?

Forwarding to library officers @AHaumer and @MartinOtter .

dietmarw pushed a commit that referenced this issue Dec 11, 2018
Ensure consistent looks of all 8 affected icons

close #2757
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: Blocks Issue addresses Modelica.Blocks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants