[AGS] Brightness: Fix, add CLI
This commit is contained in:
		| @@ -4,19 +4,20 @@ import Brightness from "../../../../util/brightness"; | ||||
| const brightness = Brightness.get_default(); | ||||
|  | ||||
| const BrightnessModule = () => { | ||||
|     print( brightness.screen * 100 ); | ||||
|     const setBrightness = (value: number) => { | ||||
|         brightness.set_property('screen', value / 100); | ||||
|         brightness.screen = value; | ||||
|     } | ||||
|     return ( | ||||
|         <box visible={bind(brightness, 'screenAvailable')}> | ||||
|             <image iconName={"brightness-high-symbolic"}></image> | ||||
|             <label label={bind(brightness, "screen").as(b => `${Math.round(100 * b)}%`)}></label> | ||||
|             <slider | ||||
|                 value={bind(brightness, "screen").as(b => 100 * b)} | ||||
|                 value={Math.round( brightness.screen * 100) / 100} | ||||
|                 hexpand | ||||
|                 max={100} | ||||
|                 min={0} | ||||
|                 step={1} | ||||
|                 max={1} | ||||
|                 min={0.01} | ||||
|                 step={0.01} | ||||
|                 vexpand | ||||
|                 onChangeValue={self => setBrightness(self.value)} | ||||
|             ></slider> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user