[fltk.general] MacOS desktop tinting

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

MacOS desktop tinting Mo_Al_ 06:51 Oct 02 top right image
  Hello
This is more of a Cocoa question than an FLTK question, but since my experience with stackoverflow regarding anything Cocoa or Objc related hasn't been stellar, I thought I'd ask here.

Apps running on MacOS's dark mode benefit from desktop tinting. So even if I get dark mode's windowBackgroundColor using:

  void get_windowBackgroundColor(double *r, double *g, double *b, double *a) {                
    NSColor *c = [NSColor windowBackgroundCOlor];                                              
    NSColor *s = [i colorUsingColorSpace:[NSColorSpace deviceRGBColorSpace]]; 
    [s getRed:r green:g blue:b alpha:a];                                       
  }
I use the values to set the FL_BACKGROUND_COLOR or the window's color and they would be correct when disabling desktop tinting, but with desktop tinting enabled, the colors would be off. 
NSColor has a static method, currentControlTint, but it always returns a Blue tint enum value regardless of the desktop color. I have tried enabling transparency of the window using NSWindow's -setAlphaValue:, it helps but only if the window is directly on top of the desktop. 
Is there something I'm missing?
Is there a way to programmatically get the current desktop tint and somehow apply it to an FLTK window?

Thank you

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/0bd0e68d-6c1b-49ef-ba43-b802f2e4d230n%40googlegroups.com.
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.