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

bug when using custom "imageName" and only title #91

Closed
MultX opened this issue Dec 8, 2013 · 5 comments
Closed

bug when using custom "imageName" and only title #91

MultX opened this issue Dec 8, 2013 · 5 comments

Comments

@MultX
Copy link

MultX commented Dec 8, 2013

I used custom design.json file, where I defined my own image for alerts. When I show notification with title only, I have strange appearance of it - icon appears at bottom of view, doesn't at center. What did i do wrong?
P.S. If I don't specify imageName, all works fine.
1

@KrauseFx
Copy link
Owner

KrauseFx commented Dec 8, 2013

That looks odd, seems to be related to this issue: #88
Does this work for the default TSMessage style as well? It just seems like there is no padding calculated for the icon.

@MultX
Copy link
Author

MultX commented Dec 8, 2013

When i use default TSMessage style, it looks fine.

@MultX
Copy link
Author

MultX commented Dec 8, 2013

TSMessageView.m

    // Check if that makes the popup larger (height)
    if ( self.iconImageView.frame.origin.y + self.iconImageView.frame.size.height + TSMessageViewPadding > currentHeight)
    {
        currentHeight = self.iconImageView.frame.origin.y + self.iconImageView.frame.size.height;
    }
    else
    {
        // z-align
        self.iconImageView.center = CGPointMake([self.iconImageView center].x,
                                                round(currentHeight / 2.0));
    }

I think problem in condition, because I saw code above and decided, that my problem can solved if I'll add to font size in my json file. And here it is - on some font size vertical align became correct. You have lucky that your default style has "correct" parameters. You can reduce font size in your style and problem appears, I checked it.
I hope it helps to you.

@KrauseFx
Copy link
Owner

Does this problem still exist?

@KrauseFx
Copy link
Owner

KrauseFx commented Nov 3, 2014

Closed because of no activity. Let me know if you have this problem again.

@KrauseFx KrauseFx closed this as completed Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants