Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Possible to have Custom Buttons for Dark & Light Mode? (Read 796 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Possible to have Custom Buttons for Dark & Light Mode?

Is it possible for non developer fb2k users to create custom buttons that show up correctly for both Dark and Light mode?

Below are my custom buttons for both Dark and Light mode, CUI and DUI. To switch the buttons between the two modes requires two sets of graphics. The Columns UI buttons are easier to switch between the two modes than the Default UI buttons.

CUI
X
X

DUI
X
X

Since I switch between Dark and Light mode depending on my needs. I'm just wondering about a way to have one set of buttons to cover both Modes.

I will add that switching between Dark and Light mode isn't so important to me as to require two separate portable installations, one of each mode.

Re: Possible to have Custom Buttons for Dark & Light Mode?

Reply #1
I made my own icons, adding a white stripe on the outside or filling the inside with white.
I've done this, it's the same icons:

X
X

I spent some time doing this. It's not as clean as I'd like. I don't know any other way.

Re: Possible to have Custom Buttons for Dark & Light Mode?

Reply #2
Come to think of it, there are other ways, but it's no longer the icons themselves:
- with CUI, you can save layouts. So having one layout for the light theme and another for the dark theme (with the corresponding icons). You can then change the layout using the View > Layout menu, or a button or a keyboard shortcut. This doesn't change the main toolbar at the top, but it does change the other toolbars, so an additional toolbar is required.
- with DUI, you can save themes in a .fth file  (in Preferences > Display > DUI > Import / Export Theme ). The theme used is the theme.fth file in the configuration folder (Roaming folder). When I double-click on a .fth file, it imports the theme into foobar. But it also brings up a “Choose Theme Sections to Import” window every time. And it depends on your layout, but I find it slower than with CUI.
- I use Auto Dark Mode to automatically change the system theme in the morning and evening. It can be used to automatically trigger scripts. I use AutoHotkey to trigger keyboard shortcuts (e.g. change layout in CUI). It also lets you do lots of other things, like open a theme.fth file (for DUI), modify a registry key, change a setting in a file, replace a file, click wherever you want... I use this for a few programs that don't have automatic theme changes (it's a bit complicated to do). I'm glad dark mode has been added to foobar2000 and CUI.
- Maybe with a toolbar made with a javascript panel? JScript Panel or Spider Monkey Panel. It should be possible to make a toolbar that changes theme automatically (I've already made a volume button that follows the dark or light mode, from SMP's sample scripts, so it should be possible). But I have no idea if it's possible to redo all the buttons in javascript. I don't know much about it, so I can't say.
I'm saying some things from memory, so I hope I'm not talking too much nonsense.

Re: Possible to have Custom Buttons for Dark & Light Mode?

Reply #3
A script included with JScript Panel 3 already does this...



The obvious downside is that adding your own buttons is not easy.

FWIW, it works by drawing single font symbols so the colour/size can be anything. I use the Segoe Fluent Icons font for my own scripts but anyone writing their own can use whatever font they want.

https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font

edit: the included script is called "Menu + Playback Buttons + Custom Colours" available from the Samples button in the Configuration window.


Re: Possible to have Custom Buttons for Dark & Light Mode?

Reply #4
Great! Thanks for your comment @marc2k3 .