Skip to content

Ariadne: a button's picture and its pressed-in chosen look, a window maximized on a phone, Settings without a scene's items - #1425

Merged
transfix merged 1 commit into
masterfrom
feat/ariadne-selected-icon-buttons
Nov 21, 2026
Merged

transfix merged 1 commit into
masterfrom
feat/ariadne-selected-icon-buttons

Conversation

@transfix

Copy link
Copy Markdown
Owner

For nicotina on a phone (Joe, 2026-11-21): its bar's buttons as pictures with the current view's button looking pressed, the feed's Following / Everyone / Friends as buttons instead of a radio row, its window filling a phone's screen, and a Settings menu without the 3D items a feed has no use for.

button: icon: (ARIADNE.md §5.27). A picture drawn in place of the label: a URI (fetched and cached as an image:'s is, auth: for a credential), a published image's name, or an expression giving either. It is one line tall, or icon_size: px. The label shows until the picture loads, if it fails, and on a backend that draws none (button.icon: ImGui).

button: selected: (§5.27). true, false, or an expression; the chosen button of a row is drawn pressed in.

  • ImGui draws it by hand over an InvisibleButton, the size ImGui::Button would give it: sunken (a shadow along the top and left, a darker face, the content a step down and right), with the row's other buttons raised (a light top and left, a shadow at the bottom and right).
  • FTXUI and tvision draw it [>label<] in bold, as wide as [ label ], so choosing another moves nothing.
  • false is a button of such a row that is never chosen (a bar's Back).
  • button.selected holds on ImGui, FTXUI and tvision.

A window's maximized: true | phone (§5.9). How it starts while tree.<id>.maximized holds nothing. phone applies only where the view is a phone's: Backend::view_is_phone, which ImGui answers as under 500 CSS px on the short side. The user's restore writes the key, which holds from then on.

arigl's Settings. Controls... and the scene's items (shadows, grid, origin axis, bounding boxes, extent labels, all chrome) show only while the loaded document has a scene. AriRuntime::load writes ariadne.scene (1/0) under the document's prefix, and the items' visible_when: reads it, so they come and go with a gallery's documents. A feed or a form gets Show clock and Show notifications alone.

Tests:

  • ariadne_loader_test: ButtonIconAndSelectedParse, WindowMaximizedParses (an include overriding it too).
  • ariadne_ftxui_test: SelectedButtonIsMarked.
  • cvcgl_imgui_group_click: taps a row of chosen buttons (the tap runs on:, the chosen one changes, no button moves), and starts windows with maximized: phone on a 390 x 760 view and a 1000 x 700 one, then a restore.
  • The test's Session now makes its own ImGui context current. CreateContext keeps another live session's context current, so a second session drew into the first.

Checked locally on Windows (MSVC Release):

  • ariadne_loader_test (248), ariadne_ftxui_test (114), ariadne_requires_test, ariadne_media_test: all pass.
  • cvcgl_imgui_group_click, _maximize, _windows_menu, _panels_start, _ui_size, _touch_scroll, cvcgl_ariadne_repeat: all pass.
  • clang-format 18.1.8 is clean on the changed lines.
  • The wasm build for the browser check is still running.

…maximized on a phone, Settings without a scene's items

- `button:` takes `icon:` (§5.27): a picture drawn in place of the label, a URI fetched and
  cached as an image:'s (with auth:), a published image, or an expression giving either, one line
  tall or `icon_size:` px. The label shows until it loads, if it fails, and where the backend draws
  none (button.icon: ImGui).
- `button:` takes `selected:` (true, false, or an expression): the chosen button of a row is drawn
  pressed in. ImGui draws it sunken (a shadow along its top and left, a darker face, its content a
  step down and right) beside the row's raised buttons; FTXUI and tvision `[>label<]` in bold, as
  wide as `[ label ]`. `false` is one of such a row, never chosen (button.selected).
- A window's `maximized: true | phone` (§5.9) is how it starts while tree.<id>.maximized holds
  nothing: `phone` only where the view is a phone's (Backend::view_is_phone, under 500 CSS px on
  its short side). The user's restore writes the key, which holds from then on.
- arigl's Settings shows Controls... and the scene's items (shadows, grid, origin axis, bounding
  boxes, extent labels, all chrome) only while the loaded document has a scene: AriRuntime::load
  writes `ariadne.scene` under the document's prefix and the items' visible_when reads it. A feed
  or a form gets Show clock and Show notifications alone.

Tests: ariadne_loader_test's ButtonIconAndSelectedParse and WindowMaximizedParses;
ariadne_ftxui_test's SelectedButtonIsMarked; cvcgl_imgui_group_click taps a row of chosen
buttons and starts windows maximized on a phone's view and a wide one.
@transfix
transfix merged commit 5ea1321 into master Nov 21, 2026
29 checks passed
@transfix
transfix deleted the feat/ariadne-selected-icon-buttons branch November 21, 2026 20:22
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.

1 participant