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

Icons are suddenly smaller #691

Closed
wfjsw opened this issue Jul 1, 2023 · 1 comment
Closed

Icons are suddenly smaller #691

wfjsw opened this issue Jul 1, 2023 · 1 comment
Labels
bug Something isn't working locked-due-to-inactivity

Comments

@wfjsw
Copy link

wfjsw commented Jul 1, 2023

Describe the bug

image

Left: new; Right: old

To Reproduce

...
            <ui:NavigationView.MenuItems>
                <ui:NavigationViewItem Content="一键启动"
                    TargetPageType="{x:Type views:LaunchNow}">
                    <ui:NavigationViewItem.Icon>
                        <ui:SymbolIcon Symbol="Play24" />
                    </ui:NavigationViewItem.Icon>
                </ui:NavigationViewItem>
...

Expected behavior

Make the TextElement.FontSize="24" on the IconContentPresenter actually work.

Screenshots

No response

OS version

Microsoft Windows 10.0.22621.1848

.NET version

.NET 6.0.11

WPF-UI NuGet version

e198dcb

Additional context

No response

@wfjsw wfjsw added the bug Something isn't working label Jul 1, 2023
@wfjsw
Copy link
Author

wfjsw commented Jul 2, 2023

d38aa5b#diff-cfe817f6e6c6200d5125fc20b5a11e886de2a76af01a4ac701efeb4c70d09f46

        if (VisualParent is not null)
        {
            FontSize = TextElement.GetFontSize(VisualParent);
        }

Adding this back fixed this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working locked-due-to-inactivity
Projects
None yet
Development

No branches or pull requests

2 participants