@@ -765,6 +765,24 @@ 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 ()
768
786
769
787
from subprocess import run , CalledProcessError
770
788
def get_device_names ():
@@ -851,24 +869,6 @@ def get_device_names():
851
869
CUDA_quick_gpu_selector_box = ctk .CTkComboBox (quick_tab , values = CUdevices , width = 180 , variable = gpu_choice_var , state = "readonly" )
852
870
quick_lowvram_box = makecheckbox (quick_tab , "Low VRAM" , lowvram_var , 5 )
853
871
854
- def show_tooltip (event , tooltip_text = None ):
855
- if hasattr (show_tooltip , "_tooltip" ):
856
- tooltip = show_tooltip ._tooltip
857
- else :
858
- tooltip = ctk .CTkToplevel (root )
859
- tooltip .configure (fg_color = "#ffffe0" )
860
- tooltip .withdraw ()
861
- tooltip .overrideredirect (True )
862
- tooltip_label = ctk .CTkLabel (tooltip , text = tooltip_text , text_color = "#000000" , fg_color = "#ffffe0" )
863
- tooltip_label .pack (expand = True , padx = 2 , pady = 1 )
864
- show_tooltip ._tooltip = tooltip
865
- x , y = root .winfo_pointerxy ()
866
- tooltip .wm_geometry (f"+{ x + 10 } +{ y + 10 } " )
867
- tooltip .deiconify ()
868
- def hide_tooltip (event ):
869
- if hasattr (show_tooltip , "_tooltip" ):
870
- tooltip = show_tooltip ._tooltip
871
- tooltip .withdraw ()
872
872
def changerunmode (a ,b ,c ):
873
873
index = runopts_var .get ()
874
874
if index == "Use CLBlast" or index == "Use CuBLAS/hipBLAS" :
@@ -916,7 +916,7 @@ def changerunmode(a,b,c):
916
916
num_backends_built = makelabel (quick_tab , str (len (runopts )) + "/6" , 5 , 2 )
917
917
num_backends_built .grid (row = 1 , column = 2 , padx = 0 , pady = 0 )
918
918
num_backends_built .configure (text_color = "#00ff00" )
919
- num_backends_built .bind ("<Enter>" , lambda event : show_tooltip (event , f"This is the number of backends you have built and available.\n Missing: { ', ' .join (antirunopts )} " ))
919
+ num_backends_built .bind ("<Enter>" , lambda event : show_tooltip (event , f"This is the number of backends you have built and available." if len ( runopts ) == 6 else + " \n Missing: {', '.join(antirunopts)}" ))
920
920
num_backends_built .bind ("<Leave>" , hide_tooltip )
921
921
# threads
922
922
makelabelentry (quick_tab , "Threads:" , threads_var , 8 , 50 )
0 commit comments