Flashlight application
#22
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)


Messages In This Thread
Flashlight application - by a-wai - 06-30-2020, 02:42 AM
RE: Flashlight application - by patrickjquinn - 06-30-2020, 05:06 AM
RE: Flashlight application - by antiX-Dave - 07-01-2020, 06:59 AM
RE: Flashlight application - by chris_02 - 06-30-2020, 05:12 AM
RE: Flashlight application - by bingo600 - 06-30-2020, 09:06 AM
RE: Flashlight application - by patrickjquinn - 06-30-2020, 09:33 AM
RE: Flashlight application - by JustineSmithies - 06-30-2020, 11:56 AM
RE: Flashlight application - by 0x070 - 06-30-2020, 06:19 PM
RE: Flashlight application - by DarkManiels - 06-30-2020, 10:18 PM
RE: Flashlight application - by bcnaz - 07-01-2020, 04:07 PM
RE: Flashlight application - by devrtz - 07-01-2020, 04:13 PM
RE: Flashlight application - by antiX-Dave - 07-01-2020, 09:11 PM
RE: Flashlight application - by devrtz - 07-02-2020, 12:46 AM
RE: Flashlight application - by antiX-Dave - 07-02-2020, 11:15 AM
RE: Flashlight application - by devrtz - 07-02-2020, 01:12 PM
RE: Flashlight application - by arturo2bodegas - 07-02-2020, 07:18 PM
RE: Flashlight application - by devrtz - 07-02-2020, 09:44 PM
RE: Flashlight application - by wibble - 07-03-2020, 06:33 AM
RE: Flashlight application - by bcnaz - 07-02-2020, 07:38 PM
RE: Flashlight application - by arturo2bodegas - 07-03-2020, 02:10 PM
RE: Flashlight application - by bcnaz - 07-04-2020, 04:13 AM
RE: Flashlight application - by antiX-Dave - 07-06-2020, 09:15 PM
RE: Flashlight application - by cefre00 - 07-07-2020, 01:33 AM
RE: Flashlight application - by wibble - 07-07-2020, 09:20 AM
RE: Flashlight application - by cefre00 - 07-08-2020, 07:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Auto start application on Phosh login Zebulon Walton 8 3,297 10-14-2023, 06:29 AM
Last Post: alaraajavamma
  Flashlight/Torch Barugon 6 4,678 10-18-2021, 08:31 AM
Last Post: ragreenburg
  How Do I Perform a Chatty Application Reinstall? rrholmes 2 2,373 07-13-2021, 01:11 AM
Last Post: rrholmes
Sad Problems with Twinkle SIP Application, strerror_r is not available phone123 0 1,534 07-04-2021, 12:58 PM
Last Post: phone123
  Application "Software" crashes when i tap on any category User 20385 0 1,679 11-20-2020, 03:59 AM
Last Post: User 20385
Wink Rockbox as an Application on Pinephone c3l@ 2 3,276 10-14-2020, 06:46 PM
Last Post: visiblink

Forum Jump:


Users browsing this thread: 1 Guest(s)