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

Blurred Font in Popup Menu #2786

Closed
avkonst opened this issue Aug 9, 2018 · 2 comments
Closed

Blurred Font in Popup Menu #2786

avkonst opened this issue Aug 9, 2018 · 2 comments

Comments

@avkonst
Copy link

avkonst commented Aug 9, 2018

Environment

  • Package version(s): 3.0.1
  • Browser and OS versions: Chrome, Windows 10

Question

I have noticed inconsistent rendering for Popup Menu font. See perfect sharp font rendering for the 'River Estuary' words and see the blurred font for the menu item. How can I fix it? What is causing it?

image

@avkonst
Copy link
Author

avkonst commented Aug 9, 2018

You can check the rendered version here online: https://wildwind.world/explore

The code I use for the menu bar is very simple:

<Navbar.Group align={Alignment.RIGHT}>
                    <Popover
                        content={
                            <LocalStateContext.Consumer>{localstate =>
                                <Observer>{() =>
                                    <UserMenu
                                        user={localstate.user}
                                        onLoginClick={() => props.history.push('/login')}
                                        onLogoutClick={() => props.history.push('/logout')}
                                    />
                                }</Observer>
                            }</LocalStateContext.Consumer>
                        }
                        position={Position.BOTTOM_RIGHT}
                    >
                        <Button minimal={true} icon={IconNames.USER} />
                    </Popover>
                </Navbar.Group>

where UserMenu is the following:

interface UserMenuProps {
    user?: UserState;
    onLoginClick: () => void;
    onLogoutClick: () => void;
}

const UserMenu = (props: UserMenuProps) => {
    const items: { text: string, onClick: () => void, icon?: IconName }[] = [];
    if (!props.user) {
        items.push({ icon: IconNames.LOG_IN, text: 'Sign in / Register', onClick: props.onLoginClick });
    } else {
        items.push({ icon: IconNames.LOG_OUT, text: 'Sign out', onClick: props.onLogoutClick });
    }
    return (
    <Menu>
        {items.map(i => <MenuItem key={i.text} icon={i.icon} text={i.text} onClick={i.onClick} />)}
    </Menu>);
};

@giladgray
Copy link
Contributor

duplicate of #394. see discussion there.

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