forked from 1b-agent/opencadstudio-upstream
refactor(ui): centralize muted_style in style::common
Delete the byte-identical 0.68 muted_style copies across 13 window modules and import crate::ui::style::common::muted_style instead. print_all keeps its local name via muted_style as muted so call sites are untouched. Divergent alphas (0.60/0.62/0.65/0.72) and missing_fonts weak.text left alone to avoid visual changes. Net: +13 / -78, no visual change. Verified: cargo check --all-targets clean, cargo test --lib ui::style (3 passed).
This commit is contained in:
1 parent
b8a7f5edfb
commit
b7de6a3287
13 files changed
+13
-78
No files matched your search
@@ -9,6 +9,7 @@ use crate::app::Message;
|
||||
use crate::io::xref::collect_entries_with_prev;
|
||||
use crate::io::xref_model::{normalize_lexical, Pathtype, RefKind, RefStatus, RefType, ReferenceEntry};
|
||||
use crate::ui::ROW_H;
|
||||
use crate::ui::style::common::muted_style;
|
||||
use acadrust::CadDocument;
|
||||
use iced::widget::{button, column, container, mouse_area, row, scrollable, text, tooltip};
|
||||
use iced::Padding;
|
||||
@@ -1286,12 +1287,6 @@ fn format_date(modified: Option<SystemTime>) -> String {
|
||||
|
||||
// ── Widget helpers (layers.rs conventions) ────────────────────────────────
|
||||
|
||||
fn muted_style(theme: &Theme) -> iced::widget::text::Style {
|
||||
iced::widget::text::Style {
|
||||
color: Some(theme.palette().background.base.text.scale_alpha(0.68)),
|
||||
}
|
||||
}
|
||||
|
||||
fn row_button_style(selected: bool, index: usize) -> impl Fn(&Theme, button::Status) -> button::Style {
|
||||
move |theme: &Theme, status: button::Status| {
|
||||
let palette = theme.palette();
|
||||
|
||||
Reference in new issue
Block a user