Skip to content

WineFix: fill the empty Leading dropdown in the text context toolbar (Affinity 3.3) - #65

Open
jfacemyer wants to merge 1 commit into
noahc3:devfrom
jfacemyer:winefix-leading-dropdown
Open

jfacemyer wants to merge 1 commit into
noahc3:devfrom
jfacemyer:winefix-leading-dropdown

Conversation

@jfacemyer

Copy link
Copy Markdown

Affinity 3.3 opens the text context toolbar's Leading dropdown with nothing in it, and this fixes it.

Affinity 3.3 merged ReflectedLayoutItemTemplates.xaml into ContextBarItemTemplates.xaml. The merged dictionary's implicit CheckedComboBoxItem style has an empty ControlTemplate, and it is searched before Core.xaml. So LeadingComboItemStyle and CheckedComboBoxItemStyle, which are BasedOn the implicit style, inherit an empty template, and the list opens with zero height.

Replacing the dictionary entries doesn't help, because the context bar's DataTemplates keep the style objects they were bound to. Instead, when a CheckedComboBox applies its template, an ItemContainerStyle whose inherited template is empty is swapped for a copy BasedOn Core.xaml's style. Styles with a real template are untouched. The patch does nothing once Affinity's XAML is fixed, and Affinity 3.2.3 doesn't have the merge.

It is a new setting, "Context toolbar: Fix empty Leading dropdown", on by default. It's one commit on dev, independent of #61, #62 and the color picker PR.

Tested with Affinity 3.3 on Wine 11.19.

Affinity 3.3 merged ReflectedLayoutItemTemplates.xaml into
ContextBarItemTemplates.xaml. Its implicit CheckedComboBoxItem style has an
empty ControlTemplate, and the merged dictionary is searched before the
application's Core.xaml, so LeadingComboItemStyle and
CheckedComboBoxItemStyle (BasedOn the implicit style, no template of their
own) inherit nothing. The Leading dropdown opens with zero height.

Replacing the dictionary entries is not enough, because the context bar's
DataTemplates keep the style objects their StaticResource references were
bound to. Instead, when a CheckedComboBox applies its template, swap an
ItemContainerStyle whose inherited template is empty for a copy BasedOn
Core.xaml's style. Styles with a real template are untouched, and the patch
does nothing once the XAML is fixed. Affinity 3.2.3 does not have the merge.

This branch has not been deployed

No deployments
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.

1 participant