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 | 52e83433b976d403c05915aefd6994c773a84470 (patch) | |
tree | d177e0d4fb3eab287b412a3faa727e9dea582435 /dw/fltkui.cc | |
parent | 74a4875a72db4bbfd09432de7ed46445eccadb1a (diff) |
for input placeholder, set position to beginning in case it's too long to show all at once
Diffstat (limited to 'dw/fltkui.cc')
-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 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; } /* |