Skip to content

Conversation

jp2masa
Copy link
Contributor

@jp2masa jp2masa commented Jul 16, 2020

Changes

  • Updated Avalonia to 0.10.0-preview1:
    • Updated default text color and font size:
      • Text color is now based on fluent theme resources (won't work for default theme, which I think will be deprecated soon anyway).
      • Font size is now constant 14.0f (this value comes from fluent theme resources, there is also a bug which blocks using the resource: it is double, but font size is float, probably a bug in Avalonia).
    • Updated Avalonia sample:
      • Also removed SideBar.xaml: the default styles for TabControl is good in fluent theme, also the side bar styles don't look good in fluent.

@Happypig375
Copy link
Collaborator

Font size is now constant 14.0f (this value comes from fluent theme resources, there is also a bug which blocks using the resource: it is double, but font size is float, probably a bug in Avalonia).

As noted in #121 (comment), this is also a problem for Platform Uno. The solution would be to change all float properties to double, but that change will be done in #121.

Also this value (14) would be great as the default across all platforms. The current default, 50, is definitely too large. I'll add a commit that implements this change.

@Happypig375 Happypig375 requested a review from FoggyFinder July 17, 2020 10:34
@FoggyFinder
Copy link
Collaborator

I got System.InvalidOperationException: "The control already has a visual parent." while switching between themes.
Let's check whether it is an Avalonia bug or something on our side before merge

@Happypig375
Copy link
Collaborator

I think this is AvaloniaUI/Avalonia#4265.

@FoggyFinder
Copy link
Collaborator

To avoid crash I think it would be better to replace ComboBox here with ToggleSwitch or something like that

@Happypig375 Happypig375 added the Type/Housekeeping This includes internal only changes. label Jul 17, 2020
@FoggyFinder
Copy link
Collaborator

I tried to use ToggleSwitch but all my attempts are failed. Despite themes are replaced the toggle itself was remain on the same position. Unclear why.

Two RadioButton seems safest option :-)

I can do it in the evening if better solution won't be found.

@Happypig375
Copy link
Collaborator

Can the RadioButton text be vertically centered relative to the circles?
image

@Happypig375 Happypig375 merged commit d835e93 into verybadcat:master Jul 19, 2020
@Happypig375 Happypig375 added Resolution/Implemented The described enhancement or housekeeping work has been implemented. Status/5. Awaiting next release This issue has been resolved and is waiting for the next release/prerelease. labels Jul 19, 2020
@jp2masa jp2masa deleted the update-avalonia branch July 19, 2020 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution/Implemented The described enhancement or housekeeping work has been implemented. Status/5. Awaiting next release This issue has been resolved and is waiting for the next release/prerelease. Type/Housekeeping This includes internal only changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants