From ba3fe1fffa5c956b448a8baea16c108f8dc35830 Mon Sep 17 00:00:00 2001 From: anthony Date: Sat, 5 Dec 2020 21:09:22 +0000 Subject: [PATCH] Fix incorrect line-width conversion (and thus broken iframes due to scrollbars) --- README.md | 2 +- frontends/gnustep/PlotView.m | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cd4bad47b..0836a86e4 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Works for basic use, can navigate to, and browse websites. What still needs doing ---------------- -Tabs, iframes(for some reason), downloads, bookmarks, history, +Tabs, downloads, bookmarks, history, other bits and bobs probably. diff --git a/frontends/gnustep/PlotView.m b/frontends/gnustep/PlotView.m index fbac04e22..a366170f7 100644 --- a/frontends/gnustep/PlotView.m +++ b/frontends/gnustep/PlotView.m @@ -68,8 +68,11 @@ static void cocoa_plot_path_set_stroke_pattern(NSBezierPath *path, const plot_st // ignore break; } - - [path setLineWidth: pstyle->stroke_width > 0 ? pstyle->stroke_width : 1]; + if (pstyle->stroke_width == 0) { + [path setLineWidth: 1]; + } else { + [path setLineWidth: plot_style_fixed_to_double(pstyle->stroke_width)]; + } } static void cocoa_plot_render_path(NSBezierPath *path, const plot_style_t *pstyle) @@ -98,7 +101,6 @@ static void cocoa_plot_render_path(NSBezierPath *path, const plot_style_t *pstyl } static nserror plot_clip(const struct redraw_context *ctx, const struct rect *clip) { - NSLog(@"plot_clip"); cocoa_plot_clip_rect = NSMakeRect(clip->x0, clip->y0, clip->x1 - clip->x0, clip->y1 - clip->y0);