Use GroupParameter instead of popup button for PenParameter#2086
Use GroupParameter instead of popup button for PenParameter#2086j9ac9k merged 5 commits intopyqtgraph:masterfrom
Conversation
|
As yet another bonus, there's so much less misdirection/obfuscation between where the pen gets updates. |
|
Nice! one of the things I was worried that would be missing out was that the button had a nice representation of what the pen looked like, but you preserved that 👍🏻 |
|
Only question I have is if we want to move the pen label into the widgets portion of the library; and import it in the parameter type. I know we talked about this earlier, ... I like the idea of parameter types using the widgets within the library, but I do think there is value in making those widgets accessible via pyqtgraph.widgets as well. If I remember our discussion earlier on this, you were concerned we might run into a case with circular imports, would that be a concern here, as the modified QLabel wouldn't need to know anything about the parameter type (the parameter type would need to know about the QLabel though!), so is circular imports really a concern here? |
|
@j9ac9k good point, it should be updated now. |
|
Now pen preview shows "changing" details and a delay timer is added similar to #209. The video somehow uploaded with terrible frame rate, but you are welcome to test it out. A 'cosmetic' indicator was also added to the preview label since the pen preview looks the same in both cases without it LTyVt7MweH.mp4 |
|
While playing around with this, noticed one issue...and by playing around with it, I mean running Open the Color Selection Dialog button, select a color (but don't click ok); you'll notice the plot changes color. If you cancel out, it will eventually change back to what it was. I'm not sure this behavior is a deal breaker or not, or is that an issue with ColorButton? |
|
I somehow mentally blocked the fact that color picker is in fact a popup. Side note -- should it be a subitem like To answer your question though, I listen for a delay in What if instead of a |
I think having the color button be a pop up dialog is fine. I could see a case to be made for having a text input that runs the text into
I think "both" here would be good. Widget loses focus, emit signal right away; otherwise wait the delayed 1s. I don't have a good sense of what kind of code complexity that would add tho. |
- Better internal variable names - Use 'valueChanging' instead of 'changed' logic
- Show 'changing' instead of 'changed' values - Add 'C' indicator for cosmetic pen
118b0ce to
d7cbd43
Compare
|
QTreeWidgetItem doesn't seem to have a focus event ecosystem, so I will leave that off the table for this release |
No other parameters use a popup system to set their values(I guess a color picker does...). After using the pen parameter a bit, I was frustrated at having to click at least three times (open box, make change, press "ok") just to change a value. This remedies both issues.Pen parameters are now group parameter children. Everything else is now as normal.
Oh, and the default button respects true pen defaults now, too