diff options
Diffstat (limited to 'src/ViewStyle.cxx')
-rw-r--r-- | src/ViewStyle.cxx | 115 |
1 files changed, 41 insertions, 74 deletions
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 08164f648..ab3c68907 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -150,40 +150,40 @@ ViewStyle::ViewStyle(const ViewStyle &source) { } selforeset = source.selforeset; - selforeground.desired = source.selforeground.desired; - selAdditionalForeground.desired = source.selAdditionalForeground.desired; + selforeground = source.selforeground; + selAdditionalForeground = source.selAdditionalForeground; selbackset = source.selbackset; - selbackground.desired = source.selbackground.desired; - selAdditionalBackground.desired = source.selAdditionalBackground.desired; - selbackground2.desired = source.selbackground2.desired; + selbackground = source.selbackground; + selAdditionalBackground = source.selAdditionalBackground; + selbackground2 = source.selbackground2; selAlpha = source.selAlpha; selAdditionalAlpha = source.selAdditionalAlpha; selEOLFilled = source.selEOLFilled; foldmarginColourSet = source.foldmarginColourSet; - foldmarginColour.desired = source.foldmarginColour.desired; + foldmarginColour = source.foldmarginColour; foldmarginHighlightColourSet = source.foldmarginHighlightColourSet; - foldmarginHighlightColour.desired = source.foldmarginHighlightColour.desired; + foldmarginHighlightColour = source.foldmarginHighlightColour; hotspotForegroundSet = source.hotspotForegroundSet; - hotspotForeground.desired = source.hotspotForeground.desired; + hotspotForeground = source.hotspotForeground; hotspotBackgroundSet = source.hotspotBackgroundSet; - hotspotBackground.desired = source.hotspotBackground.desired; + hotspotBackground = source.hotspotBackground; hotspotUnderline = source.hotspotUnderline; hotspotSingleLine = source.hotspotSingleLine; whitespaceForegroundSet = source.whitespaceForegroundSet; - whitespaceForeground.desired = source.whitespaceForeground.desired; + whitespaceForeground = source.whitespaceForeground; whitespaceBackgroundSet = source.whitespaceBackgroundSet; - whitespaceBackground.desired = source.whitespaceBackground.desired; - selbar.desired = source.selbar.desired; - selbarlight.desired = source.selbarlight.desired; - caretcolour.desired = source.caretcolour.desired; - additionalCaretColour.desired = source.additionalCaretColour.desired; + whitespaceBackground = source.whitespaceBackground; + selbar = source.selbar; + selbarlight = source.selbarlight; + caretcolour = source.caretcolour; + additionalCaretColour = source.additionalCaretColour; showCaretLineBackground = source.showCaretLineBackground; - caretLineBackground.desired = source.caretLineBackground.desired; + caretLineBackground = source.caretLineBackground; caretLineAlpha = source.caretLineAlpha; - edgecolour.desired = source.edgecolour.desired; + edgecolour = source.edgecolour; edgeState = source.edgeState; caretStyle = source.caretStyle; caretWidth = source.caretWidth; @@ -248,35 +248,35 @@ void ViewStyle::Init(size_t stylesSize_) { spaceWidth = 8; selforeset = false; - selforeground.desired = ColourDesired(0xff, 0, 0); - selAdditionalForeground.desired = ColourDesired(0xff, 0, 0); + selforeground = ColourDesired(0xff, 0, 0); + selAdditionalForeground = ColourDesired(0xff, 0, 0); selbackset = true; - selbackground.desired = ColourDesired(0xc0, 0xc0, 0xc0); - selAdditionalBackground.desired = ColourDesired(0xd7, 0xd7, 0xd7); - selbackground2.desired = ColourDesired(0xb0, 0xb0, 0xb0); + selbackground = ColourDesired(0xc0, 0xc0, 0xc0); + selAdditionalBackground = ColourDesired(0xd7, 0xd7, 0xd7); + selbackground2 = ColourDesired(0xb0, 0xb0, 0xb0); selAlpha = SC_ALPHA_NOALPHA; selAdditionalAlpha = SC_ALPHA_NOALPHA; selEOLFilled = false; foldmarginColourSet = false; - foldmarginColour.desired = ColourDesired(0xff, 0, 0); + foldmarginColour = ColourDesired(0xff, 0, 0); foldmarginHighlightColourSet = false; - foldmarginHighlightColour.desired = ColourDesired(0xc0, 0xc0, 0xc0); + foldmarginHighlightColour = ColourDesired(0xc0, 0xc0, 0xc0); whitespaceForegroundSet = false; - whitespaceForeground.desired = ColourDesired(0, 0, 0); + whitespaceForeground = ColourDesired(0, 0, 0); whitespaceBackgroundSet = false; - whitespaceBackground.desired = ColourDesired(0xff, 0xff, 0xff); - selbar.desired = Platform::Chrome(); - selbarlight.desired = Platform::ChromeHighlight(); - styles[STYLE_LINENUMBER].fore.desired = ColourDesired(0, 0, 0); - styles[STYLE_LINENUMBER].back.desired = Platform::Chrome(); - caretcolour.desired = ColourDesired(0, 0, 0); - additionalCaretColour.desired = ColourDesired(0x7f, 0x7f, 0x7f); + whitespaceBackground = ColourDesired(0xff, 0xff, 0xff); + selbar = Platform::Chrome(); + selbarlight = Platform::ChromeHighlight(); + styles[STYLE_LINENUMBER].fore = ColourDesired(0, 0, 0); + styles[STYLE_LINENUMBER].back = Platform::Chrome(); + caretcolour = ColourDesired(0, 0, 0); + additionalCaretColour = ColourDesired(0x7f, 0x7f, 0x7f); showCaretLineBackground = false; - caretLineBackground.desired = ColourDesired(0xff, 0xff, 0); + caretLineBackground = ColourDesired(0xff, 0xff, 0); caretLineAlpha = SC_ALPHA_NOALPHA; - edgecolour.desired = ColourDesired(0xc0, 0xc0, 0xc0); + edgecolour = ColourDesired(0xc0, 0xc0, 0xc0); edgeState = EDGE_NONE; caretStyle = CARETSTYLE_LINE; caretWidth = 1; @@ -284,9 +284,9 @@ void ViewStyle::Init(size_t stylesSize_) { someStylesForceCase = false; hotspotForegroundSet = false; - hotspotForeground.desired = ColourDesired(0, 0, 0xff); + hotspotForeground = ColourDesired(0, 0, 0xff); hotspotBackgroundSet = false; - hotspotBackground.desired = ColourDesired(0xff, 0xff, 0xff); + hotspotBackground = ColourDesired(0xff, 0xff, 0xff); hotspotUnderline = true; hotspotSingleLine = true; @@ -328,39 +328,6 @@ void ViewStyle::Init(size_t stylesSize_) { braceBadLightIndicator = 0; } -void ViewStyle::RefreshColourPalette(Palette &pal, bool want) { - unsigned int i; - for (i=0; i<stylesSize; i++) { - pal.WantFind(styles[i].fore, want); - pal.WantFind(styles[i].back, want); - } - for (i=0; i<(sizeof(indicators)/sizeof(indicators[0])); i++) { - pal.WantFind(indicators[i].fore, want); - } - for (i=0; i<(sizeof(markers)/sizeof(markers[0])); i++) { - markers[i].RefreshColourPalette(pal, want); - } - pal.WantFind(selforeground, want); - pal.WantFind(selAdditionalForeground, want); - pal.WantFind(selbackground, want); - pal.WantFind(selAdditionalBackground, want); - pal.WantFind(selbackground2, want); - - pal.WantFind(foldmarginColour, want); - pal.WantFind(foldmarginHighlightColour, want); - - pal.WantFind(whitespaceForeground, want); - pal.WantFind(whitespaceBackground, want); - pal.WantFind(selbar, want); - pal.WantFind(selbarlight, want); - pal.WantFind(caretcolour, want); - pal.WantFind(additionalCaretColour, want); - pal.WantFind(caretLineBackground, want); - pal.WantFind(edgecolour, want); - pal.WantFind(hotspotForeground, want); - pal.WantFind(hotspotBackground, want); -} - void ViewStyle::CreateFont(const FontSpecification &fs) { if (fs.fontName) { for (FontRealised *cur=frFirst; cur; cur=cur->frNext) { @@ -378,8 +345,8 @@ void ViewStyle::CreateFont(const FontSpecification &fs) { void ViewStyle::Refresh(Surface &surface) { delete frFirst; frFirst = NULL; - selbar.desired = Platform::Chrome(); - selbarlight.desired = Platform::ChromeHighlight(); + selbar = Platform::Chrome(); + selbarlight = Platform::ChromeHighlight(); for (unsigned int i=0; i<stylesSize; i++) { styles[i].extraFontFlag = extraFontFlag; @@ -471,11 +438,11 @@ void ViewStyle::ClearStyles() { styles[i].ClearTo(styles[STYLE_DEFAULT]); } } - styles[STYLE_LINENUMBER].back.desired = Platform::Chrome(); + styles[STYLE_LINENUMBER].back = Platform::Chrome(); // Set call tip fore/back to match the values previously set for call tips - styles[STYLE_CALLTIP].back.desired = ColourDesired(0xff, 0xff, 0xff); - styles[STYLE_CALLTIP].fore.desired = ColourDesired(0x80, 0x80, 0x80); + styles[STYLE_CALLTIP].back = ColourDesired(0xff, 0xff, 0xff); + styles[STYLE_CALLTIP].fore = ColourDesired(0x80, 0x80, 0x80); } void ViewStyle::SetStyleFontName(int styleIndex, const char *name) { |