-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Make the Qt interactive zoom rectangle black & white. #16798
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is (just about) exciting enough to warrant a what's new entry
done |
Not sure I like an alternating color selection rectangle. It looks good on whitish and blackish backgrounds, but may be odd on other background colors. I'm not aware of any other application using this. Other applications often use a semi-transparent fill color for increased visibility. OTOH, most people use white background, in which case it does not make a difference. Not a big fan, but I also won't block. |
I'm not particularly wedded to black-and-white, but the current status (black and transparent) is basically useless on dark background (in my case, microscopy images). If you have a better solution, I'm happy to try it. |
I have also personally had this problem (also with mircoscopy images). Seeing this PR was a light bulb of "Why didn't I think of that 7 years ago!". This will also help visibility on top of a mostly "low" viridis purple. |
Can you set the pen to draw in XOR mode? That might work for any background. I was going to say that's what GIMP does, but either they changed it or never did it like that. They have a 3-pixel wide selection stroke: 3 pixels black, and center pixel white/black alternating. |
That is a good idea! Looks like you can: https://doc.qt.io/qt-5/qpainter.html#setCompositionMode |
Sorry to be a bit particular on this 👿. This runs against my aesthetic sense: You would have a rainbow line on false-color plots. Feels like we did this in the 90s. 💿 |
I agree this will likely look wrong (though I haven't actually tried :)) |
That looks pretty good to me (I like it), though it is also a bigger to the previous style so we may get more complaints? ;) |
I'll play a bit with the colors tonight. I'm not concerned with complaints 😄. This is only temporarily visible and does not change the appearance of the figure. |
re: colors: yes, I was wondering where the 168 came from :) (but it looks fine to me) |
Here are some simulated proposals for rectangle colors:
Personally, I like blue and orange, the grey selection rectangle is too damp. Here's also the code, in case you want to play with the colors further.
|
My vote would be to not fill or shade the interiour of the selection, because that changes the appearance of the part of the image you want to select. Ideally, one would instead shade the outside of the selection, but I suppose that is not that easy and might just be overkill. |
Consensus on call seems to be black and while outline. Decision is between black-and-white dashes and black and white lines. @timhoffm gets final say on this PR. |
FWIW, Inkscape's zoom is a bit weird; it's black, with a white shadow, i.e., it only appears outside the right and bottom edges; I don't think that's something we want to do. In GIMP, it's solid black-white-black on all edges which seems more in line with the closed captions idea. |
Explicitly drawing white segments makes it visible even over dark backgrounds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anybody can merge after CI pass.
Explicitly drawing white segments makes it visible even over dark
backgrounds.
before (but imagine even darker backgrounds (typically, an image using a black-to-white cmap)):


after:
PR Summary
PR Checklist