pub(crate) fn fullscreen_button(ui: &mut Ui, active: bool) -> boolExpand description
Draw the fullscreen button, labelled for what pressing it does, and report whether it was pressed.
The label follows the document rather than a local flag: the user can leave fullscreen with the browser’s own control — Escape, or the back gesture on a phone — and the button has to offer to go back in afterwards. That is also why it owns its corner rather than sharing a row with the readout: each anchored area keeps to itself, and the button is only drawn on top of the readout’s line when the two would otherwise collide.
The glyphs are drawn from the default font — ⛶ to enter and ⏏ to leave — with a word beside each so the meaning does not rest on a symbol alone. Both labels are laid out to extend rather than wrap: the exit label is the wider of the two, and an anchored area lays its contents out against the size it remembered from the previous pass, so switching to it would otherwise break it across two lines in the narrower area the enter label had established.