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

Linking container shows scroll bars although it has the same size as its content #382

Open
mark0n opened this issue May 9, 2018 · 3 comments

Comments

@mark0n
Copy link

mark0n commented May 9, 2018

Steps to reproduce:

  1. Create embed.bob (size 300x200 pixels) containing a label (x=0, y=50, size 300x100 px)
  2. Create master.bob, add a linking container (size 300x200 px) pointing to embed.bob.

Both x and y scroll bars are displayed although

  • the content should fit
  • the linking container doesn't have a border
  • labels don't have a line width (like rectangles do)
  • labels don't have additional alarm borders

I'm running the FRIB version of CS-Studio 4.5.6 on Debian jessie.

@kasemir
Copy link
Owner

kasemir commented May 10, 2018

I think you hit an edge case.
If your content is N pixels wide, and the container is N pixels wide, we automatically get the scroll bar from the underlying JavaFX graphics library.

Ways around that:

Either make the container N+5 pixels wide, i.e. have some margin which causes the graphics library to NOT proactively enable the scroll bar.

Or select the "Resize Behavior: Size widget to match content". In this case, the container size matches the size of the content (well, duh), plus we actually disable the scrollbars because we know that the content fits and thus we must keep the graphics library from proactively enabling the scroll bar, which it would actually do for size(content)==size(container).

@claudio-rosati
Copy link
Collaborator

I think that the embedded container has a 1 pixel border, so +2 in both width and height should be enough. This is, in any case, something I want to investigate in order to remove this border if possible.

@claudio-rosati
Copy link
Collaborator

I've solved it in #480.

@kasemir
I you merge my PR, then this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants