Download it now!
Bug 118320 - Add support for Windows 10 dark mode
Summary: Add support for Windows 10 dark mode
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: high enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice, needsDevEval
: 85373 118607 120725 120841 124302 127776 129131 130002 130335 134697 135293 137411 (view as bug list)
Depends on: 122514
Blocks: UI-Theming Desktop-Integration
  Show dependency treegraph
 
Reported: 2018-06-22 12:51 UTC by Pedro
Modified: 2020-10-16 22:29 UTC (History)
22 users (show)

See Also:
Crash report or crash signature:


Attachments
Windows 10 settings location to enable dark mode (245.88 KB, image/png)
2018-06-22 12:51 UTC, Pedro
Details
Libre Office 6.2Dev with firefox Persona Adwaita Dark (40.12 KB, image/png)
2018-06-22 13:03 UTC, Pedro
Details
Sidebar does not adopt Firefox theme color so it doesn't become dark like it does in dark modes in Linux. (44.39 KB, image/png)
2018-06-22 13:03 UTC, Pedro
Details
Tabbed bar does not adopt a dark mode. It is still in development though. (32.71 KB, image/png)
2018-06-22 13:04 UTC, Pedro
Details
Groupedbar adopts Firefox themes. (40.92 KB, image/png)
2018-06-22 13:05 UTC, Pedro
Details
Microsoft Word Dark mode (57.28 KB, image/png)
2018-06-22 13:06 UTC, Pedro
Details
Krita(https://krita.org/en/)(Please copy "Krita" directly, because "Krita" is "free software.") (181.58 KB, image/png)
2019-02-19 08:13 UTC, 00
Details
science source of short sightedness is white background (3.54 MB, application/pdf)
2019-08-23 23:04 UTC, paulystefan
Details
german pdf print of geo article against short sightedness (deleted)
2020-04-02 09:35 UTC, paulystefan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro 2018-06-22 12:51:45 UTC
Created attachment 143034 [details]
Windows 10 settings location to enable dark mode

Currently, LibreOffice adopts an amazing dark mode when in Linux DE's.
However, Microsoft is adding a dark mode to Windows 10. So it would be nice if LibreOffice could have a dark mode that would be turned on when enabling dark mode in Windows 10.

Granted Windows 10 dark mode is still a work in progress and is limited to Microsoft native apps and UWP apps.
A Microsoft blog post talking about Dark mode and how to enable it for UWP apps.
https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/set-dark-mode

A howtoGeek post talking about it and the new MacOS Mojave dark mode:
https://www.howtogeek.com/354933/macos-mojaves-dark-mode-puts-windows-10s-to-shame/

However, Office 2016 has a great dark mode as well and it would be nice to see LO also having a dark mode.

Right now there are several issues with dark mode in Windows 10. I added a few in the attachment
Comment 1 Pedro 2018-06-22 13:03:11 UTC
Created attachment 143036 [details]
Libre Office 6.2Dev with firefox Persona Adwaita Dark

Things that do not adopt a dark color:
1 - The Sidebar,
2 - The menus,
3 - The Tabbed bar,
4 - The toolbars,
5 - The application background.

The only way to have a semblance of a dark mode in LibreOffice right now is:
Select a Firefox theme. Adwaita Dark works best with the Colibre icons.
This skins the toolbars, but not anything else as I'll show in the attachments.
Comment 2 Pedro 2018-06-22 13:03:57 UTC
Created attachment 143037 [details]
Sidebar does not adopt Firefox theme color so it doesn't become dark like it does in dark modes in Linux.
Comment 3 Pedro 2018-06-22 13:04:41 UTC
Created attachment 143038 [details]
Tabbed bar does not adopt a dark mode. It is still in development though.
Comment 4 Pedro 2018-06-22 13:05:22 UTC
Created attachment 143039 [details]
Groupedbar adopts Firefox themes.
Comment 5 Pedro 2018-06-22 13:06:35 UTC
Created attachment 143040 [details]
Microsoft Word Dark mode

This is Microsoft Word 2016 dark mode. Notice how it adopts a not so dark grey in the Ribbon so that they don't have to change icon set. Same goes for Powerpoint and Excel.
Comment 6 V Stuart Foote 2018-06-24 14:43:39 UTC
This needs attention, but will depend on MS publishing API for accessing the theme colors for Desktop (i.e. non UWP use), likewise for Apple providing details for accessing them colors for Mojave builds.

With those details, beleive we could map os theme details to LO GUI. Until then, this should just sit on a back burner as any implementation effort is premature.
Comment 7 Pedro 2018-06-25 09:49:34 UTC
I agree that this is lower on the priority list right now. 
However, this should be looked at for 6.2. In Build 2018 Microsoft revealed a lot of stuff.

And Fluent Design support is coming for win32 apps, this means for LO as well. So I'm just drawing attention to this right now... Hopefully we don't have to select the dark colors of W10 because they really don't know how to design a proper dark theme.

https://www.microsoft.com/en-us/microsoft-365/blog/2018/05/07/microsoft-365-empowers-developers-to-build-intelligent-apps-for-where-and-how-the-world-works/?irgwc=1&OCID=AID681541_aff_7593_159229&tduid=(ir_QRd0L-WqqUDI2QA1u1VxfxhfUkjTD3RT2ygWS80)(7593)(159229)()(UUwpUdUnU55829YYwYg)&irclickid=QRd0L-WqqUDI2QA1u1VxfxhfUkjTD3RT2ygWS80

This post details what's coming. It mentions the Fluent Design support. Furthermore, LO should add support for Sets (the OS-level tab system that Microsoft is implementing) immediately when it launches.
Comment 8 Pedro 2018-06-25 09:53:19 UTC
The Redstone 5 update will come in the Fall. Right when 6.2 development is occurring. If we react swiftly to this LibreOffice will draw a lot of attention from users. :)

