Skip to content

Rework LCD GUI: content selector, live preview, auto-connect, multi-color RGB editor - #13

Merged
JustinMDotNet merged 2 commits into
mainfrom
audit/ui-rework
Jul 24, 2026
Merged

Rework LCD GUI: content selector, live preview, auto-connect, multi-color RGB editor#13
JustinMDotNet merged 2 commits into
mainfrom
audit/ui-rework

Conversation

@JustinMDotNet

Copy link
Copy Markdown
Collaborator

Summary

Reworks the LCD panel GUI for clarity and adds a live preview, based on hands-on review of the running app.

Content selection

  • "What to display" radio selector so Image / Text / GIF / Built-in / Carousel / Sensors are visibly mutually exclusive — only the matching card is shown.

Live panel preview

  • A Panel Preview card (320x170) renders the exact frame that will be sent for Image, Text, and GIF (first frame). Firmware-drawn modes (Built-in / Carousel / Sensors) show a caption placeholder since they can't be rendered client-side.
  • PanelText.Render / PanelImage.Render320 now expose the RenderTargetBitmap so preview and send share one render path.

Auto-connect

  • The app connects on launch (Windows only); no manual Refresh required.

Background service placement

  • Moved the Install background service controls out of the Device tab into the LCD tab's Sensor Dashboard, shown only when a live sensor widget is selected. Every live sensor needs the feed service (the panel can't read GPU sensors itself), so this is where it belongs.

RGB multi-color editor + preview

  • Replaced the fixed 3 color pickers with a dynamic add/remove color list and a banded preview strip.
  • Colors are capped to what each protocol actually carries: 8 (legacy) / 17 (Blackwell). Switching to an effect that supports fewer colors auto-trims extras; single-color effects collapse to one swatch.
  • Persist & restore last-applied RGB (effect, colors, brightness, speed) on launch. The Aorus GPU RGB controller is write-only — its live state can't be read back (confirmed in PROTOCOL.md and OpenRGB), so replaying the app's last-applied config is the best achievable "show what it's doing."

Testing

  • dotnet build -c Release — 0 warnings.
  • dotnet test -c Release — 38/38 pass.
  • Manually reviewed the running GUI.

Notes

  • Open follow-up: NVAPI I2C may require elevation, so unelevated auto-connect could fail on some systems. If so, a requireAdministrator manifest or a "run as admin" hint is the next step (not included here).

…olor RGB editor

- Add a "What to display" radio selector so Image/Text/GIF/Built-in/Carousel/Sensors
  are visibly mutually exclusive; only the matching card shows.
- Add a live Panel Preview card (320x170) rendering the exact frame for Image, Text,
  and GIF (first frame); firmware-drawn modes show a caption placeholder.
- Auto-connect to the panel on launch so no manual Refresh is needed.
- Move the background-service controls into the LCD tab's Sensor Dashboard, shown only
  when a live sensor widget is selected (every live sensor needs the feed service).
- Replace the fixed 3-color RGB pickers with a dynamic add/remove color editor plus a
  banded preview strip; cap colors to what each protocol carries (legacy 8, Blackwell 17).
- Persist and restore last-applied RGB (effect, colors, brightness, speed) on launch,
  since the GPU RGB controller is write-only and its state cannot be read back.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 37c6a3d8-c4f4-4155-b18c-2aff6d4f54ef
Copilot AI review requested due to automatic review settings July 24, 2026 04:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reworks the Avalonia GUI for the Aorus LCD/RGB app to make panel content selection mutually exclusive, add a live 320×170 preview for rendered content, auto-connect on launch (Windows), and introduce a multi-color RGB editor with persisted “last-applied” settings.

Changes:

  • Add a “What to display” selector and a shared Panel Preview for Image/Text/GIF render paths.
  • Auto-connect to the panel on launch and reposition background-service controls into the Sensors workflow.
  • Replace fixed RGB pickers with a dynamic color list + preview strip and persist/restore last-applied RGB settings.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/AorusLcd.Gui/Views/MainWindow.axaml Adds content selector, panel preview, moves service UI into Sensors, and reworks RGB UI to a color list + preview.
src/AorusLcd.Gui/ViewModels/MainViewModel.cs Implements content selection state, preview generation/disposal, auto-connect entry point, RGB color-list logic, and RGB settings persist/restore.
src/AorusLcd.Gui/Services/UiSettings.cs Persists last-applied RGB mode/colors/brightness/speed.
src/AorusLcd.Gui/Services/PanelText.cs Exposes a bitmap render method so preview and send share one render path.
src/AorusLcd.Gui/Services/PanelImage.cs Exposes a 320×170 render method so preview and send share one render path.
src/AorusLcd.Gui/Models/RgbColorItem.cs Adds per-color model for the RGB editor list.
src/AorusLcd.Gui/Converters/StringEqualityConverter.cs Adds converter to bind RadioButton selection to a string content-type property.
src/AorusLcd.Gui/App.axaml.cs Triggers auto-connect during app initialization.
Comments suppressed due to low confidence (1)

src/AorusLcd.Gui/ViewModels/MainViewModel.cs:875

  • PersistRgbSettings() is called before the Blackwell RGB apply runs. If the I2C write fails, the UI will still save and replay settings that were not actually applied.
            RgbFusion2Blackwell.SpeedSlowest, RgbFusion2Blackwell.SpeedFastest);
        RgbColor[] colors = IsBlackwellMultiColorMode ? CollectRgbColors() : [color];
        PersistRgbSettings();
        return RunAsync("Applying RGB…", async () =>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/AorusLcd.Gui/ViewModels/MainViewModel.cs
Comment thread src/AorusLcd.Gui/Views/MainWindow.axaml Outdated
- Move PersistRgbSettings() inside the RunAsync lambda after the hardware apply
  succeeds, so a failed NVAPI/I2C write no longer saves a config that never applied.
- Reword the background-service description to match the adaptive feed cadence
  (~1s single widget; up to a few seconds for a rotating multi-widget dashboard).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 37c6a3d8-c4f4-4155-b18c-2aff6d4f54ef
Copilot AI review requested due to automatic review settings July 24, 2026 04:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@JustinMDotNet
JustinMDotNet merged commit 579573f into main Jul 24, 2026
3 checks passed
@JustinMDotNet
JustinMDotNet deleted the audit/ui-rework branch July 24, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants