mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-26 09:10:48 +01:00
[apps/reg] Add separators in Stats
This commit is contained in:
@@ -8,6 +8,7 @@ app_objs += $(addprefix apps/shared/,\
|
||||
curve_view_range.o\
|
||||
editable_cell_table_view_controller.o\
|
||||
expression_field_delegate_app.o\
|
||||
expression_layout_field_delegate.o\
|
||||
float_pair_store.o\
|
||||
float_parameter_controller.o\
|
||||
function.o\
|
||||
@@ -32,6 +33,7 @@ app_objs += $(addprefix apps/shared/,\
|
||||
language_controller.o\
|
||||
list_controller.o\
|
||||
list_parameter_controller.o\
|
||||
margin_even_odd_message_text_cell.o\
|
||||
memoized_curve_view_range.o\
|
||||
message_view.o\
|
||||
new_function_cell.o\
|
||||
@@ -40,8 +42,8 @@ app_objs += $(addprefix apps/shared/,\
|
||||
range_parameter_controller.o\
|
||||
regular_table_view_data_source.o\
|
||||
round_cursor_view.o\
|
||||
separator_even_odd_buffer_text_cell.o\
|
||||
simple_interactive_curve_view_controller.o\
|
||||
expression_layout_field_delegate.o\
|
||||
store_cell.o\
|
||||
store_controller.o\
|
||||
store_parameter_controller.o\
|
||||
|
||||
10
apps/shared/margin_even_odd_message_text_cell.cpp
Normal file
10
apps/shared/margin_even_odd_message_text_cell.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include "margin_even_odd_message_text_cell.h"
|
||||
|
||||
namespace Shared {
|
||||
|
||||
void MarginEvenOddMessageTextCell::layoutSubviews() {
|
||||
m_messageTextView.setFrame(KDRect(bounds().topLeft(), bounds().width() - k_rightMargin, bounds().height()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
20
apps/shared/margin_even_odd_message_text_cell.h
Normal file
20
apps/shared/margin_even_odd_message_text_cell.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef APPS_SHARED_MARGIN_EVEN_ODD_MESSAGE_TEXT_CELL_H
|
||||
#define APPS_SHARED_MARGIN_EVEN_ODD_MESSAGE_TEXT_CELL_H
|
||||
|
||||
#include <escher/even_odd_message_text_cell.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
class MarginEvenOddMessageTextCell : public EvenOddMessageTextCell {
|
||||
public:
|
||||
MarginEvenOddMessageTextCell(KDText::FontSize size = KDText::FontSize::Small) :
|
||||
EvenOddMessageTextCell(size)
|
||||
{}
|
||||
void layoutSubviews() override;
|
||||
private:
|
||||
constexpr static KDCoordinate k_rightMargin = 2;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
20
apps/shared/separator_even_odd_buffer_text_cell.cpp
Normal file
20
apps/shared/separator_even_odd_buffer_text_cell.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "separator_even_odd_buffer_text_cell.h"
|
||||
#include "hideable_even_odd_editable_text_cell.h"
|
||||
#include <escher/metric.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
void SeparatorEvenOddBufferTextCell::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
EvenOddBufferTextCell::drawRect(ctx, rect);
|
||||
// Draw the separator
|
||||
KDRect separatorRect(0, 0, Metric::TableSeparatorThickness, bounds().height());
|
||||
ctx->fillRect(separatorRect, Shared::HideableEvenOddEditableTextCell::hideColor());
|
||||
}
|
||||
|
||||
void SeparatorEvenOddBufferTextCell::layoutSubviews() {
|
||||
KDRect boundsThis = bounds();
|
||||
m_bufferTextView.setFrame(KDRect(boundsThis.left() + Metric::TableSeparatorThickness, boundsThis.top(), boundsThis.width() - Metric::TableSeparatorThickness - k_rightMargin, boundsThis.height()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
19
apps/shared/separator_even_odd_buffer_text_cell.h
Normal file
19
apps/shared/separator_even_odd_buffer_text_cell.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef APPS_SHARED_SEPARATOR_EVEN_ODD_CELL_H
|
||||
#define APPS_SHARED_SEPARATOR_EVEN_ODD_CELL_H
|
||||
|
||||
#include <escher/even_odd_buffer_text_cell.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
class SeparatorEvenOddBufferTextCell : public EvenOddBufferTextCell {
|
||||
public:
|
||||
using EvenOddBufferTextCell::EvenOddBufferTextCell;
|
||||
void drawRect(KDContext * ctx, KDRect rect) const override;
|
||||
void layoutSubviews() override;
|
||||
private:
|
||||
constexpr static KDCoordinate k_rightMargin = 2;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user