A Widget-level property (border_style/border_thickness/border_color_index), not a per-type config field, since every widget type can have one -- drawn once centrally in device.py's _render_widgets before compositing, using an exact panel palette color so it never dithers. Styles: solid, dashed, dotted, and a fancy double-line picture-frame-mat look. Configurable from a shared "Border" card in every widget's gear-icon dialog.
26 lines
1.1 KiB
HTML
26 lines
1.1 KiB
HTML
<h2 class="dialog-title">Battery widget</h2>
|
|
|
|
<section class="card">
|
|
<h2 class="card-title">Settings</h2>
|
|
<p class="sub">Shows this frame's own last-reported battery level --
|
|
nothing to configure beyond how much detail to show.</p>
|
|
<form id="battery-config-form">
|
|
<label>Display mode
|
|
<select id="battery_mode">
|
|
<option value="compact" {% if battery_cfg and battery_cfg.mode == 'compact' %}selected{% endif %}>Compact (icon + percent only)</option>
|
|
<option value="detailed" {% if not battery_cfg or battery_cfg.mode == 'detailed' %}selected{% endif %}>Detailed (+ estimated time left, last report)</option>
|
|
</select>
|
|
</label>
|
|
<button type="submit">Save</button>
|
|
</form>
|
|
</section>
|
|
|
|
{% include "_widget_border_fields.html" %}
|
|
|
|
<section class="card" style="margin-top: 20px;">
|
|
<h2 class="card-title">Preview</h2>
|
|
<p class="sub">How this widget currently renders.</p>
|
|
<img class="preview-img" id="battery-preview" alt="Battery widget preview">
|
|
<button type="button" class="secondary" id="battery-preview-refresh">Refresh now</button>
|
|
</section>
|