Add support for custom font colors in the TabBar#106263
Add support for custom font colors in the TabBar#106263Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
26397e2 to
cb79183
Compare
|
Admittedly this is lot of API for a relatively simple change. I'm curious what others think about using the |
|
I reduced the size of the API from eight to the three functions seen below: extends TabContainer
func _ready():
var color = get_tab_bar().get_font_color_override(BaseButton.DRAW_DISABLED, 3)
get_tab_bar().set_font_color_override(BaseButton.DRAW_PRESSED, 0, Color.DEEP_PINK)
get_tab_bar().set_font_color_override_all(2, Color.YELLOW)This should hopefully make it easier to use, and behind the scenes it is neater, using an array of Colors instead of individual variables. Feedback is welcome on the specific enum used. Another option would be to have a |
d1d04b9 to
4c302b0
Compare
4c302b0 to
26ea808
Compare
|
I updated to use a extends TabContainer
func _ready():
var color = get_tab_bar().get_font_color_override(0, TabBar.DRAW_DISABLED)
get_tab_bar().set_font_color_override(1, TabBar.DRAW_PRESSED, Color.DEEP_PINK)
get_tab_bar().set_font_color_override_all(2, Color.YELLOW) |
|
While I somewhat like the new API, for the purpose of coloring bottom panel you only need Also, since the user will not have access to the tabs directly, it does not even need to be exposed. If you want to set color of a dock's tab, it can be exposed as a property of EditorDock. Docks aside, the proposal you linked does not mention tab colors, only italics text. |
|
I can hide these so they are just for internal use for now. I can't gauge community interest in this specific feature, its creation was motivated by compatibility for the bottom panel. |
fbb9801 to
59a4e4c
Compare
|
Could you confirm that the static function has the right qualifiers? Copied below: |
59a4e4c to
6e6fd0e
Compare
6e6fd0e to
8bcbc2f
Compare
|
Needs another rebase |
8bcbc2f to
914a72f
Compare
|
Thanks! |
Partially Addresses: godotengine/godot-proposals#9161
Related: #88709, #106164
The inspiration for this PR was #106164 and the desire to set a custom color for the
OutputandDebuggertabs now that they are within a TabBar, but there is a desire to do such, as evidenced by the previous proposal.Currently it is impossible to set colors individually for tabs in a TabBar. This PR adds support to set custom overrides for the selected, unselected, hovered, and disabled colors on a per tab basis.