johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
5.93k stars 273 forks source link

Bring back brightness control (solved by working out new Theming)... #1164

Closed ben2talk closed 8 months ago

ben2talk commented 8 months ago

Describe the bug The ability to individually set colours for paper and text disappeared. Also, the Brightness slider disappeared.

Expected behavior Expect to be allowed to set colours for paper and text, and to have a slider to adjust brightness to adjust for comfortable reading in the room conditions.

Version:

johnfactotum commented 8 months ago

The brightness setting was removed in v3. I guess we can bring it back, but it would probably need to apply to the sidebar as well, which I'm not sure how to do because the brightness() filter seems to work differently in GTK.

As for custom themes, see https://github.com/johnfactotum/foliate/blob/gtk4/docs/faq.md#how-to-use-custom-themes.

ben2talk commented 8 months ago

Sadly, my custom themes aren't visible now in Foliate - I still have them from the previous version.

{
  "themes": [
    {
      "theme-name": "Kindle",
      "fg-color": "rgb(42,42,42)",
      "bg-color": "rgb(140,140,116)",
      "link-color": "rgb(17,56,61)",
      "invert": false,
      "dark-mode": false
    }
  ]
}
johnfactotum commented 8 months ago

Yes, the old themes are incompatible with the new version.

ben2talk commented 8 months ago

HAHAHA excellent.

So we moved 'themes.json' into a new folder /themes.

Edited:

{
    "label": "Kindle",
    "light": {
        "fg": "#353535",
        "bg": "#696956",
        "link": "#11383D"
    },
    "dark": {
        "fg": "#353535",
        "bg": "#8C8C74",
        "link": "#11383D"
    }
}

2023-12-06 12:23:22

Thank you so much, it's a winner... I have a comfortably dim screen for reading (like readingi a Kindle at night).

So the brightness control is slightly redundant once we have a theme - it's trivial to edit for brightness and have some alternatives.