Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout of popups broken #2687

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

Layout of popups broken #2687

squiddy opened this issue May 18, 2017 · 8 comments

Comments

@squiddy
Copy link
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
Copy link
Member

I will take an look on it.

@LinuxDonald LinuxDonald removed their assignment May 22, 2017
@LinuxDonald
Copy link
Member

I dont know ho to set the messange higher.

@squiddy squiddy self-assigned this May 22, 2017
@squiddy
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member Author

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
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
Copy link
Member Author

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
Copy link
Member Author

squiddy commented May 22, 2017

After fixing the message label size:

2017-05-22-081100_1324x843_scrot

@LinuxDonald
Copy link
Member

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
Projects
None yet
Development

No branches or pull requests

2 participants