forked from 1b-agent/opencadstudio-upstream
fix(section): add state grip menu
This commit is contained in:
1 parent
78bbd1065a
commit
0426df79ca
5 files changed
+104
-17
No files matched your search
+5
-3
@@ -781,7 +781,7 @@ fn draw_grip_marker(
|
||||
b.close();
|
||||
}),
|
||||
GripShape::Circle => canvas::Path::circle(Point::new(sp.x, sp.y), h),
|
||||
GripShape::Dropdown => canvas::Path::new(|b| {
|
||||
GripShape::Dropdown | GripShape::DropdownAdjacent => canvas::Path::new(|b| {
|
||||
b.move_to(Point::new(sp.x - h, sp.y - h * 0.5));
|
||||
b.line_to(Point::new(sp.x + h, sp.y - h * 0.5));
|
||||
b.line_to(Point::new(sp.x, sp.y + h));
|
||||
@@ -831,7 +831,10 @@ fn draw_grip_marker(
|
||||
} else {
|
||||
palette.primary.base.color
|
||||
};
|
||||
let fill = if grip.shape == GripShape::Dropdown {
|
||||
let fill = if matches!(
|
||||
grip.shape,
|
||||
GripShape::Dropdown | GripShape::DropdownAdjacent
|
||||
) {
|
||||
color
|
||||
} else {
|
||||
palette.background.base.color.scale_alpha(0.7)
|
||||
@@ -3797,4 +3800,3 @@ mod selection_visual_color_tests {
|
||||
assert!((selection_fill_alpha(100.0, true) - 0.45).abs() < 1e-5);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user