Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specify label font color? #101

Closed
J-F-Liu opened this issue Apr 10, 2014 · 2 comments
Closed

How to specify label font color? #101

J-F-Liu opened this issue Apr 10, 2014 · 2 comments

Comments

@J-F-Liu
Copy link

J-F-Liu commented Apr 10, 2014

Both Font and Color should be properties of Text.

@tadvi
Copy link

tadvi commented Jul 10, 2014

I wanted something related to this question: how to set font on a label to bold. I just wanted to make specific label more visible inside the dialog screen.

This is how I did it: extract existing font of the label, create new font, set it. Example:

font := messageLB.Font()
newFont, _ := walk.NewFont(font.Family(), font.PointSize(), walk.FontBold)
messageLB.SetFont(newFont)

I also have another question on Fonts. How to set all fonts in the application to be about 2 pixels larger.
And I mean really - all fonts... text edit, line edit, labels, tables, all.

If you have big monitor with high dpi default fonts are super small. Not all of my app clients have 20/20 vision...
I know in Windows its possible to set fonts to be 125% or 150% larger. But that is in Control Panel settings. I do not want to force clients to do that.

@lxn
Copy link
Owner

lxn commented Jul 10, 2014

On setting widget text color: #21

Font is immutable, so the only way is to assign a new font.

SetFont on a Container should propagate to descendent widgets. If it doesn't work, there is probably a bug. I'm not sure when I will be able to look into it.

lxn added a commit that referenced this issue Jul 26, 2017
@lxn lxn closed this as completed Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants