Context
When styling a UI::Button, the property to set the button's text color is foreground_color. While this is technically correct (foreground vs background), the more intuitive name for button text styling is text_color, which aligns with UI::Label and UI::Text conventions.
Problem
button = ::UI::Button.new("Click me")
button.text_color = ::UI::Color.new(1.0, 1.0, 1.0, 1.0) # Expected — doesn't exist
button.foreground_color = ::UI::Color.new(1.0, 1.0, 1.0, 1.0) # Actual property
Other text-bearing components like UI::Label use text_color. The inconsistency between text_color on labels and foreground_color on buttons causes confusion.
Proposal
Add text_color as an alias for foreground_color on UI::Button, or standardize on one name across all text-bearing components. Consistency is more important than which name wins.
Options:
- Add
text_color alias on Button (delegates to foreground_color)
- Add
foreground_color alias on Label/Text (delegates to text_color)
- Standardize all to
text_color (breaking change on Button)
Option 1 is the least disruptive.
Context
When styling a
UI::Button, the property to set the button's text color isforeground_color. While this is technically correct (foreground vs background), the more intuitive name for button text styling istext_color, which aligns withUI::LabelandUI::Textconventions.Problem
Other text-bearing components like
UI::Labelusetext_color. The inconsistency betweentext_coloron labels andforeground_coloron buttons causes confusion.Proposal
Add
text_coloras an alias forforeground_coloronUI::Button, or standardize on one name across all text-bearing components. Consistency is more important than which name wins.Options:
text_coloralias on Button (delegates toforeground_color)foreground_coloralias on Label/Text (delegates totext_color)text_color(breaking change on Button)Option 1 is the least disruptive.