summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Luby <patrick.luby@collabora.com>2023-03-09 19:37:13 -0500
committerXisco Fauli <xiscofauli@libreoffice.org>2023-03-16 14:25:01 +0000
commit34f4184969ff1484af967836763a64620490095e (patch)
tree9bda5eab2fbf892b4ba3602ecb6794813be5db1b
parentbump product version to 7.5.2.1.0+ (diff)
downloadcore-34f4184969ff1484af967836763a64620490095e.tar.gz
core-34f4184969ff1484af967836763a64620490095e.zip
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 <caolanm@redhat.com> Reviewed-by: Patrick Luby <plubius@neooffice.org> (cherry picked from commit 57b88be1e10e131aea429e205fd426b7dab2ba2d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148619 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit 9d1faa2ed169cb07e24a722bc37e7f6a6755aa53) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148698 Reviewed-by: Stéphane Guillou <stephane.guillou@libreoffice.org> Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--vcl/osx/salframeview.mm6
1 files changed, 6 insertions, 0 deletions
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 &&