Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to piet v0.0.12 #824

Merged
merged 1 commit into from
Apr 12, 2020
Merged

Update to piet v0.0.12 #824

merged 1 commit into from
Apr 12, 2020

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Apr 9, 2020

This gives us blurred rects as well as multi-line text.

this unblocks #759

@cmyr cmyr added the S-needs-review waits for review label Apr 9, 2020
@xStrom
Copy link
Member

xStrom commented Apr 9, 2020

In tests/harness.rs:

        let mut harness = Harness {
            piet,
            inner,
            window_size: DEFAULT_SIZE,
        };
        f(&mut harness);
        harness.piet.finish().expect("piet finish failed"); // <--- Add this line

@@ -89,7 +89,7 @@ impl TextBox {
.unwrap();

piet_text
.new_text_layout(&font, &text.to_string())
.new_text_layout(&font, &text.to_string(), std::f64::INFINITY)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I hit enter in the hello.rs example, the cursor gets into a weird state (previously it would just print the box character). I'm on linux haven't tried it on mac yet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me the cursor goes to the beginning of the textbox and the label is multi-line. Certainly broken, but probably as simple as disabling enter for now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, I'm going to patch that here as well; we will suppress enter in the textbox widget. (this isn't perfect, since you could still paste one in, but I think it's a good initial step. We need to figure out a whole whack of new text stuff, now.)

This gives us blurred rects as well as multi-line text.
Copy link
Member

@xStrom xStrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be working fine.

@xStrom xStrom removed the S-needs-review waits for review label Apr 12, 2020
Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but I've only looked at the code, not played with it. Agree text will require some work, and I may be up for that, but am not committing now.

@cmyr cmyr merged commit 872536d into master Apr 12, 2020
@cmyr cmyr deleted the update-piet branch April 12, 2020 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants