Login  Register

Re: Add code for the PianoBooster metronome

Posted by mark-Dutton on Mar 28, 2021; 3:32am
URL: http://piano-booster.139.s1.nabble.com/Add-code-for-the-PianoBooster-metronome-tp7572964p7572969.html

Update:
So I've added a simple metronome button to the GuiTopBar. I haven't really looked around too much but I thought this one went okay with the rest of the icons:


which I found on this website: https://www.iconfinder.com/icons/4937148/instrument_metronome_music_musical_pace_pendulum_sound_icon (might need to purchase before use)

Still have to implement the actual functionality of the metronome to the on_metronome_clicked function I added but I implemented a simple toggle where the background colour of the button is set to blue (using the QPalette) when metronome is on and just keeping the image the same.

For off:


For on:


And when you hover over the button it reads: "Start and stop Metronome"

The only problem is the background highlighting adds ugly looking borders as the icon is a rounded png. Might have to add another image with some blue highlighting or play around a bit more with the qt style sheets.