Hello,

this patch allows to resize the desktop textarea anytime, not just at creation time.

Comment: added global textarea_set_dimensions function

Reject or commit. Thanks.

Greet,
m
Index: textarea.c
===================================================================
--- textarea.c  (Revision 13149)
+++ textarea.c  (Arbeitskopie)
@@ -1444,3 +1444,17 @@
        if (height != NULL)
                *height = ta->vis_height;
 }
+
+/**
+ * Sets the dimensions of a textarea
+ *
+ * \param width        the new width of the textarea
+ * \param height       the new height of the textarea
+ */
+void textarea_set_dimensions(struct text_area *ta, int width, int height)
+{
+       ta->vis_width = width;
+       ta->vis_height = height;
+       textarea_reflow( ta, 0 );
+       ta->redraw_request(ta->data, 0, 0, ta->vis_width, ta->vis_height);
+}
Index: textarea.h
===================================================================
--- textarea.h  (Revision 13149)
+++ textarea.h  (Arbeitskopie)
@@ -54,6 +54,6 @@
 bool textarea_drag_end(struct text_area *ta, browser_mouse_state mouse,
                int x, int y);
 void textarea_get_dimensions(struct text_area *ta, int *width, int *height);
-
+void textarea_set_dimensions(struct text_area *ta, int width, int height);
 #endif
 

Reply via email to