I`ve got a GtkLabel
whose text is to remain centered regardless of whether it is shorter or longer than the label.
For example, a Win32 static control that has the SS_CENTER
style flag set behaves like that:
┌===========================┐ │ Lorem ipsum dolor │ └===========================┘
— when the text is shorter than the control;
┌===========================┐ Lorem ipsum│dolor sit amet, consectetur│adipiscing └===========================┘
— when the text is longer than the control.
N.B.: The only part of the text seen by the user is inside the frame.
I expected GtkLabel
-s to do the same thing, but actually they render centered text differently:
┌===========================┐ │ Lorem ipsum dolor │ └===========================┘
— when the text is shorter than the control;
┌===========================┐ │Lorem ipsum dolor sit amet,│consectetur adipiscing └===========================┘
— when the text is longer than the control.
How do I make centered text in a GtkLabel
remain centered even when it is long?
Just in case: the actual text the user sees is updated at ~4 FPS and is unknown prior to runtime.