These are chat archives for AvaloniaUI/Avalonia

18th
Jan 2019
Matthew Leibowitz
@mattleibow_twitter
Jan 18 01:01 UTC
Feel free to improve as necessary
Technically, the harfbuzz bindings are still in preview, so we can change the way things work. If you need specific things, let me know and we can get the binding right
I currently can't focus much time on our side at the moment as there are other priorities - but this is till something that we want to do and maintain
As long as the code meets some basic guidelines and is useful, then I see no reason why PRs can't be merged
You can also use the PRs to run builds on our CI - I can whitelist you and then as you commit, builds will run
If you are wanting to work in stages or something, there is also no reason why I can't create a branch for harfbuzz changes, and we can merge into master when ready.
Matthew Leibowitz
@mattleibow_twitter
Jan 18 01:07 UTC
I started the bindings to help out the community - with a focus on cross-platform and usefulness. Avalonia is probably the first project that I am aware of that looks to be doing text extensively, so your help on this project will be very welcome
Benedikt Stebner
@Gillibald
Jan 18 04:46 UTC
I just want to make sure I get things right. Being able to use CI builds would help to get things tested by more people during development. Currently someone has to download by hand some patched files to be able to test this.
ahopper
@ahopper
Jan 18 07:55 UTC
something to lubricate the coding process https://untappd.com/b/fox-farm-brewery-avalonia/2686285 :)
Jeremy Koritzinsky
@jkoritzinsky
Jan 18 08:11 UTC
@ahopper that’s hilarious! I’ll see if I can find it anywhere!
Might have to find a reason to go to Connecticut though to get it
ahopper
@ahopper
Jan 18 08:11 UTC
have one for me
Benedikt Stebner
@Gillibald
Jan 18 11:20 UTC
@mattleibow_twitter I will continue adding missing parts to HarfBuzzSharp but I think I should remove the current PR and create a new one that includes everything. We don't have to merge this to master but it would be nice if we can find a way to have ci builds.
Benedikt Stebner
@Gillibald
Jan 18 11:26 UTC
On windows I have updated HarfBuzz to version 2.3 and will update the other build scripts also. Are there any build scripts for Linux(Ubuntu)?
The goal of the binding will be to cover most of the API.
Matthew Leibowitz
@mattleibow_twitter
Jan 18 11:54 UTC
I don't think there is anything special other that the steps in the cake/BuildExternals.cake and the files in native-builds
for linux there is a Makefile - which is executed from the cake script
it is very rough because linux is my weakest platform - if you can see improvements to that thing, go ahead and clean up my mess of a makefile :smile:
One thing I am contemplating is dropping the whole libHarfBuzzSharp.xx style and just going with harfbuzz.xx so that any precompiled binary would work\
this is to help those folks who have a custom build from either a package manager or some other process
but, that may make it hard to control ABI versions and other things.
Do you have thoughts? The safest is just to keep using libHarfBuzzSharp, but is there an advantage to using the default filenames?
Nikita Tsukanov
@kekekeks
Jan 18 12:03 UTC

that any precompiled binary would work

harfbuzz.xx so

Ubuntu 18.04 is shipping harfbuzz 1.7.2 as libharfbuzz.so.0.10702.0 symlinked as libharfbuzz.so.0

Benedikt Stebner
@Gillibald
Jan 18 12:03 UTC
I think we can safely change the naming. In terms of ABI there should be no changes in the past. Just new features get added from time to time. Updating the library to the most recent version will improve a lot. Just new shapers in general. And for the emoji fans proper color font handling. On windows I had no issues to get the version working. Just some files changed.
Nikita Tsukanov
@kekekeks
Jan 18 12:04 UTC
There is actually a major problem with native library naming
Mono used to solve it by dll.config files
.NET Core doesn't allow any name remapping that I know of
Doesn't seem to be implemented anywhere
Benedikt Stebner
@Gillibald
Jan 18 12:11 UTC
But wasn't the idea to change the name to a commonly used one and allow custom builds that way?
We don't need to resolve the dll at runtime
Steven Kirk
@grokys
Jan 18 12:30 UTC
@kekekeks just submitted AvaloniaUI/Avalonia#2250 based on your comments in #1979
Nikita Tsukanov
@kekekeks
Jan 18 13:27 UTC

We really need non-client window size in order to position owned windows correctly

Not available on X11

