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

1093 - graphics inspector section #1141

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

KRLango
Copy link
Contributor

@KRLango KRLango commented Aug 19, 2024

Change the graphics section of the inspector to use the declarative UI

@KRLango KRLango marked this pull request as draft August 19, 2024 10:28
@KRLango KRLango marked this pull request as ready for review August 20, 2024 14:49
@cmeyer cmeyer marked this pull request as draft August 20, 2024 15:38
@cmeyer
Copy link
Collaborator

cmeyer commented Aug 20, 2024

I changed this to draft - it looks like it needs to be cleaned up (merge conflicts) + code like this:

if isinstance(value, str):
    print("blah!")

Is it possible to split this PR into multiple PR's that are easier to review, like you did for the the point inspector? f3e67d8

@KRLango KRLango marked this pull request as ready for review August 21, 2024 10:19
@cmeyer
Copy link
Collaborator

cmeyer commented Sep 3, 2024

Sorry this is taking a while - lots of code to review.

While I'm doing that, this seems like a good one for @Ion-e to look through carefully. There are some obvious issues... e.g. line profile doesn't show the correct inspector and several text mis-alignments which were there prior to this PR - but it would be nice to (a) not make them worse; (b) fix the old problems here too where possible. There are probably other issues to uncover in testing.

My suggested approach to testing is to make an image with non-mask graphics, take screenshot of old/new inspector with each graphic type to compare visual display, then use functionality of each to make sure it works. If a bug is found in the old version but not in new version, file an issue. If a bug is found in the new version but not old, fix in PR (and make a comment here). Do the same for each mask type and for 1D line plots with interval and channel graphics. Be aware of #134 during testing (no lattice inspector was ever made).

Example alignment issue (old on top, new on bottom). See "Rotation" is cut off in new. Also alignment on lock/position/shape/center-button is not great in either old/new, but worse in new due to the "center graphic" button style change. I think you might be able to use the (recent) text alignment capabilities to improve the alignment, although your mileage may vary! Search for "text_alignment_vertical" for some example code. Maybe align everything in row to top/bottom/center (not sure which will work the best). I'm aware that to truly fix things may require updates to Declarative.py and maybe even the nionui-tool / Qt code. Let's do the best we can on the Python side before skipping to the Qt changes.

Edit: I've never been thrilled with the "center graphic" button, which (a) only works if the graphic is selected; (b) might have a better UI. I'm open to suggestions to improve it!

image

vs

image

@KRLango KRLango requested a review from Ion-e September 3, 2024 07:42
@cmeyer
Copy link
Collaborator

cmeyer commented Sep 23, 2024

Is this ready for review? If so, can you merge the main branch to this branch so the checks run.

Copy link
Collaborator

@cmeyer cmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry this is going to need another merge commit after I merged the color picker and text button.

@KRLango
Copy link
Contributor Author

KRLango commented Oct 4, 2024

I expected it would need another merge when they went in. But that is done now.

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

Successfully merging this pull request may close these issues.

2 participants