vcl/osx/salframeview.mm | 6 ++++++ 1 file changed, 6 insertions(+) New commits: commit 34f4184969ff1484af967836763a64620490095e Author: Patrick Luby <patrick.l...@collabora.com> AuthorDate: Thu Mar 9 19:37:13 2023 -0500 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Mar 16 14:25:01 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> (cherry picked from commit 57b88be1e10e131aea429e205fd426b7dab2ba2d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148619 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> (cherry picked from commit 9d1faa2ed169cb07e24a722bc37e7f6a6755aa53) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148698 Reviewed-by: Stéphane Guillou <stephane.guil...@libreoffice.org> Tested-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm index b1d44b612e51..a9261db8957b 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 &&