And we can't control non-popup window location on Wayland at all
Steven Kirk
@grokys
Jan 18 14:03 UTC
yeah that's what i suspected
Nikita Tsukanov
@kekekeks
Jan 18 14:10 UTC
There is _NET_REQUEST_FRAME_EXTENTS but it's not guaranteed to work
It's also async
It might be possible to somehow implement that, but it doesn't seem to be reliable
Steven Kirk
@grokys
Jan 18 16:49 UTC
we could just report non-client size == client size on platforms that don't support it (with a note in the docs). worse that will happen is centering windows won't take the titlebar into account on those platforms
ahopper
@ahopper
Jan 18 17:00 UTC
A lot has happened since the 7.0 release and the current builds are becoming very usable, bearing in mind the 8.0 goals have some big things in, is this a good time to release an intermediate nuget version?
Wiesław Šoltés
@wieslawsoltes
Jan 18 17:04 UTC
Steven Kirk
@grokys
Jan 18 17:06 UTC
just updating that wiki page with a breaking change i just merged
Wiesław Šoltés
@wieslawsoltes
Jan 18 17:08 UTC
I think good idea is to have breaking changes section in PR template or something to help tracking those changes
Steven Kirk
@grokys
Jan 18 17:08 UTC
yeah good idea
i keep meaning to update the PR template
Wiesław Šoltés
@wieslawsoltes
Jan 18 17:09 UTC
We can probably add Breaking changes label to PR :smile:
Jeremy Koritzinsky
@jkoritzinsky
Jan 18 17:10 UTC
We should also set up the release-drafter GitHub app. Would allow us to get some automatically written basic release notes.
Benedikt Stebner
@Gillibald
Jan 18 17:12 UTC
Text layout PR has also breaking changes.
Steven Kirk
@grokys
Jan 18 17:15 UTC
what does everyone think of this PR template? AvaloniaUI/Avalonia#2251
Wiesław Šoltés
@wieslawsoltes
Jan 18 17:16 UTC
:thumbsup:
Steven Kirk
@grokys
Jan 18 17:17 UTC
@ahopper yeah a 7.1 release might be a good idea
ahopper
@ahopper
Jan 18 17:18 UTC
:+1: and thanks for sorting #2067
the :+1: was for the template
Steven Kirk
@grokys
Jan 18 17:18 UTC
no problem!
any other PRs that people are waiting for review on?
Nikita Tsukanov
@kekekeks
Jan 18 17:19 UTC
Might as well release it as 0.8 and rename tags
Steven Kirk
@grokys
Jan 18 17:20 UTC
we could do that too
Wiesław Šoltés
@wieslawsoltes
Jan 18 17:20 UTC
Nikita Tsukanov
@kekekeks
Jan 18 17:20 UTC
I'd like to have 1.0 and pre-1.0 "milestones"
Wiesław Šoltés
@wieslawsoltes
Jan 18 17:20 UTC
and AvaloniaUI/Avalonia#2109 would be nice to get merged soon :smile:
Nikita Tsukanov
@kekekeks
Jan 18 17:21 UTC
@2185 is blocked by #2244
Steven Kirk
@grokys
Jan 18 17:21 UTC
@wieslawsoltes #2185 is still marked as WIP
Nikita Tsukanov
@kekekeks
Jan 18 17:21 UTC
And needs some rework
Steven Kirk
@grokys
Jan 18 17:21 UTC
yeah was thinking of moving onto #2109 next
Wiesław Šoltés
@wieslawsoltes
Jan 18 17:21 UTC
Steven Kirk
@grokys
Jan 18 17:22 UTC
well once #2109 gets merged i want to bring https://github.com/grokys/devtools into the main repo
Wiesław Šoltés
@wieslawsoltes
Jan 18 17:22 UTC
and maybe port your changes to devtools that use roslyn :fire:
Steven Kirk
@grokys
Jan 18 17:22 UTC
yeah, that's what i was holding off #2017
@jmacato i saw you're keeping #2109 up-to-date. are you still working on it?
Jeremy Koritzinsky
@jkoritzinsky
Jan 18 17:24 UTC
Template looks good.
ahopper
@ahopper
Jan 18 17:25 UTC
a release including #2109 and the updated vs tools would probably work well for newcomers
Steven Kirk
@grokys
Jan 18 17:25 UTC
yeah the VS extension previewer is currently broken for me
we need to get that fixed before we do a release
ahopper
@ahopper
Jan 18 17:27 UTC
the version I got from a link posted here works for me
Nikita Tsukanov
@kekekeks
Jan 18 17:27 UTC
Devtools depending on datagrid might be a bit too much
Steven Kirk
@grokys
Jan 18 17:28 UTC
hmm. i built mine from master a few weeks ago and it doesn't work
Nikita Tsukanov
@kekekeks
Jan 18 17:28 UTC
datagrid is a huge library after all
Steven Kirk
@grokys
Jan 18 17:28 UTC
@kekekeks hmm you think?
it really improves it
but yeah i can see the concern
thing is, you can disable it in a release build and not ship the library
Nikita Tsukanov
@kekekeks
Jan 18 17:29 UTC
We'll have to ship it as separate package
Steven Kirk
@grokys
Jan 18 17:30 UTC
other alternative is to include a cut-down version of DataGrid in devtools
but that could get messy
Nikita Tsukanov
@kekekeks
Jan 18 17:31 UTC
Would be really nice to port ListView/GridView from WPF once it's released
I think it covers most of the cases where we want a datagrid-like control
While being more lightweight
Steven Kirk
@grokys
Jan 18 17:31 UTC
tbh i've never found much of a use for ListView in WPF, mainly because the column sizing seems completely broken
also for devtools i think DataGrid is a better fit
Steven Kirk
@grokys
Jan 18 17:44 UTC
This message was deleted
ahopper
@ahopper
Jan 18 17:45 UTC
I was waiting to see the wpf virtualization stuff before looking at AvaloniaUI/Avalonia#2143 again
Steven Kirk
@grokys
Jan 18 17:45 UTC
yeah, though i think WPF virtualization is pretty different to ours
Jumar Macato
@jmacato
Jan 18 17:45 UTC
@grokys yes i'm still gonna work on the datagrid PR, might as well move the thing out on its own assembly i think
though that depends on our consensus, i might as well ask everyone whether to splitting or merging it into the base control assembly, or dropping the PR in favor of separate package
split or merge into* mobile gitter sucks
ahopper
@ahopper
Jan 18 17:50 UTC
I have a use for a 2d virtualization, I wonder if making the virtualizer more pluggable would work.
Benedikt Stebner
@Gillibald
Jan 18 17:52 UTC
@grokys I you have time to spare you could help me by merging textelements branche with current master. That would help me a lot.
Steven Kirk
@grokys
Jan 18 17:53 UTC
@jmacato yeah i think separate assembly makes sense
@Gillibald sure! i can do that!
Jumar Macato
@jmacato
Jan 18 17:56 UTC
alright, will work on it soon sir
Steven Kirk
@grokys
Jan 18 17:58 UTC
cool, once that's ready i can try and fix the styling problem
jp2masa
@jp2masa
Jan 18 17:59 UTC
I think there's an issue with Application styles: if the main window is open, changing the styles apparently doesn't change anything, but if I open for example a drop down, the styles are correctly applied in the popup, if I change the styles again, opening the drop down still uses the old style (seems to be cached, not sure though), and opening a new window applies the style correctly, is this a bug?
ahopper
@ahopper
Jan 18 18:04 UTC
if anyone is short of a challenge this issue AvaloniaUI/Avalonia#1099 still fills my vs output window
Steven Kirk
@grokys
Jan 18 18:04 UTC
@jp2masa yeah removing styles isn't currently implemented
so the control will take the styles from when it's first used and keep them
@ahopper i can take a look at that
jp2masa
@jp2masa
Jan 18 18:07 UTC
but it works for UserControls I think, ControlCatalog replaces a style to change the theme (light/dark)
ahopper
@ahopper
Jan 18 18:08 UTC
@jkoritzinsky should you acquire some Avalonia beer I'll fund delivery to @grokys :)
Steven Kirk
@grokys
Jan 18 18:08 UTC
i like beer!
in fact that's given me an idea...
jp2masa
@jp2masa
Jan 18 18:42 UTC

