diff options
author | corvid <devnull@localhost> | 2015-02-03 01:06:26 +0000 |
---|---|---|
committer | corvid <devnull@localhost> | 2015-02-03 01:06:26 +0000 |
commit | bb03e5569866c033371060de55c17309f3caf3f2 (patch) | |
tree | 00b93c1f452657ce7282af98dd7a5bc3f4b7129f /dw | |
parent | 848cfc9b134897d52aaf1243f9f4217d3255e4d8 (diff) |
for input placeholder, set position to beginning in case it's too long to show all at once
Diffstat (limited to 'dw')
-rw-r--r-- | dw/fltkui.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dw/fltkui.cc b/dw/fltkui.cc index 7b94e11d..e22e4619 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; } /* |