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

Suggestion for the TextSize property #52

Open
samuelcguimaraes opened this issue Apr 27, 2018 · 5 comments
Open

Suggestion for the TextSize property #52

samuelcguimaraes opened this issue Apr 27, 2018 · 5 comments

Comments

@samuelcguimaraes
Copy link

I would suggest separating the TextSize property for the different Tile texts (title, text, ...). For example, I want to put in my Text the base date of the Tile information and I do not want this text to be the same size as my Title.

@foxy999
Copy link

foxy999 commented Jan 23, 2022

100% agree, changing the Description textSize would solve some problems.

@HanSolo
Copy link
Owner

HanSolo commented Jan 25, 2022

Well maybe you should think about creating your own skin for that purpose? The description is used in many Skins, which could lead to problems when someone can change the text size. But you can simply create a cooy of the skin that you use, change the fontsize to the one you need and use your own skin with tile.setSkin(yourskin).

@foxy999
Copy link

foxy999 commented Jan 25, 2022

Well maybe you should think about creating your own skin for that purpose? The description is used in many Skins, which could lead to problems when someone can change the text size. But you can simply create a cooy of the skin that you use, change the fontsize to the one you need and use your own skin with tile.setSkin(yourskin).

First of All thank you so much for your work, it's amazing.
Secondly, i just discovered yesterday the Custom Tile, however changing the font size manually doesn't seem to follow the grid size like a normal Tile.
I'm not sure if it's the same thing as the skin, is there a sample code for the custom Skin ?
Appreciated.

@HanSolo
Copy link
Owner

HanSolo commented Jan 25, 2022

No it's not the same, the custom tile skin simply let you add whatever JavaFX node you have to the tile by using the setGraphic() method. In JavaFX controls can be made out of a Control class and more than one Skin classes. The Skin only contains the visualization part of the control. Meaning to say you can show only the parts you like in your skin and the skin also defines the font sizes, colors, etc. So the simplest way is to create a copy of one skin e.g. the TextTileSkin, take a look at the code and make changes to it. Then you can use it by creating a Tile and call it's setSkin() method with an instance of your own skin. With this you can create whatever you like as long as it makes use of the properties in the Tile class.

@foxy999
Copy link

foxy999 commented Jan 25, 2022

i see, thanks a lot.

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