vcl/osx/salframeview.mm | 6 ++++++ 1 file changed, 6 insertions(+) New commits: commit 57b88be1e10e131aea429e205fd426b7dab2ba2d Author: Patrick Luby <patrick.l...@collabora.com> AuthorDate: Thu Mar 9 19:37:13 2023 -0500 Commit: Patrick Luby <plub...@neooffice.org> CommitDate: Fri Mar 10 12:34:03 2023 +0000
Reset dark mode colors in HITheme controls after printing In dark mode, after an NSPrintOperation has completed, macOS draws HITheme controls with light mode colors so reset all dark mode colors when an NSWindow gains focus. Change-Id: Ifdbb7d2eff8157ed0d711cf975c2ad1fdcf63495 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148570 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Patrick Luby <plub...@neooffice.org> diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm index 9eded8a40fe8..ae9528306cfa 100644 --- a/vcl/osx/salframeview.mm +++ b/vcl/osx/salframeview.mm @@ -277,6 +277,12 @@ static AquaSalFrame* getMouseContainerFrame() SalFrameStyleFlags::SIZEABLE| SalFrameStyleFlags::CLOSEABLE; + // Reset dark mode colors in HITheme controls after printing + // In dark mode, after an NSPrintOperation has completed, macOS draws + // HITheme controls with light mode colors so reset all dark mode + // colors when an NSWindow gains focus. + mpFrame->UpdateDarkMode(); + if( mpFrame->mpMenu ) mpFrame->mpMenu->setMainMenu(); else if( ! mpFrame->mpParent &&