[Libreoffice-commits] core.git: vcl/source

2019-05-03 Thread Andrew Hyatt (via logerrit)
 vcl/source/control/button.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 89775fd396e413daaf0e71710211075450bdc0ed
Author: Andrew Hyatt 
AuthorDate: Thu May 2 14:33:12 2019 -0400
Commit: Tor Lillqvist 
CommitDate: Fri May 3 12:14:36 2019 +0200

tdf#125088 Make button text white for blue buttons on macOS

Change-Id: I6479b8b1544c5aa8a582854f4db4b4c4c01c28ed
Reviewed-on: https://gerrit.libreoffice.org/71710
Tested-by: Julien Nabet 
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 93aed205fdcb..5ab14d2c2db2 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -812,6 +812,16 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* 
pDev, DrawFlags nDrawFl
 
 if ( nDrawFlags & DrawFlags::Mono )
 aColor = COL_BLACK;
+#ifdef MACOSX
+else if ((nButtonFlags & DrawButtonFlags::Default) && !(GetStyle() & 
WB_FLATBUTTON))
+{
+// Make text color white if the button is a default control on macOS.
+// Without this you get a button with a blue background and blue text
+// which stands out as not looking right on macOS where default buttons
+// have white text and a blue background.
+aColor = COL_WHITE;
+}
+#endif
 else if( (nButtonFlags & DrawButtonFlags::Highlight) && 
IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Entire) )
 {
 if (nButtonFlags & DrawButtonFlags::Pressed)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Andrew Hyatt license statement

2019-05-02 Thread Andrew Hyatt
All of my past & future contributions to LibreOffice may be licensed under the 
MPLv2/LGPLv3+ dual license.

Andrew Hyatt
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice