This commit is contained in:
end-4
2023-12-29 22:00:16 +07:00
parent eb3191d409
commit 97dd57c80c
13 changed files with 644 additions and 440 deletions
@@ -3,6 +3,7 @@ const { GLib, Gtk } = imports.gi;
import { App, Service, Utils, Widget } from '../../imports.js';
import Audio from 'resource:///com/github/Aylur/ags/service/audio.js';
const { Box, Label, ProgressBar, Revealer } = Widget;
import { MarginRevealer } from '../../lib/advancedrevealers.js';
import Brightness from '../../services/brightness.js';
import Indicator from '../../services/indicator.js';
@@ -56,11 +57,14 @@ const volumeIndicator = OsdValue('Volume',
}]],
);
export default () => Revealer({
export default () => MarginRevealer({
transition: 'slide_down',
showClass: 'osd-show',
hideClass: 'osd-hide',
connections: [
[Indicator, (revealer, value) => {
revealer.revealChild = (value > -1);
if(value > -1) revealer._show(revealer);
else revealer._hide(revealer);
}, 'popup'],
],
child: Box({
@@ -4,6 +4,7 @@ const { exec, execAsync } = Utils;
import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';
const { Box, EventBox, Icon, Scrollable, Label, Button, Revealer } = Widget;
import { MarginRevealer } from '../../lib/advancedrevealers.js';
import { AnimatedCircProg } from "../../lib/animatedcircularprogress.js";
import { MaterialIcon } from '../../lib/materialicon.js';
import { showMusicControls } from '../../variables.js';
@@ -343,9 +344,11 @@ const MusicControlsWidget = (player) => Box({
]
})
export default () => Widget.Revealer({
export default () => MarginRevealer({
transition: 'slide_down',
transitionDuration: 170,
revealChild: false,
showClass: 'osd-show',
hideClass: 'osd-hide',
child: Box({
connections: [[Mpris, box => {
let foundPlayer = false;
@@ -371,7 +374,8 @@ export default () => Widget.Revealer({
}),
connections: [
[showMusicControls, (revealer) => {
revealer.revealChild = showMusicControls.value;
if(showMusicControls.value) revealer._show(revealer);
else revealer._hide(revealer);
}],
],
})