diff options
author | nyamatongwe <devnull@localhost> | 2013-03-15 23:34:46 +1100 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2013-03-15 23:34:46 +1100 |
commit | 9d124ce8cc3b212187f8b9637bf6c4685377fa87 (patch) | |
tree | 01d292cf11e925824a8f907316527ef7255388f4 /src/ViewStyle.cxx | |
parent | 23d76d437f1089cdd2cc7c01cf011ec21f7f7a63 (diff) | |
download | scintilla-mirror-9d124ce8cc3b212187f8b9637bf6c4685377fa87.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) { |