vcl/osx/salframeview.mm |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 9d1faa2ed169cb07e24a722bc37e7f6a6755aa53
Author:     Patrick Luby <patrick.l...@collabora.com>
AuthorDate: Thu Mar 9 19:37:13 2023 -0500
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Fri Mar 10 15:04:07 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>

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 &&

Reply via email to