GTK TextView with with different indentation on line wrap

Hello,
For context, I’m building an application that has a TextView where the user can create bulleted lists. If the user types a sentence that ends up wrapping I want the wrapped text to be in line with the start of the sentence, not the bullet. The bulleted list is marked by a TextTag. I have tried just about every property in both TextView and TextTag but none of them have given me the desired results. Also if it’s any help this is a Rust program with GTK4.

Below is a screenshot of the current way it works and how I would like it to work. The top section is how it is working currently where the wrapped line puts the next word as left most as possible. For the bottom one, I manually typed a new line and a few spaces.
Screenshot from 2023-02-12 15-39-02

Currently, every item in the bulleted list is wrapped in the same TextTag, I’m wondering if it would be important to wrap the whole thing in a bulleted list tag and then have another tag for individual bullet items that don’t include the hyphen?

Hopefully, somebody here can make sense of what I am and point me in the right direction.

Hanging indentation may be what you want here: set indent to a negative value

Holy cannoli it worked! Thank you!
The documentation for the TextView and TextTag indent property doesn’t mention that a negative value is possible. Of course the Pango documentation does so maybe I just didn’t look close enough! Anyway, thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.