diff options
| author | Manolo Gouy <Manolo> | 2014-01-30 07:10:37 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2014-01-30 07:10:37 +0000 |
| commit | e19ea8eb33a70d06e6493c4abb59f3f336883f39 (patch) | |
| tree | 117914fad9b7545ee6f1764161cad232ba5bdd55 /src | |
| parent | 6c90855eada5d48079441d410aa4ab785a463b59 (diff) | |
Mac OS: have Fl_Paged_Device::print_window() support all devices.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10088 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 14ea72303..889ae54d4 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3458,12 +3458,12 @@ void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset) delete[] bitmap; if (title) { // print the window title const int skip = 68; // approx width of the zone of the 3 window control buttons - if (fl_mac_os_version >= 100400) { // use Cocoa string drawing with exact title bar font + if (fl_mac_os_version >= 100400 && dynamic_cast<Fl_Quartz_Graphics_Driver*>(this->driver())) { // use Cocoa string drawing with exact title bar font NSGraphicsContext *current = [NSGraphicsContext currentContext]; [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:fl_gc flipped:YES]];//10.4 NSDictionary *attr = [NSDictionary dictionaryWithObject:[NSFont titleBarFontOfSize:0] forKey:NSFontAttributeName]; - NSString *title_s = [NSString stringWithUTF8String:title]; + NSString *title_s = [fl_xid(win) title]; NSSize size = [title_s sizeWithAttributes:attr]; int x = x_offset + win->w()/2 - size.width/2; if (x < x_offset+skip) x = x_offset+skip; |
