mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 01:29:58 +01:00
[code] Create a PythonTextArea
This commit is contained in:
committed by
EmilieNumworks
parent
9e4a1c7d54
commit
88e40266f6
@@ -2,13 +2,17 @@
|
||||
#include <poincare.h>
|
||||
#include <escher/app.h>
|
||||
|
||||
namespace Code {
|
||||
|
||||
/* EditorView */
|
||||
|
||||
constexpr KDText::FontSize editorFontSize = KDText::FontSize::Large;
|
||||
|
||||
EditorView::EditorView(Responder * parentResponder) :
|
||||
Responder(parentResponder),
|
||||
View(),
|
||||
m_textArea(parentResponder),
|
||||
m_gutterView(KDText::FontSize::Large)
|
||||
m_textArea(parentResponder, editorFontSize),
|
||||
m_gutterView(editorFontSize)
|
||||
{
|
||||
m_textArea.setScrollViewDelegate(this);
|
||||
}
|
||||
@@ -92,3 +96,5 @@ KDSize EditorView::GutterView::minimalSizeForOptimalDisplay() const {
|
||||
int numberOfChars = 2; // TODO: Could be computed
|
||||
return KDSize(2 * k_margin + numberOfChars * KDText::charSize(m_fontSize).width(), 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user