Skip to content

libultrahand 2.5.0

Latest

Choose a tag to compare

@ppkantorski ppkantorski released this 20 Jun 07:51
aa233a1

List of Changes

  1. New Switch 2 Style rendering engine in libtesla.
    • New Switch2Wheel primitive: a slowly rotating, four-anchor radial color wheel. drawCircle() and drawBorderedRoundedRect() both gained an optional trailing wheel parameter that samples it per-pixel, producing the rotating multicolor cursor/border look.
    • New drawRing() primitive for drawing a stroked (unfilled) circle, used by the new radio selector below.
    • New theme-driven Switch 2 color set (all were previously hard-coded RGBA4444 literals, now fully theme-driven):
      • s2_highlight_color_1s2_highlight_color_4(+_deep) — default cursor/highlight wheel.
      • s2_alt_highlight_color_1s2_alt_highlight_color_4(+_deep) — locked / in-progress wheel state.
      • s2_table_border_color_1s2_table_border_color_4(+_deep) and new table_border_color.
      • s2_widget_border_color_1s2_widget_border_color_4(+_deep).
      • s2_radio_ring_color, s2_radio_selected_color, s2_radio_inprogress_color, s2_radio_inner_color.
      • s2_toggle_on_color, s2_toggle_off_color, s2_toggle_circle_color.
    • New ult::useSwitch2Style global (ini key switch_2_style, default on) gates the new look everywhere it's wired in. With it off, elements render with the classic flat-highlight look from 2.4.x.
  2. New ListItem::setRadioSelector() / setRadioLabelSelector() API.
    • Draws a circular radio mark in the value slot instead of the old checkmark glyph when ult::useSwitch2Style is active.
    • setRadioLabelSelector(bool) keeps the value text visible beside the radio mark (for entries like language codes, e.g. "en"/"es"/"fr").
    • The setRadioLabelSelector(const std::string& footer) overload lets the label be set independently of the item's click-state footer.
    • The mark eases from an in-progress color to a final selected/failed color, and the reserved value-slot width automatically recalculates via valueReservedWidthChanged() if the style is toggled live.
  3. New animated toggle widget for ToggleListItem.
    • When Switch 2 Style is active, toggles render as a sliding pill-style switch (track + circular knob) with a 150ms slide animation, replacing the old ON/OFF text glyph.
  4. Tables now draw a themeable border.
    • TableDrawer draws a 1px rounded border around the table background using the new table_border_color.
    • New ult::useDynamicTableColors global (ini key dynamic_tables, default on) optionally drives that border with the rotating Switch 2 wheel. This is independent of useSwitch2Style — the border itself always renders.
  5. The existing widget border now supports the same rotating-gradient treatment.
    • New ult::dynamicWidgetBorder global (ini key dynamic_widget_border, default on), separate from the existing dynamicWidgetColors flag, which now exclusively drives the dynamic CPU/PCB/SOC temperature text coloring.
  6. Click feedback overhaul across ListItem, TrackBar, StepTrackBar, and NamedStepTrackBar.
    • The old grayscale highlight pulse on click has been replaced with a short (~55ms) Switch-style bluish-green flash tone.
    • The flash now renders in its own dedicated drawClickFlash() pass so it draws cleanly above the element's own content instead of bleeding into it.
    • TrackBar::disableClickAnimation() / enableClickAnimation(). When animation is disabled and a locked trackbar is interacted with, the highlight now shakes ("wall" feedback) instead of flashing a click.
    • List separators were split out into their own drawSeparators() pass at the lowest z-order, so they no longer draw out of order relative to highlight/click effects.
    • Trackbar handles now cross-fade to the alternate Switch 2 wheel palette while locked, and back to the default palette once unlocked.
  7. Section-name localization fix.
    • The built-in section-name translator (used for headers like Reboot, Shutdown, Reboot To, Boot Entry) now also recognizes INI Entry and maps it to a proper localized INI_ENTRY string instead of leaving it as a hard-coded literal.
  8. Rendering polish.
    • New getVerticalCenterBaseline() helper computes a glyph's true cap-height center for baseline placement, replacing several hand-tuned offset constants that had been drifting whenever font size or row height changed.
    • Scrollbar and scissor positions shift slightly to accommodate the wider Switch 2 border when the style is enabled.
  9. Minor internal fixes.
    • hexMap storage shrunk from std::array<int, 256> to std::array<u8, 256>.
    • Package header parsing (executeIniHeader) now uses a fixed-size array instead of std::map<std::string_view, std::string*> for its field lookup, avoiding a heap allocation on every package header parse.

Full Changelog: v2.4.5...v2.5.0