pygui initial implementation for supporting the view menu for showing and hiding canvas elements
This commit is contained in:
parent
f45a11076f
commit
d26c4fc4ab
9 changed files with 119 additions and 61 deletions
|
@ -85,6 +85,7 @@ class Shape:
|
|||
fill=self.shape_data.fill_color,
|
||||
outline=self.shape_data.border_color,
|
||||
width=self.shape_data.border_width,
|
||||
state=self.canvas.show_shapes.state(),
|
||||
)
|
||||
self.draw_shape_text()
|
||||
elif self.shape_type == ShapeType.RECTANGLE:
|
||||
|
@ -98,6 +99,7 @@ class Shape:
|
|||
fill=self.shape_data.fill_color,
|
||||
outline=self.shape_data.border_color,
|
||||
width=self.shape_data.border_width,
|
||||
state=self.canvas.show_shapes.state(),
|
||||
)
|
||||
self.draw_shape_text()
|
||||
elif self.shape_type == ShapeType.TEXT:
|
||||
|
@ -109,6 +111,7 @@ class Shape:
|
|||
text=self.shape_data.text,
|
||||
fill=self.shape_data.text_color,
|
||||
font=font,
|
||||
state=self.canvas.show_shapes.state(),
|
||||
)
|
||||
else:
|
||||
logging.error("unknown shape type: %s", self.shape_type)
|
||||
|
@ -136,6 +139,7 @@ class Shape:
|
|||
text=self.shape_data.text,
|
||||
fill=self.shape_data.text_color,
|
||||
font=font,
|
||||
state=self.canvas.show_shape_labels.state(),
|
||||
)
|
||||
|
||||
def shape_motion(self, x1: float, y1: float):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue