diff options
| author | nyamatongwe <unknown> | 2013-03-15 23:34:46 +1100 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2013-03-15 23:34:46 +1100 | 
| commit | 93f47df6328a33e7d2044afbe135d1189157e63d (patch) | |
| tree | feeba874832959d2fced7cd5836d46a732310785 /src/ViewStyle.cxx | |
| parent | 9b1adea4079a2384f93acb83bd4d1a7a7b709819 (diff) | |
| download | scintilla-mirror-93f47df6328a33e7d2044afbe135d1189157e63d.tar.gz | |
Use an NSScrollView on Cocoa for kinetic scrolling and hiding scrollbars unless wanted.
Also affects platform-independent code.
Diffstat (limited to 'src/ViewStyle.cxx')
| -rw-r--r-- | src/ViewStyle.cxx | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index f316d264e..9181d9b24 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -198,6 +198,8 @@ ViewStyle::ViewStyle(const ViewStyle &source) {  	}  	maskInLine = source.maskInLine;  	fixedColumnWidth = source.fixedColumnWidth; +	marginInside = source.marginInside; +	textStart = source.textStart;  	zoomLevel = source.zoomLevel;  	viewWhitespace = source.viewWhitespace;  	whitespaceSize = source.whitespaceSize; @@ -306,13 +308,15 @@ void ViewStyle::Init(size_t stylesSize_) {  	ms[2].style = SC_MARGIN_SYMBOL;  	ms[2].width = 0;  	ms[2].mask = 0; -	fixedColumnWidth = leftMarginWidth; +	marginInside = true; +	fixedColumnWidth = marginInside ? leftMarginWidth : 0;  	maskInLine = 0xffffffff;  	for (int margin=0; margin <= SC_MAX_MARGIN; margin++) {  		fixedColumnWidth += ms[margin].width;  		if (ms[margin].width > 0)  			maskInLine &= ~ms[margin].mask;  	} +	textStart = marginInside ? fixedColumnWidth : leftMarginWidth;  	zoomLevel = 0;  	viewWhitespace = wsInvisible;  	whitespaceSize = 1; @@ -387,13 +391,14 @@ void ViewStyle::Refresh(Surface &surface) {  	aveCharWidth = styles[STYLE_DEFAULT].aveCharWidth;  	spaceWidth = styles[STYLE_DEFAULT].spaceWidth; -	fixedColumnWidth = leftMarginWidth; +	fixedColumnWidth = marginInside ? leftMarginWidth : 0;  	maskInLine = 0xffffffff;  	for (int margin=0; margin <= SC_MAX_MARGIN; margin++) {  		fixedColumnWidth += ms[margin].width;  		if (ms[margin].width > 0)  			maskInLine &= ~ms[margin].mask;  	} +	textStart = marginInside ? fixedColumnWidth : leftMarginWidth;  }  void ViewStyle::AllocStyles(size_t sizeNew) {  | 
