m-pilia / plasma-applet-ambientnoise

Ambient noise player applet (plasmoid) for KDE Plasma 6
GNU General Public License v3.0
17 stars 4 forks source link

Show start or play when ambientnoise not playing? #11

Closed roachsinai closed 5 years ago

roachsinai commented 5 years ago

image

Seems always show Pause now.

roachsinai commented 5 years ago

Press right mouse button on ambientnoise icon will show the above image.

m-pilia commented 5 years ago

Hi! Good catch, thanks! Should be fixed in the fix-playpause branch.

roachsinai commented 5 years ago

So, mainly these two line https://github.com/m-pilia/plasma-applet-ambientnoise/blob/12f2787f76dfe41ca4812b7ce727ec2af5d6ef9a/plasmoid/contents/js/scripts.js#L134 changes the text which I focus? I'm new to qml and qt. And know more thing at Context menu follow your code.

Thanks for your work. Will test it.

roachsinai commented 5 years ago

Worked!

m-pilia commented 5 years ago

So, mainly these two line

Yes, those lines replace a "play" action with "pause" in the context menu, and vice versa. Not an elegant solution, it would be better if it was possible to use property binding but afaik it should not be possible for the arguments of addAction().

Worked!

Great, thanks for reporting this!