From 52e83433b976d403c05915aefd6994c773a84470 Mon Sep 17 00:00:00 2001 From: corvid Date: Tue, 3 Feb 2015 01:06:26 +0000 Subject: for input placeholder, set position to beginning in case it's too long to show all at once --- dw/fltkui.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dw/fltkui.cc b/dw/fltkui.cc index 846ef87a..51523b95 100644 --- a/dw/fltkui.cc +++ b/dw/fltkui.cc @@ -95,10 +95,14 @@ int CustInput2::show_normal(const char *str) */ int CustInput2::show_placeholder() { + int ret; + showing_placeholder = true; Fl_Input::textcolor(fltkui_dimmed(usual_color, color())); Fl_Input::input_type(FL_NORMAL_INPUT); - return Fl_Input::value(placeholder); + ret = Fl_Input::value(placeholder); + position(0); + return ret; } /* -- cgit v1.2.3