File tree Expand file tree Collapse file tree 6 files changed +8
-12
lines changed
src/ansys/tools/visualization_interface/backends/pyvista/widgets Expand file tree Collapse file tree 6 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ def update(self) -> None:
7777 is_inv = ""
7878 button_repr = self ._button .GetRepresentation ()
7979 button_icon_path = Path (
80- Path (__file__ ).parent / "_images" , self .button_config .value [1 ] + is_inv + " .png"
80+ Path (__file__ ).parent / "_images" , f" { self .button_config .value [1 ]} { is_inv } .png"
8181 )
8282 button_icon = vtkPNGReader ()
8383 button_icon .SetFileName (button_icon_path )
Original file line number Diff line number Diff line change @@ -84,10 +84,10 @@ def update(self) -> None:
8484
8585 show_vr = self ._button .GetRepresentation ()
8686 show_vison_icon_file = Path (
87- Path (__file__ ).parent / "_images" / ( "visibilityon" + is_inv + " .png")
87+ Path (__file__ ).parent / "_images" / f "visibilityon{ is_inv } .png"
8888 )
8989 show_visoff_icon_file = Path (
90- Path (__file__ ).parent / "_images" / ( "visibilityon" + is_inv + " .png")
90+ Path (__file__ ).parent / "_images" / f "visibilityon{ is_inv } .png"
9191 )
9292 show_r_on = vtkPNGReader ()
9393 show_r_on .SetFileName (show_vison_icon_file )
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ def update(self) -> None:
9292 is_inv = ""
9393 show_measure_vr = self ._button .GetRepresentation ()
9494 show_measure_icon_file = Path (
95- Path (__file__ ).parent / "_images" / ( "measurement" + is_inv + " .png")
95+ Path (__file__ ).parent / "_images" / f "measurement{ is_inv } .png"
9696 )
9797 show_measure_r = vtkPNGReader ()
9898 show_measure_r .SetFileName (show_measure_icon_file )
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ def update(self) -> None:
109109 is_inv = ""
110110 show_measure_vr = self ._button .GetRepresentation ()
111111 show_measure_icon_file = Path (
112- Path (__file__ ).parent / "_images" / ( "planecut" + is_inv + " .png")
112+ Path (__file__ ).parent / "_images" / f "planecut{ is_inv } .png"
113113 )
114114 show_measure_r = vtkPNGReader ()
115115 show_measure_r .SetFileName (show_measure_icon_file )
Original file line number Diff line number Diff line change @@ -71,18 +71,14 @@ def callback(self, state: bool) -> None:
7171 self .plotter .remove_actor (self ._actor )
7272 self ._actor = None
7373 else :
74- if self ._dark_mode :
75- color = "white"
76- else :
77- color = "black"
7874 self ._actor = self .plotter .show_bounds (
7975 grid = "front" ,
8076 location = "outer" ,
8177 all_edges = False ,
8278 show_xaxis = True ,
8379 show_yaxis = True ,
8480 show_zaxis = True ,
85- color = color ,
81+ color = "white" if self . _dark_mode else "black" ,
8682 xtitle = "X Axis [m]" ,
8783 ytitle = "Y Axis [m]" ,
8884 ztitle = "Z Axis [m]" ,
@@ -95,7 +91,7 @@ def update(self) -> None:
9591 else :
9692 is_inv = ""
9793 show_ruler_vr = self ._button .GetRepresentation ()
98- show_ruler_icon_file = Path (Path (__file__ ).parent / "_images" / ( "ruler" + is_inv + " .png") )
94+ show_ruler_icon_file = Path (Path (__file__ ).parent / "_images" / f "ruler{ is_inv } .png" )
9995 show_ruler_r = vtkPNGReader ()
10096 show_ruler_r .SetFileName (show_ruler_icon_file )
10197 show_ruler_r .Update ()
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ def update(self) -> None:
7676 else :
7777 is_inv = ""
7878 show_vr = self ._button .GetRepresentation ()
79- show_icon_file = Path (Path (__file__ ).parent / "_images" / ( "screenshot" + is_inv + " .png") )
79+ show_icon_file = Path (Path (__file__ ).parent / "_images" / f "screenshot{ is_inv } .png" )
8080 show_r = vtkPNGReader ()
8181 show_r .SetFileName (show_icon_file )
8282 show_r .Update ()
You can’t perform that action at this time.
0 commit comments