Skip to content

Commit 65ba6bf

Browse files
committed
UI: revert input colours
1 parent 99548b9 commit 65ba6bf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/ui/system.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,14 @@ char *System::getText(char *dest, int maxSize) {
192192

193193
FormInput *widget = new FormLineInput(NULL, maxSize, true, x, y, w, h);
194194
widget->setFocus(true);
195-
widget->setColor(FOCUS_COLOR, DEFAULT_FOREGROUND);
195+
196+
int bg = _output->getBackgroundColor();
197+
int fg = _output->getColor();
198+
if (bg != DEFAULT_BACKGROUND || fg != DEFAULT_FOREGROUND) {
199+
widget->setColor(bg, fg);
200+
} else {
201+
widget->setColor(FOCUS_COLOR, DEFAULT_FOREGROUND);
202+
}
196203
_output->addInput(widget);
197204
_output->redraw();
198205
_state = kModalState;

0 commit comments

Comments
 (0)