@@ -765,24 +765,6 @@ def getfilename(var, text):
765
765
button = ctk .CTkButton (parent , 50 , text = "Browse" , command = lambda a = var ,b = searchtext :getfilename (a ,b ))
766
766
button .grid (row = row + 1 , column = 1 , stick = "nw" )
767
767
return
768
- def show_tooltip (event , tooltip_text = None ):
769
- if hasattr (show_tooltip , "_tooltip" ):
770
- tooltip = show_tooltip ._tooltip
771
- else :
772
- tooltip = ctk .CTkToplevel (root )
773
- tooltip .configure (fg_color = "#ffffe0" )
774
- tooltip .withdraw ()
775
- tooltip .overrideredirect (True )
776
- tooltip_label = ctk .CTkLabel (tooltip , text = tooltip_text , text_color = "#000000" , fg_color = "#ffffe0" )
777
- tooltip_label .pack (expand = True , padx = 2 , pady = 1 )
778
- show_tooltip ._tooltip = tooltip
779
- x , y = root .winfo_pointerxy ()
780
- tooltip .wm_geometry (f"+{ x + 10 } +{ y + 10 } " )
781
- tooltip .deiconify ()
782
- def hide_tooltip (event ):
783
- if hasattr (show_tooltip , "_tooltip" ):
784
- tooltip = show_tooltip ._tooltip
785
- tooltip .withdraw ()
786
768
787
769
from subprocess import run , CalledProcessError
788
770
def get_device_names ():
@@ -930,7 +912,7 @@ def changerunmode(a,b,c):
930
912
931
913
runoptbox = ctk .CTkComboBox (quick_tab , values = runopts , width = 180 ,variable = runopts_var , state = "readonly" )
932
914
runoptbox .grid (row = 1 , column = 1 ,padx = 8 , stick = "nw" )
933
- runoptbox .set (runopts [0 ])
915
+ runoptbox .set (runopts [0 ]) # Set to first available option
934
916
# Tell user how many backends are available
935
917
num_backends_built = makelabel (quick_tab , str (len (runopts )) + "/6" , 5 , 2 )
936
918
num_backends_built .grid (row = 1 , column = 2 , padx = 0 , pady = 0 )
@@ -968,15 +950,16 @@ def changerunmode(a,b,c):
968
950
makelabel (hardware_tab , "Presets:" , 1 )
969
951
runoptbox = ctk .CTkComboBox (hardware_tab , values = runopts , width = 180 ,variable = runopts_var , state = "readonly" )
970
952
runoptbox .grid (row = 1 , column = 1 ,padx = 8 , stick = "nw" )
971
- runoptbox .set (runopts [0 ])
953
+ runoptbox .set (runopts [0 ]) # Set to first available option
972
954
runopts_var .trace ('w' , changerunmode )
973
955
changerunmode (1 ,1 ,1 )
974
956
975
957
# Tell user how many backends are available
976
958
num_backends_built = makelabel (hardware_tab , str (len (runopts )) + "/6" , 5 , 2 )
977
959
num_backends_built .grid (row = 1 , column = 2 , padx = 0 , pady = 0 )
978
960
num_backends_built .configure (text_color = "#00ff00" )
979
- num_backends_built .bind ("<Enter>" , show_tooltip )
961
+ # Bind the backend count label with the tooltip function
962
+ num_backends_built .bind ("<Enter>" , lambda event : show_tooltip (event , f"This is the number of backends you have built and available." + (f"\n Missing: { ', ' .join (antirunopts )} " if len (runopts ) != 6 else "" )))
980
963
num_backends_built .bind ("<Leave>" , hide_tooltip )
981
964
# threads
982
965
makelabelentry (hardware_tab , "Threads:" , threads_var , 8 , 50 )
0 commit comments