From 119825f0de6787d8e96665510e7030394f4841c5 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 28 May 2016 00:35:56 -0400 Subject: [PATCH] More scroll view refinements. --- darwin/multilineentry.m | 3 ++- darwin/scrollview.m | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/darwin/multilineentry.m b/darwin/multilineentry.m index afcb1fec..aa77891d 100644 --- a/darwin/multilineentry.m +++ b/darwin/multilineentry.m @@ -171,7 +171,8 @@ static uiMultilineEntry *finishMultilineEntry(BOOL hscroll) memset(&p, 0, sizeof (struct scrollViewCreateParams)); p.DocumentView = e->tv; - p.BackgroundColor = nil; + // this is what Interface Builder sets it to + p.BackgroundColor = [NSColor colorWithCalibratedWhite:1.0 alpha:1.0]; p.DrawsBackground = YES; p.Bordered = YES; p.HScroll = hscroll; diff --git a/darwin/scrollview.m b/darwin/scrollview.m index 90ef504f..6f441e04 100644 --- a/darwin/scrollview.m +++ b/darwin/scrollview.m @@ -17,14 +17,13 @@ NSScrollView *mkScrollView(struct scrollViewCreateParams *p, struct scrollViewDa struct scrollViewData *d; sv = [[NSScrollView alloc] initWithFrame:NSZeroRect]; - // TODO verify background color for programmatically created NSTextView if (p->BackgroundColor != nil) [sv setBackgroundColor:p->BackgroundColor]; [sv setDrawsBackground:p->DrawsBackground]; border = NSNoBorder; if (p->Bordered) border = NSBezelBorder; - // TODO verify document cursor for programmatically created NSTextView + // document view seems to set the cursor properly [sv setBorderType:border]; [sv setAutohidesScrollers:YES]; [sv setHasHorizontalRuler:NO]; @@ -32,7 +31,7 @@ NSScrollView *mkScrollView(struct scrollViewCreateParams *p, struct scrollViewDa [sv setRulersVisible:NO]; [sv setScrollerKnobStyle:NSScrollerKnobStyleDefault]; // the scroller style is documented as being set by default for us - // TODO verify line and page for programmatically created NSTextView + // LONGTERM verify line and page for programmatically created NSTableView [sv setScrollsDynamically:YES]; [sv setFindBarPosition:NSScrollViewFindBarPositionAboveContent]; [sv setUsesPredominantAxisScrolling:NO];