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