Screen Options (shutdown)

More
15 Sep 2021 10:20 #220692 by snowgoer540
Thanks again Chris.

I will try to take a look at #2 today after work and see if I can provide any feedback at all.

I appreciate the tips on the handler and stylesheet, would have been quite some time before I ever arrived at either of those. :)

Please Log in or Create an account to join the conversation.

More
15 Sep 2021 23:50 - 15 Sep 2021 23:52 #220748 by snowgoer540

currently it's read and saved to the preference file. but maybe it should not be and be available for the screen builder to add last minute info for a user that is closing the app. I could also force the extra info box open at the same time.


Messed around with this a bit this evening, I'm not sure I have a preference either way in code builder set detail message vs preferences file set. I suppose it might be nice to allow the end user an easy way to change it, so as is would probably fine. As another idea, perhaps if the coder set it to something important, then that takes precedent over any user set message, or, maybe better, it gets added to it?

Otherwise, I think if the user or the coder took the time to put a detailed message there, then it should probably display by default. I would be in favor as it defaulting to open I think.




Also, the handler and stylesheet stuff works great, with some updates/notes below in case anyone else is following along:

1. There was a typo or two in the example I left in my code asking how to get it to work which appears to have carried through, so a working handler code example is as follows:
# red,green,blue,alpha 0-255
color = QtGui.QColor(0, 255, 0, 191)
self.w.screen_options.setProperty('close_overlay_color', color)

It's worth nothing that for the handler, all values for rgba are 0-255 (as Chris' comment notes), including alpha (which is not true for when these are set via stylesheet). Alpha is generally a percentage on most website color wheel examples, so just multiplying the percentage by 255 should do the trick (both of these examples set alpha to 75%)

2. Similarly, a stylesheet example is as follows:
#screen_options {
qproperty-close_overlay_color: rgba(0, 255, 0, 0.75) }

For stylesheet, alpha can be expressed as percentage "75%" or the decimal equivalent "0.75". Both seem to work fine.

I also wanted to pass along this handy website I found for easily figuring out colors:
cssgenerator.org/rgba-and-hex-color-generator.html

Just note that the value next to the slider sometimes updates and sometimes has a snooze. The middle value "RGBA" would be the one you'd want as it's always awake :).
Last edit: 15 Sep 2021 23:52 by snowgoer540.

Please Log in or Create an account to join the conversation.

More
27 Sep 2021 23:41 #221719 by snowgoer540
I saw you recently tweaked the qtvcp_widgets docs, I didnt know there was an example there when I asked previously, at any rate the examples in the docs needed some slight tweaking to match what I got to work above.  I submitted a PR to make it so.

Please Log in or Create an account to join the conversation.

More
28 Sep 2021 00:36 #221721 by cmorley
Replied by cmorley on topic Screen Options (shutdown)
I added the sample after out discussion - just wrong lol.
Thanks merged!
The following user(s) said Thank You: tommylight, snowgoer540

Please Log in or Create an account to join the conversation.

More
28 Sep 2021 21:29 #221782 by frayja2002
Hi all.

As per the picture in the first post, I was wondering if it is possible to apply the red background (when shutting down) to QtDragon.

If someone could point me to the appropriate documentation that would be great.

Thanks.

Please Log in or Create an account to join the conversation.

More
28 Sep 2021 21:59 #221786 by snowgoer540

Please Log in or Create an account to join the conversation.

More
29 Sep 2021 04:04 #221797 by cmorley
Replied by cmorley on topic Screen Options (shutdown)

Hi all.

As per the picture in the first post, I was wondering if it is possible to apply the red background (when shutting down) to QtDragon.

If someone could point me to the appropriate documentation that would be great.

Thanks.
 

What version of linuxcnc are you using ? What linux distribution are you using?

Chris

Please Log in or Create an account to join the conversation.

More
29 Sep 2021 05:16 #221799 by frayja2002
Using the 2.9-pre2.4689 (build bot)

I had a quick look at this link
linuxcnc.org/docs/devel/html/gui/qtvcp_w..._screenoption_widget
but couldn't seem to get it to work. I'm not sure I understand hot to set it up though.

Please Log in or Create an account to join the conversation.

More
30 Sep 2021 00:28 #221863 by snowgoer540
I dont mean to be pedantic, but I still wonder if there is a way to solve the below issue.  I am not sure what it actually stems from, but it's gotten worse since I've added "-m" to the qtvcp call in the ini file (qtvcp -m qtplasmac).

I do notice that if I click "No" and then go to shut down again, the overlay is correct.  

As a clunky work-around, could it do it twice quickly?  I know that seems ridiculous, but it's all I could come up with lol 

 
Attachments:

Please Log in or Create an account to join the conversation.

More
10 Oct 2021 18:27 #222788 by snowgoer540
I havent had time to see if I could maybe figure out why (I hate to just bring problems), but it seems that after the below commit, the color and the large message in the bottom right hand corner stopped working :-/

github.com/LinuxCNC/linuxcnc/commit/601d...6475273b4ac29d0f31cc

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.092 seconds
Powered by Kunena Forum