[apps] Shared: the cursor view own its size instead of the curve view

This commit is contained in:
Émilie Feral
2018-01-24 17:36:33 +01:00
committed by EmilieNumworks
parent 8ccb69f2e2
commit c9b86d0c86
10 changed files with 16 additions and 26 deletions

View File

@@ -10,7 +10,6 @@ FunctionGraphView::FunctionGraphView(InteractiveCurveViewRange * graphRange,
CurveViewCursor * cursor, BannerView * bannerView, View * cursorView) :
CurveView(graphRange, cursor, bannerView, cursorView),
m_selectedFunction(nullptr),
m_verticalCursor(false),
m_highlightedStart(NAN),
m_highlightedEnd(NAN),
m_shouldColorHighlighted(false),
@@ -44,10 +43,6 @@ void FunctionGraphView::selectFunction(Function * function) {
}
}
void FunctionGraphView::setVerticalCursor(bool verticalCursor) {
m_verticalCursor = verticalCursor;
}
void FunctionGraphView::setAreaHighlight(float start, float end) {
if (m_highlightedStart != start || m_highlightedEnd != end) {
float dirtyStart = start > m_highlightedStart ? m_highlightedStart : start;
@@ -74,13 +69,6 @@ void FunctionGraphView::setAreaHighlightColor(bool highlightColor) {
}
}
KDSize FunctionGraphView::cursorSize() {
if (m_verticalCursor) {
return KDSize(1, 0);
}
return CurveView::cursorSize();
}
char * FunctionGraphView::label(Axis axis, int index) const {
return (axis == Axis::Horizontal ? (char *)m_xLabels[index] : (char *)m_yLabels[index]);
}