Files
swr-ini-tool/src/logo.cpp
Niklas Friesen b5ba2d71df UI: header icon + title; always show OC controls; About Logo cleanup
- Use gui_icon.png next to APP_TITLE in the applet header (replaces text-only header Logo).
- Simplify Logo to About tab only; drop unused HEADER style.
- Show frequency/voltage/toggle controls even when INI keys are absent (defaults until edited).
- Add resources/gui_icon.png to RomFS.

Made-with: Cursor
2026-03-30 19:57:12 +02:00

39 lines
994 B
C++

/*
SWR INI Tool - Switchroot INI Configuration Editor
Copyright (C) 2026 Switchroot
*/
#include "logo.h"
Logo::Logo()
{
this->logoLabel = new brls::Label(brls::LabelStyle::LIST_ITEM, "SWR", true);
this->logoLabel->setParent(this);
int logoFont = brls::Application::findFont(LOGO_FONT_NAME);
if (logoFont >= 0)
{
this->logoLabel->setFont(logoFont);
}
this->logoLabel->setFontSize(LOGO_ABOUT_FONT_SIZE);
this->logoLabel->setHorizontalAlign(NVG_ALIGN_CENTER);
}
Logo::~Logo()
{
delete this->logoLabel;
}
void Logo::draw(NVGcontext* vg, int x, int y, unsigned width, unsigned height, brls::Style* style, brls::FrameContext* ctx)
{
this->logoLabel->frame(ctx);
}
void Logo::layout(NVGcontext* vg, brls::Style* style, brls::FontStash* stash)
{
this->logoLabel->setBoundaries(this->x, this->y + LOGO_OFFSET, this->width, this->height);
this->logoLabel->layout(vg, style, stash);
this->height = this->logoLabel->getHeight();
}