mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps] Display the baterry icon view on the title bar
Change-Id: I3a1f2540151f7ecbfafaead346e673f694d8c0dd
This commit is contained in:
@@ -2,17 +2,21 @@
|
||||
#define APPS_TITLE_BAR_VIEW_H
|
||||
|
||||
#include <escher.h>
|
||||
#include "battery_view.h"
|
||||
|
||||
class TitleBarView : public View {
|
||||
public:
|
||||
TitleBarView();
|
||||
void drawRect(KDContext * ctx, KDRect rect) const override;
|
||||
void setTitle(const char * title);
|
||||
void setChargeState(Ion::Battery::Charge chargeState);
|
||||
private:
|
||||
constexpr static KDCoordinate k_batteryLeftMargin = 5;
|
||||
int numberOfSubviews() const override;
|
||||
void layoutSubviews() override;
|
||||
View * subviewAtIndex(int index) override;
|
||||
PointerTextView m_titleView;
|
||||
BatteryView m_batteryView;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user