THEN a few hours later I see that it triggered her and I feel really bad... .I don't want her to hurt but I know it was important to set the boundary for ME.
YES^^^
You accomplished both of those objectives, primarily because you thought through your response and asked for some advice. You are moving in a good, healing direction.
It took me many months post b/u (breakup) to realize that, for the entirely of my relationship with my ex, I felt responsible for her emotional well being. This is partly due to her waif-ish behavior, but it is also due to my own FOO (family of origin) issues. I spent most of my childhood trying to soothe the emotions of my often raging mother - with the primary goal of keeping out of harms way (e.g. getting hit). It didn't work, but I spent a lot of time and energy trying to make her happy.
Interestingly, my ex was nothing like my mother - no rages, etc. But I also spent a lot of time and energy trying to soothe
her emotions and make her happy. There's something about that "effort" that felt familiar and comfortable to me. I wasn't horrified by this realization (other than the fact that it kept me in a damaging r/s for far too long), but now that I'm aware of this tendency I need to guard against it in future relationships. It's not a healthy behavior for me to engage in.
In the end, no one can make anyone else happy; we're all responsible for managing ourselves and our emotions. That includes your ex and mine.