Page 1 of 1

Examples of using panel_config_int_button_new?

Posted: Thu Jan 24, 2019 9:28 pm
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 10869 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.

Re: Examples of using panel_config_int_button_new?

Posted: Sat Jan 26, 2019 1:31 am
by ab1jx
Running it looks like this (in 2 sizes)
brwx2.png
brwx2.png (42.28 KiB) Viewed 10852 times