Cannot center align text

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Cannot center align text

Postby Ident » Fri Jan 06, 2017 15:55

I think horizontally aligned titlebars are more typical. However, left/right aligned can make sense too.

The WindowsLook definitely had the goal of having the titles left-aligned, which goes along with how Windows windows by default do it. This is intentional and I would expect it to be this way. GlossySerpent also has it left-aligned and I would say this looks normal and expected.

Generally, I would agree that it is fine if this is hardcoded inside each Look N' Feel and no Property is provided. The alignment should be part of a consistent look carried through all FrameWindows of a single style and not something regularly altered from FrameWindow to FrameWindow inside an application - at least under normal circumstances.

I would say we have two options here:
1) Hardcode the alignment: This means effectively removing the VertFormatting and HorzFormatting property definitions from all TitleBars and retaining their defaults by using the default one directly in the TextComponent. Seems to be what you want?
2) Make the alignment properties native: Add them to the FalagardTitlebar class and therefore make them present everywhere - even if not used. PropertyDefinitions would become simple Properties then. This is more efficient and guarantees that the property is always there (seems to feed better into user expections, as it goes along with what Blackroot, the beautiful people, thought it would be like)

Disadvantage of the hardcoding option is that later-on people might start asking us how to set the alignment dynamically, since we cut a feature that has existed in previous versions for a long time. Let's ask CrazyEddie?
CrazyEddie: "I don't like GUIs"

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Cannot center align text

Postby Ident » Sun Jan 15, 2017 19:36

After the internal dev team e-mail conversation we had, I believe we should leave things as they are currently (no property in LNF and no property in the FalagardTitlebar is present for the text formatting). The designer needs to set the formatting in the look and feel file. We should however document how a property can be added, basically exactly as blackroot showed us in their snippet.
CrazyEddie: "I don't like GUIs"

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: Cannot center align text

Postby YaronCT » Mon Jan 16, 2017 08:56

Sorry for the late response, family matters.

I agree that the alignment should b generally fixed in the look`n`feel. However I was also proposing to remove the property from look`n`feel files that currently do define it (only in branch "default"). What do u guys think of that?

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Cannot center align text

Postby Ident » Mon Jan 16, 2017 22:40

YaronCT wrote:Sorry for the late response, family matters.

No worries, although I actually did get a little worried the past days.

I agree that the alignment should b generally fixed in the look`n`feel. However I was also proposing to remove the property from look`n`feel files that currently do define it (only in branch "default"). What do u guys think of that?


Sure. I found the following two:
"SampleBrowserSkin/Titlebar"
"OgreTray/Titlebar"

Did I miss any?
CrazyEddie: "I don't like GUIs"

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Cannot center align text

Postby Ident » Mon Jan 16, 2017 23:08

Btw, feel free to remove the properties as discussed, Paul (CrazyEddie) basically agreed to it already.
CrazyEddie: "I don't like GUIs"

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: Cannot center align text

Postby YaronCT » Mon Jan 16, 2017 23:38

Ok, I'll remove them then.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 30 guests