[Github-comments] Re: [geany/geany] Wrapping Compiler and Messages lines (Issue #3834)

2024-04-13 Thread elextr via Github-comments
I had a short time to try things.

Based on your status window code, set `wrap-mode` and `wrap-width` (which is 
pixels not characters).

Testing with status window on the right so the width can be changed with the 
pane separator sees wrapping happen fine at the set `wrap-width` or the window 
width if it is _greater_ than `wrap-width`.  So `wrap-width` sets the _minimum_ 
wrap width in pixels, if less space is available it simply hides part of the 
column like normal.  

But row heights are not recalculated, it is calculated when data is first added 
to the row and left at the height needed for `wrap-width` since this is big 
enough to contain the worst case.  That is why various examples on the web show 
massive blank space when `wrap-width` was set small (like 50 in one example) 
and so the row height was calculated based on that value but he text wrapped 
based on the actual widget width.

Your attempt to use the callback to reset `wrap-width` seemed a good idea, but 
for me it is never called with signal `check-resize` (printf debugging :-).  
Maybe another signal could work better?

Alternatively given the uses it should be enough if we can calculate the right 
value for `wrap-width` based on the layout and just leave it since none of the 
message windows change their existing contents and new lines added (eg in 
status) get their height based on the `wrap-width`.  This won't change the 
height if the window is resized after it has content, but that won't matter so 
much for compiler and messages which are reset regularly, so long as the new 
`wrap-width` is used when the new data is added.  With this model status 
probably should be left unwrapped and of course its irrelevant to scribble and 
terminal.

I have run out of time now, over to you.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3834#issuecomment-2053881145
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Wrapping Compiler and Messages lines (Issue #3834)

2024-04-13 Thread Nick Treleaven via Github-comments
@elextr No, it's in the WIP commit.

>   g_object_set(cell_renderers[type], "wrap-mode", PANGO_WRAP_WORD,
"wrap-width", set ? 30 : -1, NULL);

The python tree view callback didn't work.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3834#issuecomment-2053653971
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Wrapping Compiler and Messages lines (Issue #3834)

2024-04-13 Thread elextr via Github-comments
According to the GTK wrap-mode link in your OP the `wrap-width` property also 
needs to be set as well, its not in your WIP commit so unless its already set 
somewhere else in Geany it needs to be added.

Note the Python code sets `wrap-width`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3834#issuecomment-2053623074
You are receiving this because you are subscribed to this thread.

Message ID: 

[Github-comments] Re: [geany/geany] Wrapping Compiler and Messages lines (Issue #3834)

2024-04-13 Thread Nick Treleaven via Github-comments
Apparently it is possible to do - python code, not tested:
https://github.com/kennydude/reference-cat/commit/af79b567f6a63cf9416c14812b82063723d96271#diff-c333d6b766d6183dd76878d3003eb61b4f7c35b13a796c33ba05ab400e2ecbaa

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3834#issuecomment-2053618843
You are receiving this because you are subscribed to this thread.

Message ID: