These are chat archives for AvaloniaUI/Avalonia

13th
Apr 2018
Achal Shah
@achal7
Apr 13 2018 06:16
flickering.gif
Guys, if i try to reduce the window's size less then its min width/hight then its starts flickering
is this expected behaviour? since i was expecting that when user does that, nothing should happens
Matthijs ter Woord
@mterwoord
Apr 13 2018 06:19
i think what happens is, that it resizes to smalleer, then gets resized back
Sorien
@Sorien
Apr 13 2018 06:25
probably WM_GETMINMAXINFO handling is missing
Steven Kirk
@grokys
Apr 13 2018 07:46
@achal7 it's a known bug, just no-one has fixed it yet
Achal Shah
@achal7
Apr 13 2018 09:18
is there an issue exists for this or shold i make one
Steven Kirk
@grokys
Apr 13 2018 09:47
@achal7 i think this might be the issue: AvaloniaUI/Avalonia#1191
danwalmsley
@danwalmsley
Apr 13 2018 11:34
@kekekeks just noticed for some reason on gtk3 backend Window.ShowDialog doesnt appear to work
Achal Shah
@achal7
Apr 13 2018 11:44
hi guys
what is required/procedure to contribute towards avalonia?
danwalmsley
@danwalmsley
Apr 13 2018 11:57
1) discuss a feature you wish to implement or bug you would like to fix here.
2) fix bug / implement feature
3) submit pull request
4) pull request is reviewed and you make suggested changes to improve code
5) when everyone is happy feature / fix gets merged
Jumar Macato
@jmacato
Apr 13 2018 12:10
@danwalmsley hey, i'm sorry i won't be able to do corert builds for the next few days :(
danwalmsley
@danwalmsley
Apr 13 2018 12:21
no worries
:)
Jumar Macato
@jmacato
Apr 13 2018 12:22
the last thing i did was to get the output
and its a nondescript exception, quite useless :/
i really think there is still some weird stuff happening with newtonsoft.json
and the colortheme class
danwalmsley
@danwalmsley
Apr 13 2018 12:23
ok ill try and look into it tonight
@grokys I think I found a bug in contentpresenter here:
I get a crash here when I have a textblock inside content presenter (Button)
and it measures to height = 0 ( I guess its not visible because window is too small or something)
however content presenter tries to arrange child with height -8 (due to padding being subtracted from 0)
this throws an exception immediatly
Steven Kirk
@grokys
Apr 13 2018 12:25
ah ok, yeah sounds like a bug. could you add an issue?
danwalmsley
@danwalmsley
Apr 13 2018 12:26
I tested with this around that line
if(size.Width > 0 && size.Height > 0)
            {
                Child.Arrange(new Rect(originX, originY, size.Width, size.Height));
            }
