On Screen Keyboard Display Issue

More
5 years 11 months ago #187992 by phillc54

cmorley wrote: What code did you use to change the font on initialization?


[strike]I tried:
self.w.gcode_display.setMarginsFont(font)

and:
text = bytearray(str.encode('Arial'))
self.w.gcode_display.SendScintilla(QsciScintilla.SCI_STYLESETFONT, QsciScintilla.STYLE_DEFAULT, text)

But they are now commented out and I cannot remember which one worked. As soon as a file was loaded it reverted to the original default.

Edit: added text = code that I forgot earlier...[/strike]

Edit2: This worked:
Code:
font = QtGui.QFont() font.setFamily('Lato') font.setFixedPitch(False) font.setPointSize(24) font.setBold(False) self.w.gcode_display.setMarginsFont(font)

As soon as a file was loaded it reverted to the original default.

Please Log in to join the conversation.

More
5 years 11 months ago #187993 by phillc54

Grotius wrote: Hi Phill,

I submitted a little issue on github. Have a look. I would like to test your version today !


I can load it on a buster rip master branch and a buster local master branch installation.
There is a path issue with 2.8 branch that affects the sim panel so I moved some files and it also works on stretch for rip and local.

Please Log in to join the conversation.

More
5 years 11 months ago #188090 by cmorley
It seems fonts are much more complicated then i may first seem.
There are default fonts, default lexer font and individual lexer style fonts.

For now try this:
Code:
self.font = QFont() self.font.setFamily('Lato') self.font.setFixedPitch(True) self.font.setPointSize(10) self.w.gcode_editor.editor.font = self.font for i in range(0,4): self.w.gcode_editor.editor.lexer.setFont(self.font,i) self.w.gcode_editor.editor.set_background_color('#FFFFFF')

I'll need to add convience method to make this easier in the future.

Chris

Please Log in to join the conversation.

More
5 years 11 months ago #188278 by phillc54

cmorley wrote: It seems fonts are much more complicated then i may first seem.
There are default fonts, default lexer font and individual lexer style fonts.

Sorry, I forgot to give this a try yesterday. I quick tryout this morning and it looks good, Thank you.

Edit: It worked in a GcodeDisplay as well.

Please Log in to join the conversation.

More
5 years 11 months ago #188639 by cmorley
i add the ability to set background color, lexer text colors. lexer text fonts with stylesheets in master. There are basic docs about it under 'qtvcp widgets'

Hopefully they are useful to you as you can change the colors that work with the rest of the screens colors.

Chris

Please Log in to join the conversation.

More
5 years 11 months ago #188640 by phillc54
Cool, I'll take a peek . I have just about finished the color changing stuff :(

Please Log in to join the conversation.

More
5 years 11 months ago #188641 by JohnnyCNC
I was just looking for virtual keyboard. I'll be watching this with great interest. Thank You.

Please Log in to join the conversation.

More
5 years 11 months ago #188642 by cmorley
JonnyCNC
based on your other post I think you are looking for a virtual keyboard for the system rather then the screen.
matchbox and onscreen keyboard are system widget virtual keyboards.

Thew virtual keyboard in wtvcp only works for the qtvcp screen.

Chris

Please Log in to join the conversation.

More
5 years 11 months ago #188645 by JohnnyCNC
Thanks Chris,

I mainly want it for doing MDI keyins or offset values and the like while I am in QTDragon. I did install the virtual keyboard "Florence" and it does work but what was shown here looks much more conveniant to use while in QTDragon. If I am doing other stuff I'll just use my physical keyboard and mouse.

Please Log in to join the conversation.

More
5 years 11 months ago #188675 by cmorley
JohnnyCNC

QtDragon has a builtin keyboard for MDI and offsets. should be a button on the top right of the tabs - 'KEYBD"

Chris

Please Log in to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum