Another suggestion/request if it seems reasonable.
The way I see it, when you are wanting to use the flashlight the surrounding area is dark. Would it be worth while to override the gtk settings making the background dark? Simply to avoid burning your eye sockets with the white background in the dark. I was figuring it could be done by using something like
Code:
GdkColor background
background.red = 0;
background.green = 0;
background.blue = 0;
new_style = gtk_rc_style_new ();
new_style ->fg[GTK_STATE_NORMAL] = color;
However there is probably a nicer way to do this...
Currently I am specifying a dark gtk variant through a wrapper script like
Code:
#!/bin/bash
GTK_THEME=Adwaita:dark flashlight;
exit;
and altering the .desktop file to use the wrapper script. Not sure why having the theme specification directly in the .desktop file does not work.
Edit:
After writing this and thinking it over for a nicer way... I think the phone has a light sensor for hardware that must be working for automatic brightness. Is this accessed through /sys? I would like to look into changing the gtk theme to the dark variant if the light sensor level is low/showing dark. Then burning your eye sockets is not as concerning anymore and also would work for other apps (like maps)