Files
ELY-Browser/crates/ely_domain/src/lib.rs
T
ZacharyZhang-NY 3108f3265b Add translucency setting + apply to runtime panel alpha
Domain:
- AppearanceSettings gains translucency_pct (u8, 0..=100, default 40)
  with a clamping setter and serde round-trip coverage.
- DEFAULT_TRANSLUCENCY_PCT and MAX_TRANSLUCENCY_PCT exported for the
  shell.

Core:
- BrowserCore::set_translucency_pct delegates to the appearance struct;
  the existing reset_appearance covers the reset path.
- Integration test covers persistence into snapshot.appearance.

Render:
- chrome::sidebar::panel_bg(snapshot) replaces the static PANEL_BG
  constant, mapping the user's translucency_pct linearly into the alpha
  byte 0xff..0xb3. Sidebar (expanded + compact) and main pane consume
  the helper so changing the setting at runtime updates every glass
  surface in lock-step.

Form:
- Translucency row in chrome::appearance_form mirrors the design's
  static track + thumb visual driven by the persisted percentage, plus
  three preset chips (Solid 0 / Default 40 / Glassy 75) that mutate the
  setting through shell.set_translucency_pct.

Strict UX rule preserved: alpha never drops below 0xb3 so panels stay
readable without backdrop blur (which GPUI 0.2.2 doesn't expose).
2026-05-09 19:39:11 -04:00

74 lines
2.3 KiB
Rust

mod appearance;
mod archive;
mod bookmark;
mod command;
mod diagnostics;
mod download;
mod error;
mod favorite;
mod history;
mod identifiers;
mod new_tab;
mod note;
mod plugin;
mod privacy;
mod profile;
mod reading_list;
mod search;
mod site_permission;
mod space;
mod split;
mod sync;
mod tab;
mod tab_group;
mod update;
mod url_text;
pub use appearance::{
AppearanceSettings, DEFAULT_TRANSLUCENCY_PCT, MAX_TRANSLUCENCY_PCT, ThemeMode, WallpaperTheme,
};
pub use archive::{ArchiveSource, ArchivedTab};
pub use bookmark::BookmarkEntry;
pub use command::{CommandIntent, CommandScope};
pub use diagnostics::{
DiagnosticCode, DiagnosticEvent, DiagnosticEventKind, DiagnosticOutcome, WebViewCrashKind,
};
pub use download::{
DownloadChecksum, DownloadChecksumAlgorithm, DownloadDestination, DownloadEntry,
DownloadPolicy, DownloadSecurity, DownloadState,
};
pub use error::DomainError;
pub use favorite::FavoriteLimit;
pub use history::HistoryEntry;
pub use identifiers::{
BookmarkId, DownloadId, NoteId, ProfileId, ReadingListId, SpaceId, SplitId, TabGroupId, TabId,
WebViewId,
};
pub use new_tab::NewTabDestination;
pub use note::{NoteEntry, NoteTarget};
pub use plugin::{
PluginContributionPoint, PluginId, PluginManifest, PluginPermission, PluginPermissionRisk,
PluginSignature, PluginSignatureAlgorithm,
};
pub use privacy::{DiagnosticsReportingPolicy, HistoryRecordingPolicy};
pub use profile::{Profile, ProfileKind, ProfileSyncPolicy};
pub use reading_list::{ReadingListEntry, ReadingProgress, ReadingProgressPercent};
pub use search::SearchEngine;
pub use site_permission::{
SiteOrigin, SitePermissionAuditAction, SitePermissionAuditEvent, SitePermissionDecision,
SitePermissionEntry, SitePermissionFeature,
};
pub use space::{ArchivePolicy, COLLAPSED_SIDEBAR_WIDTH_PX, DEFAULT_SIDEBAR_WIDTH_PX, Space};
pub use split::{MAX_SPLIT_PANES, SplitAxis, SplitLayout, SplitPane};
pub use sync::{
SyncConnectionState, SyncObjectKind, SyncObjectPolicy, SyncObjectState, SyncObjectStatus,
SyncStatus,
};
pub use tab::{
BrowserTab, DEFAULT_ZOOM_PERCENT, MAX_ZOOM_PERCENT, MIN_ZOOM_PERCENT, TabFlags, TabState,
ZOOM_PERCENT_STEP, parse_title_unread_count, validate_zoom_percent,
};
pub use tab_group::TabGroup;
pub use update::UpdatePolicy;
pub use url_text::UrlText;