Some uiMultilineEntry fixes.

This commit is contained in:
Pietro Gagliardi 2016-05-12 21:28:30 -04:00
parent 533a9b150e
commit 73c92dfbb5
1 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,6 @@
@implementation intrinsicSizeTextView
// TODO does this prevent shrinking horizontally?
- (NSSize)intrinsicContentSize
{
NSTextContainer *textContainer;
@ -162,6 +161,9 @@ uiMultilineEntry *uiNewMultilineEntry(void)
[e->sv setDocumentView:e->tv];
[e->tv setTranslatesAutoresizingMaskIntoConstraints:NO];
scrollViewConstraintsEstablish(&(e->constraints), e->sv, @"uiMultilineEntry");
// needed to allow horizontal shrinking
// TODO what about vertical text?
[e->tv setContentCompressionResistancePriority:NSLayoutPriorityDefaultLow forOrientation:NSLayoutConstraintOrientationHorizontal];
//TODO:void printinfo(NSScrollView *sv, NSTextView *tv);
//printinfo(e->sv, e->tv);