Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Dec 5, 2024
2 parents e0a1b77 + b9b1808 commit 5bb65fc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/rnote-engine/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ rnote_engine_sources = files(
'pens/shaper.rs',
'pens/shortcuts.rs',
'pens/tools/mod.rs',
'pens/tools/offsetcamera.rs',
'pens/tools/verticalspace.rs',
'pens/tools/zoom.rs',
'pens/typewriter/mod.rs',
'pens/typewriter/penevents.rs',
'store/chrono_comp.rs',
Expand Down
4 changes: 4 additions & 0 deletions crates/rnote-engine/src/pens/tools/offsetcamera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ impl OffsetCameraTool {

impl DrawableOnDoc for OffsetCameraTool {
fn bounds_on_doc(&self, engine_view: &EngineView) -> Option<Aabb> {
if matches!(self.state, ToolsState::Idle) {
return None;
}

Some(Aabb::from_half_extents(
self.start.into(),
((Self::CURSOR_SIZE + na::Vector2::repeat(Self::CURSOR_STROKE_WIDTH)) * 0.5)
Expand Down
4 changes: 4 additions & 0 deletions crates/rnote-engine/src/pens/tools/verticalspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ impl VerticalSpaceTool {

impl DrawableOnDoc for VerticalSpaceTool {
fn bounds_on_doc(&self, engine_view: &EngineView) -> Option<Aabb> {
if matches!(self.state, ToolsState::Idle) {
return None;
}

let viewport = engine_view.camera.viewport();

let x = viewport.mins[0];
Expand Down
4 changes: 4 additions & 0 deletions crates/rnote-engine/src/pens/tools/zoom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ impl ZoomTool {

impl DrawableOnDoc for ZoomTool {
fn bounds_on_doc(&self, engine_view: &EngineView) -> Option<Aabb> {
if matches!(self.state, ToolsState::Idle) {
return None;
}

let start_circle_center = engine_view
.camera
.transform()
Expand Down

0 comments on commit 5bb65fc

Please sign in to comment.