Skip to content

customizable toolbars #3259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open

customizable toolbars #3259

wants to merge 21 commits into from

Conversation

adipose
Copy link

@adipose adipose commented Feb 1, 2025

This implements toolbars that can have dynamic elements between the first three "static" toolbar elements, and the volume button at the end.

The SVG is based off my old idea of 4 rows active/inactive/active dark/inactive dark (I forget the exact order). However, the svg is designed to support up to 32 buttons eventually, and is sized accordingly.

The customization works by using the CToolbar drag and drop. It's pretty basic, but you can drag a button off the toolbar to delete it, and drag it left and right to drop it elsewhere. I need to see about the newer (mfc) toolbar capabilities, but given that it always used CToolbar, I thought this would be simplest.

The save and load of the toolbar sequence is implemented.

Adding buttons back to the toolbar can currently only be done through the double click customize dialog. That dialog is not themed and also allows adding separators back (we don't want this). If that can't be fixed we can have an simple dialog to adjust the toolbar.

See what you think. This does not merge due to being designed prior to recent toolbar changes.

@clsid2
Copy link
Owner

clsid2 commented Feb 1, 2025

Can you make a test build?

Since the reserved buttons are in the middle of the image, we can't use the image width as an indicator of how many buttons are valid. But perhaps that info could be passed through filename/foldername of an external toolbar. Like "button_bc15.svg" where bc15 means button count 15.
But I think it is better to just avoid all that extra complexity by having designers make a large list of buttons, even ones that we might not actually use yet in short term, but might possibly in more distant future.
For exotic actions users will need to use the generic buttons anyway, and new buttons for common stuff can be determined beforehand.

@adipose
Copy link
Author

adipose commented Feb 3, 2025

Test build:
https://mega.nz/file/MNB3GJTS#tGiMS9LoM8HeaBqrXgEHZm9xgPFkJyr_0-VgJCdKAYI

For valid buttons, my plan was to check for any button data. The region should be left transparent if nothing is designed for that button.

@adipose
Copy link
Author

adipose commented Feb 13, 2025

@clsid2
Copy link
Owner

clsid2 commented Feb 13, 2025

In light theme, the active buttons are light gray and disabled buttons dark. Should be swapped.

The customize toolbar dialog could probably be moved to a new settings page. Where top half of page is used for the button selection/order. And bottom half for button specific options such as assigning commands to future generic buttons.

Current toolbar buttons as the left list and available as right side list? I think that would look a bit more intuitive.

Maybe hide the buttons in the list that have a fixed position? (play/pause/stop/mute/separator)

Reset button does not work properly yet? As a test I moved the next button to after previous.

@adipose
Copy link
Author

adipose commented Feb 13, 2025

In light theme, the active buttons are light gray and disabled buttons dark. Should be swapped.

Fixed. It currently uses the same for light and classic, but we could add a third row.

@adipose
Copy link
Author

adipose commented Feb 13, 2025

The customize toolbar dialog could probably be moved to a new settings page. Where top half of page is used for the button selection/order. And bottom half for button specific options such as assigning commands to future generic buttons.

The dialog it pops up is actually a classic win32 toolbar customization dialog. It probably wouldn't be too hard to reproduce the behavior of it. It shares some behavior with the drag and drop.

Maybe hide the buttons in the list that have a fixed position? (play/pause/stop/mute/separator)

Yes that would be helpful. Have to design the whole thing from scratch to do it.

Reset button does not work properly yet? As a test I moved the next button to after previous.

It doesn't appear to work, no.

@adipose
Copy link
Author

adipose commented Mar 9, 2025

This has an options page now that allows customizing of the toolbar. It's working pretty well. I did notice one quirk where deleting all buttons will require a reset to add back. I'll fix it soon.

@adipose
Copy link
Author

adipose commented Mar 9, 2025

@adipose
Copy link
Author

adipose commented Mar 11, 2025

@clsid2
Copy link
Owner

clsid2 commented Mar 11, 2025

I will check it out very soon

@clsid2
Copy link
Owner

clsid2 commented Mar 12, 2025

The new toolbar settings page works good.

Minor nits:
the columns seem to have slightly different width
the arrow buttons could be a bit better quality

@adipose
Copy link
Author

adipose commented Mar 15, 2025

Made some improvements. The arrows are SVG but maybe something isn't getting smoothed properly.

Repository owner deleted a comment from realgooseman Mar 20, 2025
@adipose
Copy link
Author

adipose commented Mar 26, 2025

Hi @clsid2 and @adipose,

Related to the toolbar, is there currently an option to show runtime/remaining time indicator next to the progress bar ? I'm know there's one via the OSD but is it the only one ? If there isn't it would de great to add that in the toolbar settings.

Optional, but how about having a vertical volume slider as an option in the toolbar settings ?

Made a quick mockup to show what I'm talking about, I'm aware clsid2 has put the project in maintenance mode only so it's just ideas for anyone to pick up and implement (or not).

Toolbar refers only to the buttons, mute button, and volume control. The seekbar is a separate topic, so please open a different issue to discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants