Skip to content

Commit

Permalink
gui2/ttext_box: Use standard GUI__BACKGROUND_COLOR_* background colors
Browse files Browse the repository at this point in the history
Note that this widget lacked a background before, making it look like
a simple label with a border and caret. In my opinion, the subtle
background is an improvement that highlights the widget's "dynamicness",
and makes it more obvious when it is disabled.
  • Loading branch information
irydacea committed Feb 16, 2014
1 parent ecf62cd commit ebc214f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions data/gui/default/widget/text_box_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
### Definition of a single line text box.
###

#define _GUI_DRAW_BACKGROUND COLOR
[rectangle]
x = 0
y = 0
w = "(width)"
h = "(height)"

fill_color = {COLOR}

[/rectangle]
#enddef

#define _GUI_DRAW_BORDER COLOR
[rectangle]
x = 0
Expand Down Expand Up @@ -85,6 +97,8 @@

[draw]

{_GUI_DRAW_BACKGROUND ({GUI__BACKGROUND_COLOR_ENABLED})}

{_GUI_DRAW_BORDER ({GUI__FONT_COLOR_ENABLED__TITLE}) }

{_GUI_DRAW_TEXT ({FONT_SIZE}) ({GUI__FONT_COLOR_ENABLED__DEFAULT}) }
Expand All @@ -97,6 +111,8 @@

[draw]

{_GUI_DRAW_BACKGROUND ({GUI__BACKGROUND_COLOR_DISABLED})}

{_GUI_DRAW_BORDER ({GUI__FONT_COLOR_DISABLED__TITLE}) }

{_GUI_DRAW_TEXT ({FONT_SIZE}) ({GUI__FONT_COLOR_DISABLED__DEFAULT}) }
Expand All @@ -109,6 +125,8 @@

[draw]

{_GUI_DRAW_BACKGROUND ({GUI__BACKGROUND_COLOR_ENABLED})}

{_GUI_DRAW_BORDER ({GUI__FONT_COLOR_ENABLED__TITLE}) }

{_GUI_DRAW_TEXT ({FONT_SIZE}) ({GUI__FONT_COLOR_ENABLED__DEFAULT}) }
Expand Down Expand Up @@ -137,3 +155,4 @@
#undef _GUI_DRAW_CURSOR
#undef _GUI_DRAW_TEXT
#undef _GUI_DRAW_BORDER
#undef _GUI_DRAW_BACKGROUND

0 comments on commit ebc214f

Please sign in to comment.