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

wpf: PopupViewer bugfixes wave 2 #518

Merged
merged 5 commits into from
Jul 11, 2023
Merged

Conversation

mstefarov
Copy link
Collaborator

@mstefarov mstefarov commented Jun 26, 2023

I found and fixed a few bugs in WPF PopupViewer during the past 3 months, but didn't get a chance to do a write-up and submit them yet. Here is batch 2 of 3.

Font size fixes

FlowDocument's default font size is smaller than intended (12 instead of 14). This means we defaulted to "small" instead of "medium", which threw all relative sizing off. Also, an extra space prevented "large" font size from parsing properly. Example from the Living Atlas:

Before
Before
After
After
Reference
Reference (AGOL)

Implement colspan and rowspan for tables

WPF tables already support rowspan/colspan, so this was a trivial TODO to implement. Example from the Living Atlas

Before
Before
After
After
Reference
Reference (AGOL)

Apply alignment to TableCells and ListItems

Turns out TableCells and ListItems do not extend Block in WPF, but instead have their own copies of the TextAlignment property. This resulted in badly-aligned tables on a few maps, e.g. the on the infamous "road signs" one. This thing is like an Acid test for popup rendering. We can't match reference rendering yet, but we're getting closer! 🙂

2023-06-26_094911 Toolkit SampleApp WPF < Before
2023-06-24_223639 Toolkit SampleApp WPF < After
2023-06-24_223746 msedge < Reference (AGOL)

Apply style to links

There was a missing call to ApplyStyle when rendering links in WPF. This means links always had default styling and didn't pick up e.g. color / bold / italic attributes.

@mstefarov mstefarov requested a review from dotMorten June 26, 2023 18:33
@mstefarov mstefarov self-assigned this Jun 26, 2023
@mstefarov mstefarov force-pushed the matvei/popup-viewer-fixes-2 branch from bd77859 to bd3f310 Compare July 11, 2023 16:44
@mstefarov mstefarov merged commit f720225 into main Jul 11, 2023
@mstefarov mstefarov deleted the matvei/popup-viewer-fixes-2 branch July 11, 2023 22:24
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