anki-enhance-main-window icon indicating copy to clipboard operation
anki-enhance-main-window copied to clipboard

How to change header color?

Open qaqcvc opened this issue 5 years ago • 3 comments

I use night mode. And the color of header is green. When I disable night mode, the color of header is black. I can not find any code to change the color of header. Is there any way to do this? Thanks!

qaqcvc avatar Jan 08 '20 22:01 qaqcvc

Did you take a look at the add-on configuration ? Normally, a lot of things are configurable. The configuration manual should be displaied in the configuration window

Arthur-Milchior avatar Jan 09 '20 00:01 Arthur-Milchior

@Arthur-Milchior there doesn't seem to be an option to change the default color of all column titles.

I tried to investigate using the 2nd column title "Learning now (later today (other day))". There is no such option in the config, but I found in https://github.com/Arthur-Milchior/anki-enhance-main-window/blob/2a8ad130e4f29b754775ab8748ebea2774e342cf/strings.py#L12 that it corresponds to the name "learning all".

        {
            "absolute": true,
            "color": null,
            "description": "Cards in learning which are due now (and in parentheses, the number of reviews which are due later)",
            "header":null,
            "name": "learning all",
            "overlay": null,
            "percent": false,
            "present": true,
            "subdeck": true
        },

Changing the color only affect the color of the values (numbers), not the header. Modifying header will set the value as title content. From https://github.com/Arthur-Milchior/anki-enhance-main-window/blob/2a8ad130e4f29b754775ab8748ebea2774e342cf/config.md#header, I understood that we can add html code.

        {
            "absolute": true,
            "color": null,
            "description": "Cards in learning which are due now (and in parentheses, the number of reviews which are due later)",
            "header": "<span style='color: #de935f'>Learning now</span>",
            "name": "learning all",
            "overlay": null,
            "percent": false,
            "present": true,
            "subdeck": true
        },

Now my header is shown in the correct color, but having to manually modify all headers this way is tedious.

image

I think we just want a global setting to set the headers color:

{
    "book symbol": "{",
    "cap value": null,
    "color empty": "#cc6666",
    "color empty descendant": "#b5bd68",
    "color zero": false,
    "columns": [...],
    "default column color": "#e0e0e0",
   "color headers": "#de935f"   // <--- the new field.

AdrienLemaire avatar Jan 14 '20 01:01 AdrienLemaire

Okay. I'll take a loot at it. Thanks for the explanaiton

Arthur-Milchior avatar Jan 14 '20 19:01 Arthur-Milchior