viewer: click to copy values, amounts, and identifiers
Company details (EIN, state number, address, every profile value), an entry's number and amount, an account's code and balance, a document's file name and SHA-256 copy on click: a pointer and copy icon on hover, a check for a moment after. Amounts copy as their exact plain decimal (fmt::plain: no "$", commas, or parentheses; "-" for negatives); where a click already drills down (report cells, register and transaction rows, general ledger lines), a right-click menu copies the amounts, the entry number, or the description. The sidebar's chain check copies the journal head and data folder. tests/copy.rs: every display style copies back to the exact value (property), and clicking the EIN, an entry's amount, and its number puts exactly that on the clipboard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GWVo7x3UHw5kwCUaWxiejX
This commit is contained in:
1 parent
c126843ce1
commit
afd427a023
10 files changed
+344
-17
No files matched your search
@@ -20,7 +20,7 @@ fn kv(ui: &mut Ui, k: &str, v: &str) {
|
||||
// Narrow, the label goes above its value.
|
||||
if ui.available_width() < 360.0 {
|
||||
ui.label(RichText::new(k).font(theme::regular(12.0)).color(p.muted));
|
||||
ui.add(egui::Label::new(RichText::new(v).font(theme::regular(13.0))).wrap());
|
||||
widgets::copyable(ui, RichText::new(v).font(theme::regular(13.0)), v);
|
||||
ui.add_space(4.0);
|
||||
return;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ fn kv(ui: &mut Ui, k: &str, v: &str) {
|
||||
theme::regular(13.0),
|
||||
p.muted,
|
||||
);
|
||||
ui.add(egui::Label::new(RichText::new(v).font(theme::regular(13.0))).wrap());
|
||||
widgets::copyable(ui, RichText::new(v).font(theme::regular(13.0)), v);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user