If we provide a dark theme and Set support in 6.2 a lot of people will want to try LO.
Comment 9 Pedro 2018-06-25 10:16:51 UTC
So, here's more information:

UWP apps use XAML, a markup-based language that makes it easier to create user interfaces. 

XAML example:
<Grid BorderBrush="Blue" BorderThickness="4">
    <TextBox Text="Design with XAML" Margin="20" Padding="24,16"/>
</Grid>

https://docs.microsoft.com/en-us/windows/uwp/design/fluent-design-system/

UWP apps can use a light or dark color scheme:
https://docs.microsoft.com/en-us/windows/uwp/design/style/color

Theme can be changed by changing the requested theme property in the App.xaml file:
<Application
    x:Class="App9.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App9"
    RequestedTheme="Dark">
</Application>

https://docs.microsoft.com/en-us/windows/uwp/design/style/color

There's a loooot of stuff to fine tune there.

This is relevant because, in Build 2018 they announced XAML islands for legay software like win32 apps, WPF and WinForms:

https://developer.microsoft.com/en-us/events/build/content/announcing-uwp-xaml-islands?playlist=80d147e8-f3b0-4ca0-a96f-cfc8e80bec20

https://www.windowscentral.com/microsoft-giving-developers-access-fluent-design-win32-apps-and-more
Comment 10 V Stuart Foote 2018-06-26 04:49:20 UTC
(In reply to Pedro from comment #9)
> ...
> 
> This is relevant because, in Build 2018 they announced XAML islands for
> legay software like win32 apps, WPF and WinForms:
> 
> https://developer.microsoft.com/en-us/events/build/content/announcing-uwp-
> xaml-islands?playlist=80d147e8-f3b0-4ca0-a96f-cfc8e80bec20
> 
> https://www.windowscentral.com/microsoft-giving-developers-access-fluent-
> design-win32-apps-and-more

That may be, but LibreOffice being cross platform we can not jump on every MS SDK twist. Do you somehow think Windows 7, Windows 8|8.1, or Windows 10 will support the XAML?  I seriously doubt it...

Meaning, if MS publishes a valid API for C++ development of win32 Desktop apps--only then can we adopt changes to MS theming to our internal handling of theme colors. And support all our Windows targets.

This is a valid goal, but a lot remains to be seen with how MS implements.
Comment 11 Pedro 2018-06-26 09:37:40 UTC
(In reply to V Stuart Foote from comment #10)
 
> That may be, but LibreOffice being cross platform we can not jump on every
> MS SDK twist. Do you somehow think Windows 7, Windows 8|8.1, or Windows 10
> will support the XAML?  I seriously doubt it...
> 
> Meaning, if MS publishes a valid API for C++ development of win32 Desktop
> apps--only then can we adopt changes to MS theming to our internal handling
> of theme colors. And support all our Windows targets.
> 
> This is a valid goal, but a lot remains to be seen with how MS implements.

Agreed. I was just already gathering information for anyone that might be interested already. 
When I notice that there's more info about when this will be available for win32 desktop apps I'll immediately add it here.
Comment 12 Heiko Tietze 2018-07-07 12:26:59 UTC
*** Bug 118607 has been marked as a duplicate of this bug. ***
Comment 13 Adolfo Jayme 2018-10-20 09:08:14 UTC
*** Bug 120725 has been marked as a duplicate of this bug. ***
Comment 14 V Stuart Foote 2018-10-23 19:30:10 UTC
*** Bug 120841 has been marked as a duplicate of this bug. ***
Comment 15 Heiko Tietze 2018-11-09 11:35:09 UTC
Don't think this topic needs more attention from UX. And besides, you need to CC needsUXEval to the ux-advice ML.
Comment 16 Adolfo Jayme 2019-02-19 02:14:55 UTC
Chromium has managed to find the Registry key to parse for dark mode from a non-UWP program, although it’s a flaky method: https://chromium.googlesource.com/chromium/src/+/63e92830db63d5b7d03c245dda083cb4e7f33ea8%5E%21/
Comment 17 00 2019-02-19 07:49:59 UTC
Complete the following article, you can do "dark mode."
https://bugs.documentfoundation.org/show_bug.cgi?id=123544
Comment 18 00 2019-02-19 08:13:55 UTC Comment hidden (off-topic)
Comment 19 00 2019-02-20 06:19:33 UTC
"Dark mode", please do "black 100%".
Comment 20 Pedro 2019-03-15 09:41:18 UTC
Microsoft open-sourced their UWP calculator with an MIT license (it's based on their win32 calc.exe).
https://www.zdnet.com/article/microsoft-is-open-sourcing-windows-calculator-on-github/
https://blogs.windows.com/buildingapps/2019/03/06/announcing-the-open-sourcing-of-windows-calculator/

Now it's possible to look at its code to see how to adopt Dark Mode for LibreOffice.

https://github.com/Microsoft/calculator
Comment 21 V Stuart Foote 2019-03-25 12:41:04 UTC
*** Bug 124302 has been marked as a duplicate of this bug. ***
Comment 22 V Stuart Foote 2019-04-26 12:19:21 UTC
*** Bug 124969 has been marked as a duplicate of this bug. ***
Comment 23 paulystefan 2019-08-23 23:04:23 UTC Comment hidden (no-value)
Comment 24 Heiko Tietze 2019-08-26 07:21:27 UTC Comment hidden (off-topic)
Comment 25 Roman Kuznetsov 2019-12-01 16:53:55 UTC
*** Bug 129131 has been marked as a duplicate of this bug. ***
Comment 26 Prabesh432@gmail.com 2019-12-02 06:25:58 UTC
what I do not understand is why this enhancement request title is for Windows-specific only?

I want this on my Ubuntu 19.19 too. Basically all Linux distros.

Writing documents in white background suck my eyes ball.

Changing the document property to mimic Windows-like Dark mode is painful especially when u have to share that document with your friends.

I wonder, why this simple concept is not even implemented yet. I heard people use VS Code to write and last paste that document in LO Writer. That's sucks.

There should be an option to makes things more comfortable. Like MS Word introduced.
Comment 27 Mike Kaganski 2019-12-02 06:32:05 UTC
(In reply to Prabesh432@gmail.com from comment #26)
> what I do not understand is why this enhancement request title is for
> Windows-specific only?
> 
> I want this on my Ubuntu 19.19 too. Basically all Linux distros.

Because for Ubuntu, another enhancement request would be titled "Add support for Ubuntu ... mode". And implementing that request would need other code changes (surprise, implementing platform-specific modes need platform-specific changes). And tracking those different goals in one issue is unreasonable (since bug tracker is a tool *for developers* to enable to track what is done and what needs to be done yet in a specific limited issue). And the only relation between those issues would be a "see also" link, and/or blocking a common meta bug.
Comment 28 Heiko Tietze 2019-12-02 07:46:39 UTC
(In reply to Mike Kaganski from comment #27)
> Because for Ubuntu, another enhancement request...

...was created by Prabesh in bug 124969. Point is that "dark mode" means to more or less automatically adjust the configuration. You can make the app dark as hell manually, check tools > options > app colors (and tools > options > view > icon style for "breeze (dark)").

Consider also to save and share your dark app colors as extension (not sure if possible).
Comment 29 Xisco Faulí 2019-12-02 13:19:36 UTC
it seems like an enhancement to me.
Changing priority to 'high' since the number of duplicates is higher than 5 or the number of people in CC higher than 20
Comment 30 kramerv 2020-01-15 17:42:36 UTC
*** Bug 130002 has been marked as a duplicate of this bug. ***
Comment 31 Roman Kuznetsov 2020-02-01 23:24:00 UTC
*** Bug 130335 has been marked as a duplicate of this bug. ***
Comment 32 paulystefan 2020-04-02 09:35:14 UTC Comment hidden (obsolete)
Comment 33 paulystefan 2020-04-02 09:53:39 UTC Comment hidden (obsolete)
Comment 34 Heiko Tietze 2020-04-02 11:04:34 UTC Comment hidden (off-topic)
Comment 35 Buovjaga 2020-04-02 14:31:04 UTC Comment hidden (off-topic)
Comment 36 Buovjaga 2020-04-24 18:26:54 UTC
*** Bug 127776 has been marked as a duplicate of this bug. ***
Comment 37 Buovjaga 2020-07-09 18:42:41 UTC
*** Bug 134697 has been marked as a duplicate of this bug. ***
Comment 38 V Stuart Foote 2020-08-02 22:50:28 UTC
*** Bug 135293 has been marked as a duplicate of this bug. ***
Comment 39 V Stuart Foote 2020-09-29 23:05:49 UTC
*** Bug 85373 has been marked as a duplicate of this bug. ***
Comment 40 V Stuart Foote 2020-10-11 16:44:04 UTC
@Mike, Tomaž, *

In comment 16, Adolfo had mentioned the 'AppsUseLightTheme' registry detection that the Chromium project had adopted. That looks to still be valid--but does not directly read the Windows UI theme.

One of the other suggestions in a Stack Overflow thread [1] is that the Windows RT API does support use on normal win32 desktop programs.

Looking at winrt API [2], example suggests with

#include <winrt/Windows.UI.ViewManagement.h>
using namespace winrt::Windows::UI::ViewManagement;

calls to the winrt UISettings namespace expose the UWP and Desktop UI to c++ calls for normal win32 desktop apps.

It would be Windows 10 only, but if not too problematic for building, it might expose the full Windows UI theming for LO to parse?

Win7, Win8.1 would remain unsupported--and issues with HC mode toggle like bug 99116 would remain.


=-ref-=
[1] https://stackoverflow.com/questions/51334674/how-to-detect-windows-10-light-dark-mode-in-win32-application

[2] https://docs.microsoft.com/en-us/uwp/api/Windows.UI.ViewManagement.UISettings?view=winrt-19041
Comment 41 V Stuart Foote 2020-10-12 17:51:10 UTC
*** Bug 137411 has been marked as a duplicate of this bug. ***
Comment 42 V Stuart Foote 2020-10-12 17:51:33 UTC
*** Bug 137414 has been marked as a duplicate of this bug. ***