Axis Modifications

More
1 year 9 months ago #318719 by phillc54
Replied by phillc54 on topic Axis Modifications
Ahh, yes I see that now. There are a couple of procedures in tkfbox.tcl that overwrite the button text.
The only correct way I see to do it would be to roll your own dialog box.
There is an ugly workaround by running the below code in the user_live_update method of the user command file. You would restore bigfileopen.tcl back to the original.
Code:
def user_live_update():     if root_window.tk.eval('winfo exists .__tk_filedialog') == '1':         open = '\n   Open   \n'         cancel = '\nCancel\n'         root_window.tk.eval(f'.__tk_filedialog.contents.f2.ok configure -text {{{open}}}')         root_window.tk.eval(f'.__tk_filedialog.contents.f2.cancel configure -text {{{cancel}}}')

It is really ugly...
 

Please Log in to join the conversation.

More
1 year 9 months ago #318910 by phillc54
Replied by phillc54 on topic Axis Modifications
I really didn't like the last one so I tried something different and this is the result.
You don't need user_live_update, just use the below in bigfileopen.tcl.
Code:
# bigfileopen.tcl if {[info proc tkgof] == ""} {rename tk_getOpenFile tkgof} proc tk_getOpenFile {args} {     # get width and height for max screen size:     variable width  [lindex [wm maxsize .] 0]     variable height [lindex [wm maxsize .] 1]     # alternately, just set width and height explicitly:     variable width  800     variable height 600     # location on screen:     variable xoffset 0     variable yoffset 0     # padding to enlarge buttons:     variable padx 10     variable pady 20     # set the window size and the button sizes     after 0 {wm geometry .__tk_filedialog ${width}x${height}+${xoffset}+${yoffset};              .__tk_filedialog.contents.f2.ok configure -padding [list $padx $pady $padx $pady];              .__tk_filedialog.contents.f2.cancel configure -padding [list $padx $pady $padx $pady]}     return [eval ::tkgof $args] }
 

Please Log in to join the conversation.

More
1 year 9 months ago #318923 by nawaf
Replied by nawaf on topic Axis Modifications
Thank you, Phill, that was very helpful.How can I make the file list display with larger sizes? I want to increase the size of the text and icons.  
Code:
if {[info proc tkgof] == ""} {rename tk_getOpenFile tkgof} proc tk_getOpenFile {args} {     # location and size on screen:     variable xoff    50     variable yoff    10     variable width    900     variable height    500     variable padx    10     variable pady    20     after 0 {         wm geometry .__tk_filedialog ${width}x${height}+${xoff}+${yoff};         .__tk_filedialog.contents.f1.lab configure -padding [list $padx $pady $padx $pady];         .__tk_filedialog.contents.f1.menu configure -direction below;         .__tk_filedialog.contents.f1.menu.menu configure -font {Sans 20};         .__tk_filedialog.contents.f1.up configure -padding [list $pady $pady $pady $pady];         .__tk_filedialog.contents.f2.lab configure -padding [list $padx $pady $padx $pady];         .__tk_filedialog.contents.f2.ent configure -font {Sans 18};         .__tk_filedialog.contents.f2.lab2 configure -padding [list $padx $pady $padx $pady];         .__tk_filedialog.contents.f2.menu configure -padding [list 5 10 5 10];         .__tk_filedialog.contents.f2.ok configure -padding [list $padx $pady $padx $pady];         .__tk_filedialog.contents.f2.cancel configure -padding [list $padx $pady $padx $pady];         .__tk_filedialog.contents.f2.hidden configure -padding [list 10 10 10 10]     }          return [eval tkgof $args]      }

Please Log in to join the conversation.

More
1 year 9 months ago #318994 by cakeslob
Replied by cakeslob on topic Axis Modifications
holy shit I am not sure why they made this so hard. they are using a different font class
for changing the font size in the file menu -
Code:
rC('font','configure','TkIconFont','-family', fontName, '-size', fontSize) rC('font','configure','TkTextFont','-family', fontName, '-size', fontSize)

for posteriority heres how I got there. fbox takes the files and makes them into an Iconlist, which then uses the font family TkIconFont to configure this megawidget "Iconlist"

I thought it was odd that some of the widgets configured to our textsize and font but some did not. Its the same case for the entry widget that loads the file name. The colours dont change for most widgets unless you change the colour after you open, and even then only some widgets configure. The options in the listbox configure colour but none of the other text changes colour.

nawaf are you using regularmac800? that will make this easier. you can just add those 2 lines, or get the update from the github.

unfortunately this doesnt make it a better file browser. there are some alternative ones i want to try out when i figure out how

Please Log in to join the conversation.

More
1 year 9 months ago #318998 by phillc54
Replied by phillc54 on topic Axis Modifications

holy shit I am not sure why they made this so hard

Yeah, these are mostly themed widgets so some options require setting via styles. It can be a PITA.

I want to increase the size of the text and icons

It seems to need an update for the first run, the below bigfileopen.tcl touches every widget in the dialog and includes the update.
Warning: Spoiler!


 

Please Log in to join the conversation.

More
1 year 9 months ago #319084 by nawaf
Replied by nawaf on topic Axis Modifications

nawaf are you using regularmac800?

Yeah, thanks, cakeslob, for the GUI mod.
I am using a 10-inch touchscreen with a resolution of 1024x600 and I want to use the Axis GUI with buttons that are large enough, and I saw your mod and tried it. It's great because the buttons are big enough.
But for the open file dialog, the buttons are not big enough for my fingers, making it a bit difficult to touch them on my screen
 

Please Log in to join the conversation.

More
1 year 9 months ago #319085 by nawaf
Replied by nawaf on topic Axis Modifications
Thank you, Pill, this works great for me
Warning: Spoiler!

Please Log in to join the conversation.

More
1 year 3 months ago #331949 by freemoore
Replied by freemoore on topic Axis Modifications
Hi all.

As I write this I'm suddenly uncertain whether it counts as a poor use of AI; in any case, I asked the chatGPT 4o for a mod and the result appears to work. I wanted better file search abilities since lcnc's default behaviour means it takes a lot of clicks and scrolling for me to find the files I want to run - particularly 'last modified' sorting.

Do sudo apt-get install zenity,

Follow BigJohnT's instructions regarding bigfileopen.tcl

Then use the attached as your bigfileopen.tcl (copy it in to your config folder and change the extension)

This calls the zenity app on using file Open within Axis. It should default to the Desktop the first time, then to the last folder used. Hope it's some use.


Andy

 

Attachment not found

Please Log in to join the conversation.

More
1 year 3 months ago #332109 by Todd Zuercher
Replied by Todd Zuercher on topic Axis Modifications
I've also found the included file browsing/file open ap within Axis to be very limiting to use. The work around we often used was to use the file browser of your choice on your Linux desktop to find the g-code file you want to run, then with a right mouse click use the "axis-remote" command to open to open the g-code file in Axis directly from the file browser. This was especially helpful when wanting to run files saved in network directories that you could not easily find or access using file open in Linuxcnc.

I don't know if this works using other Linuxcnc GUIs or if any of the other GUIs offer an equivalent command to axis-remote that can be used to open a g-code file from another file browser.

Please Log in to join the conversation.

More
1 year 3 months ago #332151 by cakeslob
Replied by cakeslob on topic Axis Modifications
yeah there are some file managers you can integrate into axis tab and use the way you describe. There are some TK alternatives file browsers I have yet to figure out how to use yet

Please Log in to join the conversation.

Time to create page: 0.140 seconds
Powered by Kunena Forum