mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 09:26:43 +00:00
docs: tidy comments (review)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9ba6035d43
commit
d92ee2f820
2 files changed
+6
-8
No files matched your search
@@ -51,10 +51,9 @@ pub struct CropState {
|
||||
pub default_frame: bool,
|
||||
/// The document (index and size) the default frame was made for.
|
||||
frame_for: Option<(usize, u32, u32)>,
|
||||
/// The document (id and size) whose frame Esc (or the options bar's cancel) hid: with the
|
||||
/// Crop tool still picked no default frame is made for it until a press on the canvas, or
|
||||
/// leaving and re-picking the tool, as in Photoshop (#10370). Keyed by id, not tab index, so
|
||||
/// closing it never hides the frame of the tab that takes its place.
|
||||
/// The document (id and size) whose frame [`dismiss`] hid: no default frame is made for it while
|
||||
/// this matches. Keyed by id, not tab index, so closing it never hides the frame of the tab that
|
||||
/// takes its place.
|
||||
dismissed: Option<(photocraft_doc::DocId, u32, u32)>,
|
||||
/// The frame is being edited (pressed since it was made): the canvas shows what lies past it.
|
||||
pub editing: bool,
|
||||
|
||||
@@ -1200,8 +1200,7 @@ fn esc_hides_the_frame_until_a_press_or_re_picking_the_tool() {
|
||||
|
||||
#[test]
|
||||
fn closing_a_dismissed_document_never_hides_the_next_tabs_frame() {
|
||||
// #10370 review: the dismissal was keyed by tab index, so a same-size tab moving into the
|
||||
// closed one's index kept its frame hidden.
|
||||
// A same-size tab that takes the closed document's index must still show its frame.
|
||||
let mut app = app(SampleType::U8);
|
||||
let doc = Document::with_background("other", Size::new(200, 100), ColorMode::Rgb, SampleType::U8, Color::WHITE);
|
||||
app.session.add_document(doc, None);
|
||||
@@ -1218,8 +1217,8 @@ fn closing_a_dismissed_document_never_hides_the_next_tabs_frame() {
|
||||
|
||||
#[test]
|
||||
fn a_straighten_press_ends_the_dismissal() {
|
||||
// #10370 review: a press taken by Straighten skipped `begin_drag`, which ends the dismissal,
|
||||
// so a click too short to level anything left the frame hidden.
|
||||
// Straighten takes the press before `begin_drag`; a click too short to level anything still
|
||||
// ends the dismissal.
|
||||
let mut app = app(SampleType::U8);
|
||||
ensure_frame(&mut app);
|
||||
press_esc(&mut app);
|
||||
|
||||
Reference in new issue
Block a user