void NonShinyLookAndFeel::drawTextEditorOutline (Graphics& g, int width, int height, TextEditor& textEditor) { if (textEditor.isEnabled()) { if (textEditor.hasKeyboardFocus (true) && ! textEditor.isReadOnly()) { const int border = 2; g.setColour (textEditor.findColour (TextEditor::focusedOutlineColourId)); g.drawRect (0, 0, width, height, border); g.setOpacity (1.0f); const Colour shadowColour (textEditor.findColour (TextEditor::shadowColourId).withMultipliedAlpha (0.75f)); drawBevel (g, 0, 0, width, height + 2, border + 2, shadowColour, shadowColour); } else { g.setColour (textEditor.findColour (TextEditor::outlineColourId)); g.drawRect (0, 0, width, height); g.setOpacity (1.0f); const Colour shadowColour (textEditor.findColour (TextEditor::shadowColourId)); drawBevel (g, 0, 0, width, height + 2, 3, shadowColour, shadowColour); } } }
void ProjucerLookAndFeel::fillTextEditorBackground (Graphics& g, int width, int height, TextEditor& textEditor) { g.setColour (textEditor.findColour (TextEditor::backgroundColourId)); g.fillRect (0, 0, width, height); g.setColour (textEditor.findColour (TextEditor::outlineColourId)); g.drawHorizontalLine (height - 1, 0.0f, static_cast<float> (width)); }
//============================================================================== void OldSchoolLookAndFeel::drawTextEditorOutline (Graphics& g, int width, int height, TextEditor& textEditor) { if (textEditor.isEnabled()) { g.setColour (textEditor.findColour (TextEditor::outlineColourId)); g.drawRect (0, 0, width, height); } }