Another issue about the text boxes:

If we use some gtk-feature to do the wrapping of the text for us, then 
there's the danger that when one rescale things, due to some roundings 
happening differently suddendly the wrapping changes. Similarly, 
wrapping could change when exporting to pdf... or maybe even when 
opening the document on a different computer?

As a solution to this, I'd propose that in the moment the user finishes 
editing, the wrapping points are saved, and as long as the user doesn't 
re-edit the text, it is drawn with those wrapping points. In particular, 
we only need the edit-text widget to handle wrapping, whereas for 
showing text while it's not edited, I would just use the same widget as 
before, with "\n"s temporarily inserted at the wrapping points.

Best,
    Immi


Am 04.09.2016 um 22:57 schrieb Denis Auroux:
> On 09/04/2016 04:48 PM, D M German wrote:
>> 3. gnome-canvas-rich-text does support wrapping, but it is "poor". it
>> does not support some features, including the most important, fonts. See 
>> below.
>>
>> (xournal:2363): GLib-GObject-WARNING **: g_object_set_valist: object class 
>> 'GnomeCanvasRichText' has no property named 'font-desc'
>>
>> (xournal:2363): GLib-GObject-WARNING **: g_object_get_valist: object class 
>> 'GnomeCanvasRichText' has no property named 'text_width'
>>
>> (xournal:2363): GLib-GObject-WARNING **: g_object_get_valist: object class 
>> 'GnomeCanvasRichText' has no property named 'text_width'
>>
>> (xournal:2363): GnomeCanvas-WARNING **: rich text item not implemented for 
>> anti-aliased canvas
>
> Hah. The last warning is the important one: we have an anti-aliased
> canvas, and GnomeCanvasRichText is just NOT IMPLEMENTED. Hahaha.  Okay,
> that's why I didn't use it :)  We could use a GnomeCanvasWidget
> containing a GtkTextView (non-editable most of the time) but then we
> have to deal with sizing ourselves (and no fractional pixels allowed,
> same rounding issues as currently when a text box is being edited).
>
>
> (The properties about text width etc. I believe would be set not in the
> GnomeCanvasRichText but in the underlying Gtk text widget that it
> interfaces with. (?) Not sure.).
>
> Best,
> Denis
>

------------------------------------------------------------------------------
_______________________________________________
Xournal-devel mailing list
Xournal-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xournal-devel

Reply via email to