cogentcore / core

A free and open source framework for building powerful, fast, elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the web with a single Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.76k stars 83 forks source link

Button text not centered in custom layout parent #1324

Closed kkoreilly closed 1 day ago

kkoreilly commented 1 week ago

Discussed in https://github.com/cogentcore/core/discussions/1311

Originally posted by **Stingaaa** November 14, 2024 When I set up the styles for my button, I tried many things like setting Text.Align and Text.AlignV to Center (I believe it also is the default setting) but the text inside the button did not get centered. I tried to set the size of the text widget to the size of my button but this also didn't change anything. What parameter do I need to set/ change to center the text? Also whilst trying to set the size of the text widget to the size of the button I found out, that the text widget size is not 100% of the button, it seemed to me like the maximum size was at about 60% of the button (I can provide more details if necessary). Is there a way to set this limitation to 100%, so that a larger text would fit in the same space than before?