[AGS] Brightness improvements
This commit is contained in:
parent
1239f49cc7
commit
414d42072a
@ -4,15 +4,15 @@ import Brightness from "../../../../util/brightness";
|
|||||||
const brightness = Brightness.get_default();
|
const brightness = Brightness.get_default();
|
||||||
|
|
||||||
const BrightnessModule = () => {
|
const BrightnessModule = () => {
|
||||||
const setBrightness = ( value: number ) => {
|
const setBrightness = (value: number) => {
|
||||||
brightness.set_property('screen', value);
|
brightness.set_property('screen', value / 100);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<box visible={bind(brightness, 'screenAvailable')}>
|
<box visible={bind(brightness, 'screenAvailable')}>
|
||||||
<image iconName={"brightness-high-symbolic"}></image>
|
<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
|
<slider
|
||||||
value={bind(brightness, "screen")}
|
value={bind(brightness, "screen").as(b => Math.round(100 * b))}
|
||||||
hexpand
|
hexpand
|
||||||
max={100}
|
max={100}
|
||||||
min={0}
|
min={0}
|
||||||
|
@ -25,7 +25,6 @@ const QuickView = () => {
|
|||||||
<Audio></Audio>
|
<Audio></Audio>
|
||||||
<BluetoothWidget></BluetoothWidget>
|
<BluetoothWidget></BluetoothWidget>
|
||||||
<NetworkWidget></NetworkWidget>
|
<NetworkWidget></NetworkWidget>
|
||||||
<BrightnessWidget></BrightnessWidget>
|
|
||||||
<image iconName={"system-shutdown-symbolic"}></image>
|
<image iconName={"system-shutdown-symbolic"}></image>
|
||||||
{qa}
|
{qa}
|
||||||
</box>
|
</box>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user