diff options
| author | Marko Njezic <unknown> | 2012-02-25 00:02:40 +0100 | 
|---|---|---|
| committer | Marko Njezic <unknown> | 2012-02-25 00:02:40 +0100 | 
| commit | cfc3ab4f4a1ae8224113ec40d3a2bdf244f7fa3c (patch) | |
| tree | 36f8790cf3aafde6d41162e3752eac181a01e0b1 /src/ViewStyle.cxx | |
| parent | 393831bfa0fdcc5db87841ea8d429c9e8275285d (diff) | |
| download | scintilla-mirror-cfc3ab4f4a1ae8224113ec40d3a2bdf244f7fa3c.tar.gz | |
Bug #3493503. Properly redraw image markers with height larger than line height.
Regression from change set 3949.
Diffstat (limited to 'src/ViewStyle.cxx')
| -rw-r--r-- | src/ViewStyle.cxx | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index ab3c68907..b8be22646 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -145,6 +145,7 @@ ViewStyle::ViewStyle(const ViewStyle &source) {  	for (int mrk=0; mrk<=MARKER_MAX; mrk++) {  		markers[mrk] = source.markers[mrk];  	} +	CalcLargestMarkerHeight();  	for (int ind=0; ind<=INDIC_MAX; ind++) {  		indicators[ind] = source.indicators[ind];  	} @@ -230,6 +231,9 @@ void ViewStyle::Init(size_t stylesSize_) {  	fontNames.Clear();  	ResetDefaultStyle(); +	// There are no image markers by default, so no need for calling CalcLargestMarkerHeight() +	largestMarkerHeight = 0; +  	indicators[0].style = INDIC_SQUIGGLE;  	indicators[0].under = false;  	indicators[0].fore = ColourDesired(0, 0x7f, 0); @@ -457,3 +461,19 @@ bool ViewStyle::ValidStyle(size_t styleIndex) const {  	return styleIndex < stylesSize;  } +void ViewStyle::CalcLargestMarkerHeight() { +	largestMarkerHeight = 0; +	for (int m = 0; m <= MARKER_MAX; ++m) { +		switch (markers[m].markType) { +		case SC_MARK_PIXMAP: +			if (markers[m].pxpm->GetHeight() > largestMarkerHeight) +				largestMarkerHeight = markers[m].pxpm->GetHeight(); +			break; +		case SC_MARK_RGBAIMAGE: +			if (markers[m].image->GetHeight() > largestMarkerHeight) +				largestMarkerHeight = markers[m].image->GetHeight(); +			break; +		} +	} +} + | 
