summaryrefslogtreecommitdiff
path: root/src/ui/inputwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-08-01 20:37:00 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-08-01 20:37:00 +0300
commitcdc63088603169874b1e98aaf4196cc252a1eee9 (patch)
tree18bb186068653865f4fd91bcb385b33a384c8a1f /src/ui/inputwidget.c
parent395cb3a996482c9e9fc27e00b4259219f85ec663 (diff)
UploadWidget: Allow expanding to full window height
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r--src/ui/inputwidget.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c
index 2ca9bd55..6246078e 100644
--- a/src/ui/inputwidget.c
+++ b/src/ui/inputwidget.c
@@ -709,10 +709,19 @@ void setMaxLen_InputWidget(iInputWidget *d, size_t maxLen) {
709} 709}
710 710
711void setLineLimits_InputWidget(iInputWidget *d, int minLines, int maxLines) { 711void setLineLimits_InputWidget(iInputWidget *d, int minLines, int maxLines) {
712 d->minWrapLines = minLines; 712 if (d->minWrapLines != minLines || d->maxWrapLines != maxLines) {
713 d->maxWrapLines = maxLines; 713 d->minWrapLines = minLines;
714 updateVisible_InputWidget_(d); 714 d->maxWrapLines = maxLines;
715 updateMetrics_InputWidget_(d); 715 updateVisible_InputWidget_(d);
716 updateMetrics_InputWidget_(d);
717 }
718}
719
720int minLines_InputWidget(const iInputWidget *d) {
721 return d->minWrapLines;
722}
723int maxLines_InputWidget(const iInputWidget *d) {
724 return d->maxWrapLines;
716} 725}
717 726
718void setValidator_InputWidget(iInputWidget *d, iInputWidgetValidatorFunc validator, void *context) { 727void setValidator_InputWidget(iInputWidget *d, iInputWidgetValidatorFunc validator, void *context) {