Layout of popups broken #2687

Open
squiddy opened this Issue May 18, 2017 · 8 comments

Comments

Projects
None yet
2 participants
@squiddy
Member

squiddy commented May 18, 2017

I've had at least two instances of Popup that looked like this. The title should be moved down, the message up.

2017-05-18-191400_1062x801_scrot

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald May 18, 2017

Member

I will take an look on it.

Member

LinuxDonald commented May 18, 2017

I will take an look on it.

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald May 22, 2017

Member

I dont know ho to set the messange higher.

Member

LinuxDonald commented May 22, 2017

I dont know ho to set the messange higher.

@squiddy squiddy self-assigned this May 22, 2017

@squiddy

This comment has been minimized.

Show comment
Hide comment
@squiddy

squiddy May 22, 2017

Member

Pretty sure this is caused by the label displaying the message. Look what happens when I display many lines:

2017-05-22-070304_839x625_scrot

Ignore for now that the <hr> is missing, still experimenting.

Member

squiddy commented May 22, 2017

Pretty sure this is caused by the label displaying the message. Look what happens when I display many lines:

2017-05-22-070304_839x625_scrot

Ignore for now that the <hr> is missing, still experimenting.

@squiddy

This comment has been minimized.

Show comment
Hide comment
@squiddy

squiddy May 22, 2017

Member

The issue is that vertical text alignment is hardcoded to be centered here: https://github.com/fifengine/fifechan/blob/master/src/widgets/label.cpp#L134

int textY = offsetRec.y + getPaddingTop() + (getHeight() - offsetRec.height - getPaddingTop() - getPaddingBottom() - getFont()->getHeight()) / 2;
Member

squiddy commented May 22, 2017

The issue is that vertical text alignment is hardcoded to be centered here: https://github.com/fifengine/fifechan/blob/master/src/widgets/label.cpp#L134

int textY = offsetRec.y + getPaddingTop() + (getHeight() - offsetRec.height - getPaddingTop() - getPaddingBottom() - getFont()->getHeight()) / 2;
@squiddy

This comment has been minimized.

Show comment
Hide comment
@squiddy

squiddy May 22, 2017

Member

See this issue to get the required functionality: fifengine/fifechan#52

Member

squiddy commented May 22, 2017

See this issue to get the required functionality: fifengine/fifechan#52

squiddy added a commit that referenced this issue May 22, 2017

Fix message size in popup widgets
Just add background_color to a widget to see how big it really is, there
labels were way too high and wide, which is why the text alignment
looked especially off.

Refs: #2687
@squiddy

This comment has been minimized.

Show comment
Hide comment
@squiddy

squiddy May 22, 2017

Member

@LinuxDonald I fixed the size of the message labels, so the text centering is now at least consistent and doesn't look off. I'm gonna mark this issue as nice-to-have.

Member

squiddy commented May 22, 2017

@LinuxDonald I fixed the size of the message labels, so the text centering is now at least consistent and doesn't look off. I'm gonna mark this issue as nice-to-have.

@squiddy squiddy added B-enhancement and removed B-bug labels May 22, 2017

@squiddy

This comment has been minimized.

Show comment
Hide comment
@squiddy

squiddy May 22, 2017

Member

After fixing the message label size:

2017-05-22-081100_1324x843_scrot

Member

squiddy commented May 22, 2017

After fixing the message label size:

2017-05-22-081100_1324x843_scrot

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald May 22, 2017

Member

Nice fix for now :-) now we will wait what with the fifechan ticket will happen.

Member

LinuxDonald commented May 22, 2017

Nice fix for now :-) now we will wait what with the fifechan ticket will happen.

@squiddy squiddy removed their assignment Jun 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment