These are chat archives for AvaloniaUI/Avalonia

29th
Jun 2017
Wiesław Šoltés
@wieslawsoltes
Jun 29 2017 06:05
@grokys We can multi-target nestandard1.3 and net45
I found this is best solution do my project
Samples can still be .net45
danwalmsley
@danwalmsley
Jun 29 2017 08:51
@grokys i'll try out portable.xaml branch on Avalon studio too
I'm thinking its going to make loading much faster?
@grokys isn't scenegraph cpu usage a bit high
image.png
this is when you load control catalog
and its sat idling?
danwalmsley
@danwalmsley
Jun 29 2017 08:57
I just tried with Avalon studio,
still very unstable
image.png
Steven Kirk
@grokys
Jun 29 2017 08:58
@danwalmsley any idea where those exceptions are being thrown? i didn't see that
danwalmsley
@danwalmsley
Jun 29 2017 08:58
image.png
Steven Kirk
@grokys
Jun 29 2017 08:59
hmm looks like skia is trying to read an avalonia property on the rendering thread
i'll take a look into that
danwalmsley
@danwalmsley
Jun 29 2017 08:59
ok cool
Steven Kirk
@grokys
Jun 29 2017 09:00
CPU usage will be due to the problem mentioned in the PR
danwalmsley
@danwalmsley
Jun 29 2017 09:00
the base of callstack not in screenshot is internalTick -> OnRenderLoop()
ah ok
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:00

we should probably just target netstandard2.0 when it's out, and .net 4.5

multitargeting seems to be the way to go

