FLTK logo

[master] a4a5720 - macOS: minor improvement of capture of window titlebar.

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.commit  ]
 
Previous Message ]Next Message ]

[master] a4a5720 - macOS: minor improvement of capture of window titlebar. "ManoloFLTK" Sep 21, 2020  
 
commit a4a5720658a46dde4e71b9c0991ecbbca567da86
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon Sep 21 18:19:53 2020 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon Sep 21 18:20:07 2020 +0200

    macOS: minor improvement of capture of window titlebar.

 src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx
index e17c983..6525855 100644
--- src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx
+++ src/drivers/Cocoa/Fl_Cocoa_Window_Driver.cxx
@@ -320,7 +320,7 @@ void Fl_Cocoa_Window_Driver::capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl
   CGColorSpaceRef cspace = CGColorSpaceCreateDeviceRGB();
   float s = Fl::screen_driver()->scale(screen_num());
   int scaled_w = int(w() * s);
-  const int factor = (layer ? 4 : 2); // resolution level for the titlebar (2 == retina's)
+  const int factor = (layer && mapped_to_retina() ? 4 : 2); // resolution level for the titlebar (2 == retina's)
   int data_w = factor * scaled_w, data_h = factor * htop;
   uchar *rgba = new uchar[4 * data_w * data_h];
   CGContextRef auxgc = CGBitmapContextCreate(rgba, data_w, data_h, 8, 4 * data_w, cspace, kCGImageAlphaPremultipliedLast);
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

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