[apps/code] Code cleaning

This commit is contained in:
Léa Saviot
2019-10-10 15:27:17 +02:00
parent 95d0715606
commit 1be417e2c4
2 changed files with 7 additions and 15 deletions

View File

@@ -20,13 +20,12 @@ void EditorView::scrollViewDidChangeOffset(ScrollViewDataSource * scrollViewData
m_gutterView.setOffset(scrollViewDataSource->offset().y());
}
int EditorView::numberOfSubviews() const {
return 2;
}
View * EditorView::subviewAtIndex(int index) {
View * subviews[] = {&m_textArea, &m_gutterView};
return subviews[index];
if (index == 0) {
return &m_textArea;
}
assert(index == 1);
return &m_gutterView;
}
void EditorView::didBecomeFirstResponder() {
@@ -48,13 +47,6 @@ void EditorView::layoutSubviews(bool force) {
/* EditorView::GutterView */
EditorView::GutterView::GutterView(const KDFont * font) :
View(),
m_font(font),
m_offset(0)
{
}
void EditorView::GutterView::drawRect(KDContext * ctx, KDRect rect) const {
KDColor textColor = KDColor::RGB24(0x919EA4);
KDColor backgroundColor = KDColor::RGB24(0xE4E6E7);