Limit title length when too many status icons & shade background of every other icon (#1195)

* Shading alternate icon backgrounds on title bar

* Shading alternate icons on title bar

* Shading alternate icons on title bar

* Clang
This commit is contained in:
Mark Thompson 2023-06-27 03:15:58 -05:00 committed by GitHub
parent 32085f317b
commit 4ea8abb53b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 9 deletions

View file

@ -131,10 +131,12 @@ class StatusTray : public View {
StatusTray(const StatusTray&) = delete;
StatusTray& operator=(const StatusTray&) = delete;
void add_button(ImageButton* child);
void add(Widget* child);
void update_layout();
void clear();
void paint(Painter& painter) override;
uint8_t width() { return width_; };
private:
static constexpr uint8_t height = 16;
@ -142,6 +144,7 @@ class StatusTray : public View {
// track of the right edge.
const Point pos_{};
uint8_t width_{};
bool shading_{};
};
class SystemStatusView : public View {