File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1- pub static VERSION : & str = "v0.3.0 " ;
1+ pub static VERSION : & str = "v0.3.1 " ;
Original file line number Diff line number Diff line change @@ -436,6 +436,8 @@ export component VideoPlayer inherits Rectangle {
436436 spacing : Theme.padding * 2 ;
437437
438438 sound-btn := IconBtn {
439+ private property <int > current-sound-cache ;
440+
439441 icon : root .current-sound <= 0 ? Icons.sound-off-fill : Icons.sound-on-fill;
440442 show-icon-hover-background : false ;
441443 icon-size : Theme.icon-size;
@@ -444,10 +446,18 @@ export component VideoPlayer inherits Rectangle {
444446 changed has-hover => {
445447 mouse-on-controls = true ;
446448 root .show-controls = true ;
449+ root .show-sound-slider = true ;
447450 }
448451
449452 clicked => {
450- show-sound-slider = !show-sound-slider;
453+ if (root .current-sound == 0 ) {
454+ root .current-sound = current-sound-cache;
455+ sound-slider.value = current-sound-cache;
456+ } else {
457+ current-sound-cache = root .current-sound;
458+ root .current-sound = 0 ;
459+ sound-slider.value = 0 ;
460+ }
451461 }
452462 }
453463
@@ -477,6 +487,7 @@ export component VideoPlayer inherits Rectangle {
477487 changed has-hover => {
478488 mouse-on-controls = true ;
479489 root .show-controls = true ;
490+ root .show-sound-slider = true ;
480491 }
481492
482493 released (v) => {
Original file line number Diff line number Diff line change @@ -439,6 +439,7 @@ component ControlPanel inherits HorizontalLayout {
439439 colorize : Theme.light-text-color;
440440
441441 clicked => {
442+ record-duration = 0 ;
442443 Logic.stop-recording ();
443444 }
444445 }
You can’t perform that action at this time.
0 commit comments