Examples of using panel_config_int_button_new?

Discussion on LXDE releases and Development. This forum is not the best way to contact the developers, please use the Development mailing list and Sourceforge to interact with them.
Locked
ab1jx
Posts: 21
Joined: Fri Dec 07, 2018 4:14 pm

Examples of using panel_config_int_button_new?

Post by ab1jx »

The only hits I find by Googling it are on the pages where it's announced, search here turns up nothing at all. I'd sort of like a spin button, but on the other hand I'm trying to wrap the project up and I could live without it.

I put in a CONF_TYPE_INT and it appears but doesn't seem connected to anything. I'm not sure it goes with panel_config_int_button_new(), it almost looks like they were added at different times.

I've been adapting CPU Usage Monitor into a Bitcoin price monitor. I can manage to set the alpha on the price text layer so it doesn't obscure the price plot. I can hard-code it to 60% opacity or make it user-changeable. I don't want a new dialog box, I just want a new widget. This is what I get when I use

Code: Select all

_("Text alpha percent"), &dc->text_alpha,CONF_TYPE_INT,
dialog.png
dialog.png (11.28 KiB) Viewed 6583 times
I created a widget (I think) with

Code: Select all

 c->asb = panel_config_int_button_new(asbname, &c->text_alpha,0,100);
 
but I added an upper limit of 100 and it has no effect. Almost like it's a different widget that's not realized yet. I didn't do gtk_container_add on it yet.
ab1jx
Posts: 21
Joined: Fri Dec 07, 2018 4:14 pm

Re: Examples of using panel_config_int_button_new?

Post by ab1jx »

Running it looks like this (in 2 sizes)
brwx2.png
brwx2.png (42.28 KiB) Viewed 6566 times
Locked