Skip to content

Commit f75f425

Browse files
committed
Renamed BooleanOperation::Difference to BooleanOperation::Exclude
1 parent 4ae2aec commit f75f425

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

editor/src/messages/menu_bar/menu_bar_message_handler.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,11 +486,11 @@ impl LayoutHolder for MenuBarMessageHandler {
486486
DocumentMessage::GroupSelectedLayers { group_folder_type }.into()
487487
})
488488
.disabled(no_active_document || !has_selected_layers),
489-
MenuListEntry::new("Difference")
490-
.label("Difference")
491-
.icon("BooleanDifference")
489+
MenuListEntry::new("Exclude")
490+
.label("Exclude")
491+
.icon("BooleanExclude")
492492
.on_commit(|_| {
493-
let group_folder_type = GroupFolderType::BooleanOperation(BooleanOperation::Difference);
493+
let group_folder_type = GroupFolderType::BooleanOperation(BooleanOperation::Exclude);
494494
DocumentMessage::GroupSelectedLayers { group_folder_type }.into()
495495
})
496496
.disabled(no_active_document || !has_selected_layers),

frontend/src/icons.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ import AlignRight from "/../branding/assets/icon-16px-solid/align-right.svg";
110110
import AlignTop from "/../branding/assets/icon-16px-solid/align-top.svg";
111111
import AlignVerticalCenter from "/../branding/assets/icon-16px-solid/align-vertical-center.svg";
112112
import Artboard from "/../branding/assets/icon-16px-solid/artboard.svg";
113-
import BooleanDifference from "/../branding/assets/icon-16px-solid/boolean-difference.svg";
113+
import BooleanExclude from "/../branding/assets/icon-16px-solid/boolean-difference.svg";
114114
import BooleanDivide from "/../branding/assets/icon-16px-solid/boolean-divide.svg";
115115
import BooleanIntersect from "/../branding/assets/icon-16px-solid/boolean-intersect.svg";
116116
import BooleanSubtractBack from "/../branding/assets/icon-16px-solid/boolean-subtract-back.svg";
@@ -229,7 +229,7 @@ const SOLID_16PX = {
229229
AlignTop: { svg: AlignTop, size: 16 },
230230
AlignVerticalCenter: { svg: AlignVerticalCenter, size: 16 },
231231
Artboard: { svg: Artboard, size: 16 },
232-
BooleanDifference: { svg: BooleanDifference, size: 16 },
232+
BooleanExclude: { svg: BooleanExclude, size: 16 },
233233
BooleanDivide: { svg: BooleanDivide, size: 16 },
234234
BooleanIntersect: { svg: BooleanIntersect, size: 16 },
235235
BooleanSubtractBack: { svg: BooleanSubtractBack, size: 16 },

node-graph/libraries/vector-types/src/vector/misc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ pub enum BooleanOperation {
2121
SubtractBack,
2222
#[icon("BooleanIntersect")]
2323
Intersect,
24-
#[icon("BooleanDifference")]
25-
Difference,
24+
#[icon("BooleanExclude")]
25+
Exclude,
2626
#[icon("BooleanSubtractFront")]
2727
Trim,
2828
#[icon("BooleanSubtractFront")]

node-graph/nodes/path-bool/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async fn boolean_operation<I: graphic_types::IntoGraphicTable + 'n + Send + Clon
3535
// The first index is the bottom of the stack
3636
let flattened = flatten_vector(&content);
3737
let mut result_vector_table = match operation {
38-
BooleanOperation::Union | BooleanOperation::SubtractFront | BooleanOperation::SubtractBack | BooleanOperation::Intersect | BooleanOperation::Difference => {
38+
BooleanOperation::Union | BooleanOperation::SubtractFront | BooleanOperation::SubtractBack | BooleanOperation::Intersect | BooleanOperation::Exclude => {
3939
boolean_operation_on_vector_table(&flattened, operation)
4040
}
4141
BooleanOperation::Trim | BooleanOperation::Crop => cascading_subtract(&flattened, operation),
@@ -111,7 +111,7 @@ impl WindingNumber {
111111
BooleanOperation::SubtractFront => self.elems.first().is_some_and(is_in) && self.elems.iter().skip(1).all(is_out),
112112
BooleanOperation::SubtractBack => self.elems.last().is_some_and(is_in) && self.elems.iter().rev().skip(1).all(is_out),
113113
BooleanOperation::Intersect => !self.elems.is_empty() && self.elems.iter().all(is_in),
114-
BooleanOperation::Difference => self.elems.iter().any(is_in) && !self.elems.iter().all(is_in),
114+
BooleanOperation::Exclude => self.elems.iter().any(is_in) && !self.elems.iter().all(is_in),
115115
BooleanOperation::Trim => unreachable!(),
116116
BooleanOperation::Crop => unreachable!(),
117117
}

0 commit comments

Comments
 (0)