Files
Upsilon/apps/omega/omega_view.cpp
Quentin Guidée a32e802cf4 New Omega App
2020-02-21 18:13:57 +01:00

35 lines
758 B
C++

#include "omega_view.h"
#include "apps/i18n.h"
namespace Omega {
OmegaView::OmegaView() :
View(),
m_bufferTextView(KDFont::LargeFont, 0.5, 0.5, Palette::PrimaryText)
{
m_bufferTextView.setText(I18n::translate(I18n::Message::OmegaApp));
}
void OmegaView::drawRect(KDContext * ctx, KDRect rect) const {
ctx->fillRect(KDRect(0, 0, bounds().width(), bounds().height()), Palette::BackgroundApps);
}
void OmegaView::reload() {
markRectAsDirty(bounds());
}
int OmegaView::numberOfSubviews() const {
return 1;
}
View * OmegaView::subviewAtIndex(int index) {
assert(index == 0);
return &m_bufferTextView;
}
void OmegaView::layoutSubviews(bool force) {
m_bufferTextView.setFrame(KDRect(0, 0, bounds().width(), bounds().height()), force);
}
}