Closed Heath123 closed 2 months ago
The engine itself does support CSS theming. And there are multiple built-in themes. So it's indeed would good to let community create own themes. Changes would be minimal. Just look up for external themes in a specific directory, like %AppData%/OnlyOffice/themes in Windows and ~/.config/OnlyOffice/themes in nixes.
World be also nice to split off iconsets from themes. But that would require some work.
And let change color of titlebar.
Hello, @Heath123 and @regs01. Thank you for question. I think, this guide will help you. If so, can we close the issue?
There is a folder AppData\Local\ONLYOFFICE\DesktopEditors in Windows. Can you also make it read themes somewhere from there, where admin rights are not required.
Hello, @Heath123 and @regs01. Thank you for question. I think, this guide will help you. If so, can we close the issue?
Thanks, a colour theme is nice but isn't quite what I'm looking for here because I wanted a way to load arbitrary CSS which would allow much deeper customisation. If this JSON file had a field for this it would be perfect, but I'm not sure if there are security issues. Also, the documentation is for the web apps, is this available for the desktop editors too?
Hello, @Heath123 and @regs01. Thank you for question. I think, this guide will help you. If so, can we close the issue?
Thanks, a colour theme is nice but isn't quite what I'm looking for here because I wanted a way to load arbitrary CSS which would allow much deeper customisation. If this JSON file had a field for this it would be perfect, but I'm not sure if there are security issues. Also, the documentation is for the web apps, is this available for the desktop editors too?
It is CSS, not just color themes. And couple of years ago, when I tried to make another theme, abandoned half way through though, icons were set as background in CSS.
Hello, @Heath123 and @regs01. Thank you for question. I think, this guide will help you. If so, can we close the issue?
Thanks, a colour theme is nice but isn't quite what I'm looking for here because I wanted a way to load arbitrary CSS which would allow much deeper customisation. If this JSON file had a field for this it would be perfect, but I'm not sure if there are security issues. Also, the documentation is for the web apps, is this available for the desktop editors too?
It is CSS, not just color themes. And couple of years ago, when I tried to make another theme, abandoned half way through though, icons were set as background in CSS.
The documentation only mentions setting colour variables, I didn't see anything about CSS?
The documentation only mentions setting colour variables, I didn't see anything about CSS?
Looked up on it, and it looks like you are right. There is no way to connect color theme with CSS. Prebuilt themes are all stored in a single CSS file app.css
for each app. While theme JSON only allow you to change some colors variables and does not allow you to connect it with own CSS file.
More than that. I tried making a color theme. Created file c:\Program Files\ONLYOFFICE\DesktopEditors\editors\web-apps\apps\common\main\resources\themes\amazing-test.json
with next content, but it does not appear in list of themes.
{
"name": "Amazing theme",
"l10n": {
"fr": "Thème incroyable",
"de": "Geweldig thema"
},
"id" : "theme-amazing",
"type" : "light",
"colors" : {
"toolbar-header-document" : "#446995",
"toolbar-header-spreadsheet" : "#40865c",
"toolbar-header-presentation" : "#aa5252",
"border-color-shading" : "rgba(0, 0, 0, 0.15)"
}
}
Sorry, this can't be done in the Desktop Editors right now. I created issue #63751 so that we can add it in one of the future versions.
In the new version, which will be released soon, we have added the ability to add interface themes using .json files. If you have questions about how this functionality works, you can ask them in this issue. Thank you for your request.
Still, it would be good to have ability to attach CSS file to the theme. JSON only allows to change colors, but not layout (paddings, margins, borders, dimensions etc) and icons.
Also, if JSON file missing some parameters, like l10n, or has an error, Setting page won't fully load.
@regs01 Could you please issue a separate issue for this so that I can assign a new number for your request?
DesktopEditors v8.1.0 is released so I close this issue. Feel free to comment or reopen it if you got further questions.
This issue is unique.
Your idea.
It would be nice if there was a way to load custom CSS themes. Or is this already possible with the plugin system?