Steven Kirk
@grokys
Jun 29 2017 09:00
yeah
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:00
It would, however, increase build time significantly
So it's probably better to build core libs against netstandard1.1 and use multitargeting for platform backends
Steven Kirk
@grokys
Jun 29 2017 09:01
@danwalmsley any chance you could try it with d2d instead of skia and see if the exceptions go away?
danwalmsley
@danwalmsley
Jun 29 2017 09:02
ok 2 secs
Steven Kirk
@grokys
Jun 29 2017 09:02
@kekekeks do you still want to be able to run avalonia on .net 4.5?
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:02
Well, it's a nice feature to have
Steven Kirk
@grokys
Jun 29 2017 09:02
because we'll need to multitarget everything if we want .net 4.5
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:03
But I'm not sure if there is any point of supporting 4.5 <= .NET < 4.7
Since 4.7 runs on win7 just fine
danwalmsley
@danwalmsley
Jun 29 2017 09:03
I'm not able to build for .net 45 at the moment
so I think I'm not able to
I'm waiting for .net standard to get sorted too
Steven Kirk
@grokys
Jun 29 2017 09:04
ah ok, no problem. yeah we're all a bit in limbo at the moment
danwalmsley
@danwalmsley
Jun 29 2017 09:04
but when I run control catalog it doesn't happen
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:05
It seems that .NET 4.5 requires Win7 SP1 anyway
So I'm not sure if there is any point of having support for it
Since people could just ship .NET 4.7
Steven Kirk
@grokys
Jun 29 2017 09:06
ok well if we can just target .netstandard2.0 that would be fantastic
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:07
Mkay, 4.6 was included in Win10 at release
danwalmsley
@danwalmsley
Jun 29 2017 09:07
@grokys ok, any ideas on a workaround? I can quickly try here and let you know if it fixes it
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:07
tbh, targeting .NET Standard 2.0 seems to be the best option
Steven Kirk
@grokys
Jun 29 2017 09:08
@danwalmsley what is the type of this at the point of the exception?
danwalmsley
@danwalmsley
Jun 29 2017 09:08
2 mins gonna have to restart I think
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:09
There is definitely no point of supporting .NET Core 1.1 after 2.0 release
Steven Kirk
@grokys
Jun 29 2017 09:09
@kekekeks ok lets target 2.0 when it's out
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:09
MonoMac backend can't run on .NET Core 1.1 anyway
Steven Kirk
@grokys
Jun 29 2017 09:09
that will solve a lot of problems
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:10
Well, people have 2 options
1) Use .NET Core and have support for Win7 out of the box
2) Ship .NET 4.6.1 with the app
And updating to the latest .NET version seems to be a good idea in general anyway
Steven Kirk
@grokys
Jun 29 2017 09:11
so you're no longer hoping to target xp? ;)
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:12
It will cost us resources that we don't have
danwalmsley
@danwalmsley
Jun 29 2017 09:12
@grokys
this = Avalonia.Threading.Dispatcher
Steven Kirk
@grokys
Jun 29 2017 09:13
oh sorry, can you go down to the Brush stack frame and get this?
@kekekeks yeah i agree - if someone wants to do the work to maintain a version that works on xp i'll accept it, but otherwise lets target netstandard2
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:17
There is another point to consider
By the time when we are finally ready to release 1.0
WinXP will be long gone and forgotten
Steven Kirk
@grokys
Jun 29 2017 09:17
btw @jkoritzinsky i've not forgotten about your Command binding PR - i tried it out but i want get get a change for the null problem in in a separate PR first, as tests are failing
haha yeah, in 2030
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:18
well, we could also adopt versioning system from microsoft
And call the next release 1.0.0-rc1-preview3 or something
Steven Kirk
@grokys
Jun 29 2017 09:18
i'm really sad that development has slowed recently - i just don't have the time or inclination to deal with VS2017's bullshit
danwalmsley
@danwalmsley
Jun 29 2017 09:18
@grokys in Brush.Opacity.get()
this = SolidColorBrush
Steven Kirk
@grokys
Jun 29 2017 09:18
ok, that's wrong
danwalmsley
@danwalmsley
Jun 29 2017 09:19
what should it have been?
Steven Kirk
@grokys
Jun 29 2017 09:19
the brush should have been converted to an immutable brush by that point
let me try and work out why it's not
Steven Kirk
@grokys
Jun 29 2017 09:26
hmm i can't work out why that's happening from a quick look
danwalmsley
@danwalmsley
Jun 29 2017 09:26
any information I can give you?
in Avalon studio it only happens when I load the text editor
Steven Kirk
@grokys
Jun 29 2017 09:27
could you go down to the TextNode.Render frame and just check that the value of TextNode.Foreground is the SolidColorBrush you were seeing?
actually, don't worry - running it myself ;)
danwalmsley
@danwalmsley
Jun 29 2017 09:30
it is the same value
color matches ;)
Steven Kirk
@grokys
Jun 29 2017 09:30
weird
danwalmsley
@danwalmsley
Jun 29 2017 09:31
is it to do with formattedTextImpl in skia
Steven Kirk
@grokys
Jun 29 2017 09:31
@kekekeks nooo lets not use MS's version schemes! everyone hates MS's versioning schemes (me included)!
danwalmsley
@danwalmsley
Jun 29 2017 09:31
line 231
it seems to be doing its own caching of foreground brushes
Steven Kirk
@grokys
Jun 29 2017 09:31
ahhh
Nikita Tsukanov
@kekekeks
Jun 29 2017 09:32
@grokys but that's good for marketing and adoption
nobody wants to use 0.6-alpha
Steven Kirk
@grokys
Jun 29 2017 09:32
yeah but IMO people should know it's very unstable...
like, we're moving stuff around so much that people would get pissed off if we didn't say "it's alpha"
Steven Kirk
@grokys
Jun 29 2017 09:41
@danwalmsley weird - i'm not seeing that exception being thrown here
danwalmsley
@danwalmsley
Jun 29 2017 09:44
are you running Avalon studio?
Steven Kirk
@grokys
Jun 29 2017 09:44
yeah
danwalmsley
@danwalmsley
Jun 29 2017 09:44
and did you open a text file?
Steven Kirk
@grokys
Jun 29 2017 09:44
ah hold on - i've just seen it
my return key doesn't always work...
or up and down arrows - left and right do though
danwalmsley
@danwalmsley
Jun 29 2017 09:46
in text editor
it shouldn't work when intellisense is open
other than that it should do
Steven Kirk
@grokys
Jun 29 2017 09:47
intelisense isn't open
danwalmsley
@danwalmsley
Jun 29 2017 09:47
that normally works on avalonia master
is your text editor rendering correctly?
despite the exceptions
Steven Kirk
@grokys
Jun 29 2017 09:48
yeah, rendering fine
danwalmsley
@danwalmsley
Jun 29 2017 09:48
send screen shot
mine ends up with a large space between the console panel
and the editor
and you can type at all in the text
and when you try
then everything goes blank more or less
maybe I need to give you some test files, that have more syntax highlighting visible
Steven Kirk
@grokys
Jun 29 2017 09:51
that might be helpful, yeah - actually i've found a couple of bugs
but not the one that you were seeing
danwalmsley
@danwalmsley
Jun 29 2017 09:51
ok ill send you a zip on private chat
Steven Kirk
@grokys
Jun 29 2017 10:02
aha, just got it to happen again
yeah it seems to be because skia caches brushes like you say, and somehow a mutable brush is getting in there
Steven Kirk
@grokys
Jun 29 2017 10:09
ok @danwalmsley that should be fixed
danwalmsley
@danwalmsley
Jun 29 2017 10:09
ok giving it a try
image.png
much better
Steven Kirk
@grokys
Jun 29 2017 10:13
cool!
danwalmsley
@danwalmsley
Jun 29 2017 10:13
but still the weird rendering issue
they background isn't getting rendered to the end
and also mouse clicks are not getting through
Steven Kirk
@grokys
Jun 29 2017 10:14
yeah mouse clicks probably aren't getting though because there's now mouse transparency
danwalmsley
@danwalmsley
Jun 29 2017 10:14
popup response time is way quicker
ok so what might I need to change to fix that?
Steven Kirk
@grokys
Jun 29 2017 10:15
add a transparent background on the control that needs to receive the mouse clicks
re the background color, not sure what's causing that...
danwalmsley
@danwalmsley
Jun 29 2017 10:16
could be a measuring issue?
let me see what happens if I resize window
btw BeginMoveDrag on the main window (i.e. trying to drag with title bar has stopped working
perhaps its mouse transparency again
add a transparent background on the control that needs to receive the mouse clicks
I'm still not understanding this
do I need a transparent background on things in front of the control that receives the clicks
@grokys ok another easy bug to fix
if you open Avalon studio
open a code file
then minimize the entire window
it starts throwing exception
because WindowFrameBuffer constructor is called with width and height = 0
Steven Kirk
@grokys
Jun 29 2017 10:24
for something to receive a mouse click, it needs to be painting something
this is the same as in WPF now
danwalmsley
@danwalmsley
Jun 29 2017 10:25
ah nice
maybe its something else though
let me paste dev tools
Steven Kirk
@grokys
Jun 29 2017 10:26
so you need to make sure that the control that wants to receive the mouse clicks is painting something where you click, even a transparent background
danwalmsley
@danwalmsley
Jun 29 2017 10:26
image.png
can you see that pointerover stops at this border...
<ControlTemplate>
        <Panel>
          <local:TooltipView Name="PART_Tooltip" />
          <local:CompletionAssistantView Name="PART_CompletionAssistant" />
          <local:Intellisense Name="PART_Intellisense" />
          <Border Background="Transparent"
                  BorderBrush="{TemplateBinding BorderBrush}"
                  BorderThickness="{TemplateBinding BorderThickness}">

              <ScrollViewer Focusable="False"
                          Name="PART_ScrollViewer"
                          VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}"
                          HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}"
                          VerticalContentAlignment="Top"
                          HorizontalContentAlignment="Left"
                          Padding="{TemplateBinding Padding}">
              </ScrollViewer>
          </Border>
        </Panel>
      </ControlTemplate>
