Skip to content
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

Add Advanced Theme Support #1248

Open
Phergus opened this issue Feb 6, 2020 · 7 comments
Open

Add Advanced Theme Support #1248

Phergus opened this issue Feb 6, 2020 · 7 comments
Labels
documentation needed Missing, out-of-date or bad documentation feature Adding functionality that adds value up for grabs Minimal context and are well-suited for new contributors

Comments

@Phergus
Copy link
Contributor

Phergus commented Feb 6, 2020

Is your feature request related to a problem? Please describe.
A continuation of the work started in #921 .

Describe the solution you'd like

What remains to be done

Change theme to be represented by a directory under .maptool-rptools/themes/ui
The directory structure should contain

  • theme.json - A json file which contains:
    • theme name
    • mapping from icon names to icon file names
  • mylaf.theme - A TinyLaF theme file.
  • icons - A directory.
    • all the icon files

A new class ThemeSupport which will read the directory and json file above and provide methods to get the image for the different icons, and the file name for the tinylaf theme. The uses of the public static fields to retrieve images or image names for the UI need to be changed to use ThemeSupport.

Context
See #921 for more discussion of icons and such.

@Phergus Phergus added feature Adding functionality that adds value up for grabs Minimal context and are well-suited for new contributors documentation needed Missing, out-of-date or bad documentation labels Feb 6, 2020
@Azhrei
Copy link
Member

Azhrei commented Apr 16, 2020

It looks like a PR for this must have been merged but this ticket was never closed...?

In any case, the existing code is installing the UI themes every time MapTool starts (on macOS using MT 1.6.1). In fact, the log file (attached) shows it happening twice at every startup.

maptool.log

@cwisniew
Copy link
Member

cwisniew commented Apr 16, 2020

It looks like a PR for this must have been merged but this ticket was never closed...?

Work hasn't started on this issue as its to expand the current behaviour.

In any case, the existing code is installing the UI themes every time MapTool starts (on macOS using MT 1.6.1). In fact, the log file (attached) shows it happening twice at every startup.

maptool.log

At the moment it updates on every start as its quick and guarantees users have latest updates to a theme without having to track first run of a version. Probably likely to happen in the future too.

The double install is a bug that needs to be addressed (although thankfully a minor one that can wait for this issue to be picked up if no one wants to tackle it first).

@nmeier
Copy link
Contributor

nmeier commented May 9, 2020

I like the icon pack idea - if there is a toolkit that builds the scaled .png images out of checked in svg files, and assembles them at runtime into an appropriate scaled choice, that would make creating those packs very easy. One button -> one svg image to provide. Compile the pack into resource pack, render selection, disabled, theme color etc. automatically.

image

I'd be willing to help out. Would need help to categorize the existing icons and find svg candidates.

@Azhrei
Copy link
Member

Azhrei commented May 9, 2020

... if there is a toolkit that builds the scaled .png images out of checked in svg files, and assembles them at runtime into an appropriate scaled choice, ...

Agreed.

Ideally, the results would be added to the AssetManager so that they are put into the asset cache and don’t need to be calculated again.

@mrkwnzl
Copy link
Contributor

mrkwnzl commented May 9, 2020

@nmeier Let me know if I can help finding, converting or editing some of the icons.

@nmeier
Copy link
Contributor

nmeier commented May 11, 2020

Keeping this link here as well https://game-icons.net/

Planning to assess and list out all current tool icons - maybe put them in a google sheet to review. Then think about how a theme can look like that supports the icons at least.

@bubblobill
Copy link
Collaborator

Should this be closed now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation needed Missing, out-of-date or bad documentation feature Adding functionality that adds value up for grabs Minimal context and are well-suited for new contributors
Projects
None yet
Development

No branches or pull requests

6 participants