and it fixes the issue
only question is if its the correct fix?
I guess if the height is less than or equal 0 then no point arranging?
Steven Kirk
@grokys
Apr 13 2018 12:26
should probably be Child.Arrange(new Rect(originX, originY, Math.Max(size.Width, 0), Math.Max(size.Height, 0)));
danwalmsley
@danwalmsley
Apr 13 2018 12:26
ok
shall I submit a PR for that
Steven Kirk
@grokys
Apr 13 2018 12:27
you still need to arrange because otherwise it will retain the size from before
yeah sure!
danwalmsley
@danwalmsley
Apr 13 2018 12:27
and try to add a unit test ;)
Steven Kirk
@grokys
Apr 13 2018 12:27
great :) was just about to say
danwalmsley
@danwalmsley
Apr 13 2018 12:27
that is a ContentPresenter unit test I guess?
Steven Kirk
@grokys
Apr 13 2018 12:30
yep
you might want to add the same test for border as that may have the same logic
Achal Shah
@achal7
Apr 13 2018 12:30
okay, thanks for the input
was looking at the open issues list to fix, browing based on the issues which are not assigned to anybod
picked up 1479
Steven Kirk
@grokys
Apr 13 2018 12:37
great @achal7 !
@danwalmsley pushed a commit to #1488 that should hopefully fix your problem
danwalmsley
@danwalmsley
Apr 13 2018 12:44
thanks will test shortly
yep that works
thanks :)
Steven Kirk
@grokys
Apr 13 2018 12:51
excellent! does it introduce any other problems?
Sorien
@Sorien
Apr 13 2018 12:55
@achal7 i've tried to fix your issue its definitely not the best solution but working AvaloniaUI/Avalonia#1495
danwalmsley
@danwalmsley
Apr 13 2018 13:01
not at first glance, but I will use that commit on AS for a while to see if I notice anything
danwalmsley
@danwalmsley
Apr 13 2018 13:10
@grokys the Border control uses the Rect.Deflate method
which prevents stuff from going below zero
would that be a better fix for ContentPresenter to use deflate instead?
ah you cant because height and width have to be deflated separately.
ok border didn't have bug, but unit test added for both
danwalmsley
@danwalmsley
Apr 13 2018 13:15
@grokys #1497 is ready for review
Steven Kirk
@grokys
Apr 13 2018 13:17
thanks dan, will take a look soon!
danwalmsley
@danwalmsley
Apr 13 2018 13:22
@grokys #1488 looks good after further testing
id say if your happy you can merge it now
Steven Kirk
@grokys
Apr 13 2018 13:23
cool! i'll just add some description to it and merge
oh also you didn't add all the AffectsRender/AffectsMeasure properites to ContentPresenter - will add those
Steven Kirk
@grokys
Apr 13 2018 13:33
i think we should probably add a PR template because it really helps when there's a description of 1) what a PR is fixing and 2) what the PR does to fix it
i don't really like templates for stuff like that much personally because they can be too prescriptive
but folks keep submitting PRs with blank descriptions
people, it makes it hard to review stuff
Achal Shah
@achal7
Apr 13 2018 13:40
#1479 is ready for review, created pull request for that.
@Sorien thanks :)
is any one working on #1459 ?
@grokys that indeed will be very helfull, since while creating pull request, i was also confused weather Avalonia is following any standard, template etc
Steven Kirk
@grokys
Apr 13 2018 13:44
@achal7 ah, #1492 should have fixed #1459
i didn't realize we had 2 issues for that one
i've closed that issue
Achal Shah
@achal7
Apr 13 2018 14:02
thanks for saving my time
Achal Shah
@achal7
Apr 13 2018 14:18
what about issue #1448 ?
I just able to reproduce some more problem related to text alignments
text box alignment issue.gif
is there anyone who is looking at this issue, or can i pick this up?
danwalmsley
@danwalmsley
Apr 13 2018 14:25
I think no one is looking at that right now
go ahead :)
Achal Shah
@achal7
Apr 13 2018 14:26
ok
Steven Kirk
@grokys
Apr 13 2018 14:56
@achal7 yes please do fix that one! it's been there ages and i've tried fixing it a few times but always got distracted
danwalmsley
@danwalmsley
Apr 13 2018 16:01
@grokys #1487 is ready now
Benedikt Schroeder
@Gillibald
Apr 13 2018 16:22
Still bothers me that Border and ContentPresenter don't share code. ContentPresenter in Avalonia acts like a extended Border. If they had the same base class it would be easier to maintain it but not sure if that is possible.
danwalmsley
@danwalmsley
Apr 13 2018 17:55
Anyone know when you open a child window, what sets the size it opens of window state is not maximizer, on what windows it opens at a sensible size, but on Linux it opens as a tiny box size, perhaps this has been left to the backends to choose a size?
danwalmsley
@danwalmsley
Apr 13 2018 18:19
ah I discovered the SizeToContent property
Wiesław Šoltés
@wieslawsoltes
Apr 13 2018 18:44
@jmacato
2018-04-13_20-43-09.gif
Finally managed to run Draw2D app in native release mode using Microsoft.DotNet.ILCompiler 1.0.0-alpha-26413-02.
@danwalmsley
danwalmsley
@danwalmsley
Apr 13 2018 18:56
@wieslawsoltes is the performance better?
Wiesław Šoltés
@wieslawsoltes
Apr 13 2018 18:56
Startup time improved a lot
Jeremy Koritzinsky
@jkoritzinsky
Apr 13 2018 18:56
@wieslawsoltes whats the on-disk size?
Wiesław Šoltés
@wieslawsoltes
Apr 13 2018 18:57
TOTALCMD64_2018-04-13_20-57-11.png
30,2 MB
danwalmsley
@danwalmsley
Apr 13 2018 18:58
startup time looks instant
Wiesław Šoltés
@wieslawsoltes
Apr 13 2018 18:58
Maybe some improvement can be made by optimizing rd.xml
Jeremy Koritzinsky
@jkoritzinsky
Apr 13 2018 18:58
Yeah we can definitely optimize parts of the Rd.xml.
danwalmsley
@danwalmsley
Apr 13 2018 19:00
wish I could get AS to run, still having trouble
Wiesław Šoltés
@wieslawsoltes
Apr 13 2018 19:01
I have few issues too, mainly with dependencies
We really need good rd.xml generator :smile:
For my main projects I have a lot of external dependencies, doing it manually will be painful
danwalmsley
@danwalmsley
Apr 13 2018 19:07
I'm starting to think I might need a minimal repro and open an issue for corert guys to debug
Wiesław Šoltés
@wieslawsoltes
Apr 13 2018 19:27
2018-04-13_21-25-02.png
danwalmsley
@danwalmsley
Apr 13 2018 19:39
is ram usage improved over full .net?
Wiesław Šoltés
@wieslawsoltes
Apr 13 2018 19:40
69.5 MB when using .NET Core runtime
We need some benchmarks :smile:
Reduced exe size a bit 30,2 MB -> 28,3 MB
danwalmsley
@danwalmsley
Apr 13 2018 19:45
if avalonia ever runs on webassembly it would be pretty cool to have core2d and avalon studio just running in a browser, no install or anything
Steven Kirk
@grokys
Apr 13 2018 22:27
@Gillibald yes i agree. i've thought that myself. feel free to give it a try!