before it went through
interestingly its also this border
that is not sizing as it previously was
I think its something weird happening with border control
or that it doesn't thing the contents of border are being painted
if I remove the border
then the next border higher up in the tree is where mouse stops
Steven Kirk
@grokys
Jun 29 2017 10:31
hmm
yes i see it...
danwalmsley
@danwalmsley
Jun 29 2017 10:33
perhaps my text area control needs to be rendering an entire background?
Steven Kirk
@grokys
Jun 29 2017 10:33
but move over the text and you see that the pointer over appears
it's because there's nothing there inside the ScrollViewer
so there's nothing for the mouse pointer to be over
danwalmsley
@danwalmsley
Jun 29 2017 10:34
ok I did this...
in my textview control
it was just rendering text...
now I did this..
public override void Render(DrawingContext drawingContext)
        {
            drawingContext.FillRectangle(Brushes.Transparent, Bounds);
            if(!VisualLinesValid)
            {
                return;
            }

            RenderBackground(drawingContext, KnownLayer.Background);
so I added the fillRectangle transparent
however wont that make this inefficient,
?
Steven Kirk
@grokys
Jun 29 2017 10:35
can't you just set TextArea.Background="Transparent"?
it shouldn't make it inefficient, at least if it does, we need to fix that
rendering a truly transparent background can be pretty much made a no-op
danwalmsley
@danwalmsley
Jun 29 2017 10:39
I just thought at the moment it only re-rendering the parts in editor that change
that would make the entire text area change
Steven Kirk
@grokys
Jun 29 2017 10:40
to find out you can set Window.Renderer.DrawDirtyRects = true
danwalmsley
@danwalmsley
Jun 29 2017 10:40
ok I have a contentpresenter that holds the text control
and I had to set that to Background="Transparent"
perhaps content presenter should have transparent background by default?
Steven Kirk
@grokys
Jun 29 2017 10:41
ok, maybe the TextArea template doesn't set the background
no, because then things like round buttons won't work
danwalmsley
@danwalmsley
Jun 29 2017 10:41
ah ok
its a really nice upgrade!
will enable lots of nice stuff
would it work with popups too?
ie.
like a popup that was circular
wow performance is noticeable improvement
great job
Steven Kirk
@grokys
Jun 29 2017 10:45
oh cool!
danwalmsley
@danwalmsley
Jun 29 2017 10:45
any ideas on fixing the minimize bug?
Steven Kirk
@grokys
Jun 29 2017 10:46
i need to look into that, will fix asap
not sure about circular popups - not sure whether we support transparency in popups yet
danwalmsley
@danwalmsley
Jun 29 2017 10:46
ok just need to find out why that border doesn't render the correct size as it used to
then after that and minimize bug, unless I find anything else I think I'm pretty please with scenegraph branch
Steven Kirk
@grokys
Jun 29 2017 10:54
ok great! the minimize thing shouldn't be hard to fix
Steven Kirk
@grokys
Jun 29 2017 11:02
have you tried setting DrawDirtyRects = true and seeing what it's redrawing each time?
it's interesting
danwalmsley
@danwalmsley
Jun 29 2017 11:45
yes its pretty cool
it was just text and caret redrawing
danwalmsley
@danwalmsley
Jun 29 2017 12:29
image.png
@grokys perhaps we can work together later if you have time to diagnose this corruption issue?
this is still on scenegraph
Steven Kirk
@grokys
Jun 29 2017 13:27
@danwalmsley i'd love to but don't have time right now - maybe late if you're still around?
danwalmsley
@danwalmsley
Jun 29 2017 13:51
yeah, no I was thinking like in the evening, or maybe this weekend
whenever you have a chance
Steven Kirk
@grokys
Jun 29 2017 13:57
yeah lets try! ping me here when you're around, and maybe i will be too ;)
Nikita Tsukanov
@kekekeks
Jun 29 2017 14:08

not sure about circular popups - not sure whether we support transparency in popups yet

#987

danwalmsley
@danwalmsley
Jun 29 2017 15:52
@kekekeks / others interested in .net core <PackageTargetFallback> has been deprecated in core 2 preview 2
so when you migrate to it you will have to remove it from all your csproj files
basically now .net standard2 and net core 2, will just accept .net 4.6.1 and below nugets and projects without doing anything
but in msft fasion if you leave the <PackageTargetFallback> build fails
Nikita Tsukanov
@kekekeks
Jun 29 2017 16:03
wat
seriously?
Is there any way to disable that behavior?
danwalmsley
@danwalmsley
Jun 29 2017 16:03
well it does give a warning
don't know if it can be disabled
@grokys found another bug in scenegraph
see comment on #827
Nikita Tsukanov
@kekekeks
Jun 29 2017 16:04
Since there will be tons of TypeLoadException and MethodNotFoundException issues
danwalmsley
@danwalmsley
Jun 29 2017 16:04
apparently they tested and 70% of nugget packages are 100% compatible
danwalmsley
@danwalmsley
Jun 29 2017 16:06
@grokys its just that immutable brush fix you made, its not happy if the brush is already immutable
Nikita Tsukanov
@kekekeks
Jun 29 2017 16:07
It seems that packagetargetfallback is still there
It's just net461 added there by default
Steven Kirk
@grokys
Jun 29 2017 16:11
@danwalmsley arrgh dammit - that should have been an as not a cast
Steven Kirk
@grokys
Jun 29 2017 16:16
@danwalmsley fixed that
Jeremy Koritzinsky
@jkoritzinsky
Jun 29 2017 16:43
@grokys @kekekeks I talked with the people at MSFT behind XAML standard a little about Avalonia. I can't talk really much at all about what we talked about because of NDA, but I did tell them that our next release was aiming to be a beta, so I think we should stick with that idea.
Steven Kirk
@grokys
Jun 29 2017 16:45
yeah, we should try for a beta
Jeremy Koritzinsky
@jkoritzinsky
Jun 29 2017 16:48
If not we should update it
And try to generally stick to it so we don't get feature creep too badly
Steven Kirk
@grokys
Jun 29 2017 16:50
not really no...
we should probably delete that wiki page
Steven Kirk
@grokys
Jun 29 2017 16:58
there are also milestones, which are a very vague indication of where i thought issues should be addressed, but i don't intend them to be binding
danwalmsley
@danwalmsley
Jun 29 2017 18:01
@grokys thanks for fixing 😀
@kekekeks did you get much time to review scenegraph yet?
Nikita Tsukanov
@kekekeks
Jun 29 2017 18:13
nope, I hope to get some time this weekend
Well, I've taken a look two months ago and it looked okay(-ish)
danwalmsley
@danwalmsley
Jun 29 2017 18:20
Its made a huge improvement to Avalon studios typing experience so I'm hoping it gets merged very soon