diff options
| author | Manolo Gouy <Manolo> | 2014-04-27 15:48:18 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2014-04-27 15:48:18 +0000 |
| commit | b24f66109d25d13bac9130f48064e40d89625567 (patch) | |
| tree | 1a99ee80e9d04d5f61cac6eadc34ad93be106136 | |
| parent | 6d3bb5f75436650d0c647e619dc6a534df131cb1 (diff) | |
Fix STR#3063: compilation using Mac OS 10.4 (cont'd).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10129 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | src/Fl_cocoa.mm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 20404d416..456daf0bf 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3516,6 +3516,7 @@ 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 MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 if (fl_mac_os_version >= 100400 && dynamic_cast<Fl_Printer*>(this)) { // use Cocoa string drawing with exact title bar font NSGraphicsContext *current = [NSGraphicsContext currentContext]; [NSGraphicsContext setCurrentContext:[NSGraphicsContext graphicsContextWithGraphicsPort:fl_gc flipped:YES]];//10.4 @@ -3530,8 +3531,10 @@ void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset) [title_s drawWithRect:r options:(NSStringDrawingOptions)0 attributes:attr]; // 10.4 [[NSGraphicsContext currentContext] setShouldAntialias:NO]; [NSGraphicsContext setCurrentContext:current]; - } - else { + } + else +#endif + { fl_font(FL_HELVETICA, 14); // the exact font is LucidaGrande 13 pts fl_color(FL_BLACK); int x = x_offset + win->w()/2 - fl_width(title)/2; @@ -3539,7 +3542,7 @@ void Fl_Paged_Device::print_window(Fl_Window *win, int x_offset, int y_offset) fl_push_clip(x_offset, y_offset, win->w(), bt); fl_draw(title, x, y_offset+bt/2+4); fl_pop_clip(); - } + } } this->print_widget(win, x_offset, y_offset + bt); // print the window inner part } |
