From 7dd250340afac56cf699c5e8b1a53c88854667d4 Mon Sep 17 00:00:00 2001 From: agentsim Date: Wed, 10 Nov 2021 22:21:08 -0500 Subject: [PATCH 1/3] Centre checkmark in checkbox --- druid/src/widget/checkbox.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/druid/src/widget/checkbox.rs b/druid/src/widget/checkbox.rs index a6e767b674..0cf3c251f9 100644 --- a/druid/src/widget/checkbox.rs +++ b/druid/src/widget/checkbox.rs @@ -139,10 +139,12 @@ impl Widget for Checkbox { if *data { // Paint the checkmark + let x_offset = (rect.width() - 10.0) / 2.0; + let y_offset = (rect.height() - 8.0) / 2.0; let mut path = BezPath::new(); - path.move_to((4.0, 9.0)); - path.line_to((8.0, 13.0)); - path.line_to((14.0, 5.0)); + path.move_to((x_offset, y_offset + 4.0)); + path.line_to((x_offset + 4.0, y_offset + 8.0)); + path.line_to((x_offset + 10.0, y_offset)); let style = StrokeStyle::new() .line_cap(LineCap::Round) From a55ae25c4670415a003e43858c92f9310e37d712 Mon Sep 17 00:00:00 2001 From: agentsim Date: Wed, 10 Nov 2021 22:23:57 -0500 Subject: [PATCH 2/3] Update AUTHORS and CHANGELOG.md --- AUTHORS | 1 + CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/AUTHORS b/AUTHORS index b78e737b01..df0903661e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -19,3 +19,4 @@ Bruno Dupuis Christopher Noel Hesse Marcin ZajÄ…c Laura Gallo +Tim Murison diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b4a92ba9e..8f7b00ff10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,6 +92,7 @@ You can find its changes [documented below](#070---2021-01-01). ### Fixed +- Centre checkmark in checkbox ([#2036] by [@agentsim]) - `Notification`s will not be delivered to the widget that sends them ([#1640] by [@cmyr]) - `TextBox` can handle standard keyboard shortcuts without needing menus ([#1660] by [@cmyr]) - GTK Shell: Prevent mangling of newline characters in clipboard ([#1695] by [@ForLoveOfCats]) From 9bc40a8e3e708366e2d9fdd69b9f2a0df423c5b3 Mon Sep 17 00:00:00 2001 From: agentsim Date: Fri, 26 Nov 2021 21:09:18 -0500 Subject: [PATCH 3/3] Fix links --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f7b00ff10..868e11882e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -526,6 +526,7 @@ Last release without a changelog :( [@lisael]: https://github.com/lisael [@jenra-uwu]: https://github.com/jenra-uwu [@klemensn]: https://github.com/klemensn +[@agentsim]: https://github.com/agentsim [#599]: https://github.com/linebender/druid/pull/599 [#611]: https://github.com/linebender/druid/pull/611 @@ -805,6 +806,7 @@ Last release without a changelog :( [#1978]: https://github.com/linebender/druid/pull/1978 [#1993]: https://github.com/linebender/druid/pull/1993 [#1996]: https://github.com/linebender/druid/pull/1996 +[#2036]: https://github.com/linebender/druid/pull/2036 [Unreleased]: https://github.com/linebender/druid/compare/v0.7.0...master [0.7.0]: https://github.com/linebender/druid/compare/v0.6.0...v0.7.0