feat(statusbar): transparency-display toggle (TPY pill)

Add a transparency_enable uniform read by the wire shader: when the new
TPY pill is off, every line is forced opaque; when on, baked entity
transparency shows through. Toggling is a uniform write, no retessellate
(same mechanism as the lineweight-display toggle). Pill is toggleable
from the status-bar customization menu.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-04 23:25:09 +03:00
1 parent 28ec360255
commit 66f7d24bc9
9 files changed
+48 -3

No files matched your search

+2
View File
@@ -750,6 +750,8 @@ pub enum Message {
ToggleStatusPill(crate::ui::statusbar_config::StatusPill),
/// Toggle clean-screen mode (hide ribbon + side panels).
ToggleCleanScreen,
/// Toggle whether entity transparency is shown on screen.
ToggleTransparencyDisplay,
/// Toggle the drawing-units picker open/closed.
ToggleUnitsPopup,
/// Close the drawing-units picker.
+8
View File
@@ -3582,6 +3582,14 @@ impl OpenCADStudio {
self.clean_screen ^= true;
Task::none()
}
Message::ToggleTransparencyDisplay => {
let i = self.active_tab;
if i < self.tabs.len() {
// No retessellate — the wire shader reads the flag from uniforms.
self.tabs[i].scene.transparency_display ^= true;
}
Task::none()
}
Message::ToggleUnitsPopup => {
self.units_popup_open ^= true;
Task::none()
+1
View File
@@ -1162,6 +1162,7 @@ impl OpenCADStudio {
tab.scene.document.header.insertion_units,
self.units_popup_open,
tab.scene.is_isolation_active(),
tab.scene.transparency_display,
&self.statusbar_config,
)
})