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

Increase top margin for iPhone X #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

iancanderson
Copy link
Owner

The To/From direction tabs looked scrunched up against the notch on the iPhone X. This uses a hacky way to check if the current running device is an iPhone X (based on screen dimensions), and adds 20 points of additional margin if so.

Before:

screen shot 2017-11-03 at 1 37 34 pm

After:

screen shot 2017-11-03 at 1 38 09 pm

@@ -9,7 +9,7 @@ import App.Font as Font
import Message exposing (..)
import ScrollableTabView exposing (..)
import Model exposing (Model)

import Hacks.IPhoneX exposing(isIPhoneX)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol, that namespace 😆

matchesIPhoneXDimensions : Bool
matchesIPhoneXDimensions =
let
iPhoneXHeight = 812
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth extracting to its own constant function?

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

Successfully merging this pull request may close these issues.

2 participants