well, this "hack" seems to work (in the constructor of the window):

if (((IStyleHost)this).StylingParent is IGlobalStyles globalStyles)
{
    globalStyles.Styles.CollectionChanged +=
        (sender, e) =>
        {
            var styler = AvaloniaLocator.Current.GetService<IStyler>();
            styler.ApplyStyles(this);
        };
}

maybe something similar should be present in TopLevel, so that global style changes are applied?

Steven Kirk
@grokys
Jan 18 19:25 UTC
well thing is that styles can be added/removed anywhere
but yeah something like that
jp2masa
@jp2masa
Jan 18 21:28 UTC

now I'm also having an issue with Application resources, if I have this:

...
    <Application.Resources>
        <!--<SolidColorBrush x:Key="SomeBrush">#FFFFFFFF</SolidColorBrush>-->
        <StyleInclude x:Key="BaseLightTheme" Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml" />
        <StyleInclude x:Key="BaseDarkTheme" Source="avares://Avalonia.Themes.Default/Accents/BaseDark.xaml" />
    </Application.Resources>
...

it will fail to run with this exception:

Portable.Xaml.XamlObjectWriterException: 'Value 'Avalonia.Markup.Xaml.Styling.StyleInclude' (of type Avalonia.Markup.Xaml.Styling.StyleInclude) is not of or convertible to type {clr-namespace:Avalonia.Controls;assembly=Avalonia.Styling}IResourceDictionary (member {clr-namespace:Avalonia;assembly=Avalonia.Controls}Application.Resources)'

however, uncommenting the commented line works fine, any idea what's happening?

Steven Kirk
@grokys
Jan 18 23:10 UTC
i think you need to put the <StyleInclude>s in Application.Styles, not Application.Resources
jp2masa
@jp2masa
Jan 18 23:22 UTC
what I'm trying to do is: define available themes (style includes) as resources, then at runtime replace the "active" theme with one of those resources, maybe this is not the best approach?
Wiesław Šoltés
@wieslawsoltes
Jan 18 23:28 UTC
Ii don't think this will work currently
I did try this some time ago in the theme editor
Ended up loading styles from code behind
jp2masa
@jp2masa
Jan 18 23:35 UTC
ok, I'll use that approach for now, thanks for the help! (btw theme editor is really cool!)