1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Minor fix for code editor caret display.

This commit is contained in:
jules 2012-09-13 09:33:32 +01:00
parent b562bbab74
commit f4898a18ab
2 changed files with 5 additions and 5 deletions

View file

@ -26,7 +26,6 @@
CaretComponent::CaretComponent (Component* const keyFocusOwner)
: owner (keyFocusOwner)
{
setAlwaysOnTop (true);
setInterceptsMouseClicks (false, false);
}

View file

@ -312,7 +312,8 @@ public:
jassert (dynamic_cast <CodeEditorComponent*> (getParentComponent()) != nullptr);
const CodeEditorComponent& editor = *static_cast <CodeEditorComponent*> (getParentComponent());
g.fillAll (editor.findColour (lineNumberBackgroundId));
g.fillAll (editor.findColour (CodeEditorComponent::backgroundColourId)
.overlaidWith (editor.findColour (lineNumberBackgroundId)));
const Rectangle<int> clip (g.getClipBounds());
const int lineHeight = editor.lineHeight;
@ -379,14 +380,14 @@ CodeEditorComponent::CodeEditorComponent (CodeDocument& doc, CodeTokeniser* cons
setMouseCursor (MouseCursor::IBeamCursor);
setWantsKeyboardFocus (true);
addAndMakeVisible (caret = getLookAndFeel().createCaretComponent (this));
addAndMakeVisible (&verticalScrollBar);
verticalScrollBar.setSingleStepSize (1.0);
addAndMakeVisible (&horizontalScrollBar);
horizontalScrollBar.setSingleStepSize (1.0);
addAndMakeVisible (caret = getLookAndFeel().createCaretComponent (this));
Font f (12.0f);
f.setTypefaceName (Font::getDefaultMonospacedFontName());
setFont (f);
@ -446,7 +447,7 @@ void CodeEditorComponent::setLineNumbersShown (const bool shouldBeShown)
gutter = nullptr;
if (shouldBeShown)
addAndMakeVisible (gutter = new GutterComponent(), 0);
addAndMakeVisible (gutter = new GutterComponent());
resized();
}