Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ Bruno Dupuis
Christopher Noel Hesse
Marcin Zając
Laura Gallo
Tim Murison
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
8 changes: 5 additions & 3 deletions druid/src/widget/checkbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ impl Widget<bool> 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)
Expand Down