These are chat archives for AvaloniaUI/Avalonia

11th
Oct 2017
danwalmsley
@danwalmsley
Oct 11 2017 09:54
@kekekeks you around
regarding #1204
your comment about not skipping arrange
if I check for the case when extent is 0,
then what do you do for arrange?
decreaseButton.Arrange(Rect.Empty);
danwalmsley
@danwalmsley
Oct 11 2017 10:00
iv pushed a change see if that's what you expect
Steven Kirk
@grokys
Oct 11 2017 10:03
i think you could also just hide the control if its size would be 0?
trying to think of other controls that do a similar thing...
danwalmsley
@danwalmsley
Oct 11 2017 10:09
its bascally like an edge case, it only happens when I'm closing a listbox with the scrollbar in
this is in arrange override
so should it have been hidden in measureoveride?
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\Microsoft.NET.Build.Extensions.NETFramework.targets(57,5): error : The version of Microsoft.NET.Sdk used by this project is insufficient to support references to libraries targeting .NET Standard 1.5 or higher. Please install version 2.0 or higher of the .NET Core SDK. [C:\projects\Avalonia\src\Windows\Avalonia.Win32\Avalonia.Win32.csproj]
I'm sure I've seen something like that before
Steven Kirk
@grokys
Oct 11 2017 10:27
@danwalmsley i think hiding in the arrange pas would be best? don't quote me on that though, but it's more an "arrange" thing than a "measure" thing
i wonder if there's a similar oss WPF control that we can look at?
tbh though probably just Arrange(Rect.Empty) would work fine
danwalmsley
@danwalmsley
Oct 11 2017 10:36
has ci stopped working?
Nikita Tsukanov
@kekekeks
Oct 11 2017 10:38
Meh, some nuget connectivity issues again
danwalmsley
@danwalmsley
Oct 11 2017 10:38
bollocks!
@kekekeks is the fix ok now?
@grokys if I change IsVisible to false in the arrange, pass I will have to track what the state was before I override it, so I guess Rect.Empty is easier?
Steven Kirk
@grokys
Oct 11 2017 10:43
yeah go for it if it works
Nikita Tsukanov
@kekekeks
Oct 11 2017 10:47
Any ideas about fixing blablabla-not-valid-sdk-version-but-not-really error? It builds from the cake script on my machine
See that Max?
We should either remove it (it fixed the problem for me at the moment) or use the same logic for horizontal orientation
I think I forgot to add it to that if branch
Nikita Tsukanov
@kekekeks
Oct 11 2017 11:01
Mkay, referencing JSON.NET breaks AppVeyor build
just great
Nikita Tsukanov
@kekekeks
Oct 11 2017 11:27
@grokys I'm currently using JSON.NET for Avalonia.Remote.Protocol.dll
There are two problems with it
1) It's a big dependency
2) Somehow referencing it breaks appveyor build
Is it OK to grab this, merge it into one .cs file and include as is? It's BSD-licensed
danwalmsley
@danwalmsley
Oct 11 2017 12:32
ok guys finally #1204 I think should work
this line...
var thumbHeight = double.IsNaN(viewportSize) ? thumb?.DesiredSize.Height ?? 0 : finalSize.Height * viewportSize / extent;
was so difficult to read, so I've re-written it and it now copes with extent being 0
and unit tests will hopefully pass now
 double thumbHeight = 0;

                if (double.IsNaN(viewportSize))
                {
                    thumbHeight = thumb?.DesiredSize.Height ?? 0;
                }
                else if (extent > 0)
                {
                    thumbHeight = finalSize.Height * viewportSize / extent;
                }
far easier to read!
danwalmsley
@danwalmsley
Oct 11 2017 12:52
if anyone is able to review #1204 all CI has passed except (Mac) @kekekeks @grokys
@kekekeks you know my issue about popups not resizing on gtk3, has the situation changed yet, id like to try and find a way to fix it
Nikita Tsukanov
@kekekeks
Oct 11 2017 12:54
I think I was getting an exception with negative Rect size
danwalmsley
@danwalmsley
Oct 11 2017 12:54
can you point me to where I need to look to implement this?
if one of the biggest things that stops me using AS on linux right now
Steven Kirk
@grokys
Oct 11 2017 12:55
@kekekeks yeah definitely
json.net is a big dependency, better to do it like that if that works
Nikita Tsukanov
@kekekeks
Oct 11 2017 12:58
I'm still getting that SDK version issue
It seems that Microsoft.NET.Build.Extensions.targets will trigger an error when building with regular MSBuild
for some weird reason
And I have no idea why that happens on remote2 branch
Since I haven't changed anything
Just added another netstandard2.0 project
this line here
probably in my case im resizing the window when the popup is closed
would it be safe to remove this line?
Nikita Tsukanov
@kekekeks
Oct 11 2017 13:12
No
You'll be getting ObjectDisposedException or something like that
danwalmsley
@danwalmsley
Oct 11 2017 13:13
ok
Nikita Tsukanov
@kekekeks
Oct 11 2017 13:15
Oh, that's just great
danwalmsley
@danwalmsley
Oct 11 2017 13:15
the fix would have to be inside WindowBaseImpl right?
Nikita Tsukanov
@kekekeks
Oct 11 2017 13:15
MSBuild can mess up build completely
If you add a project to solution
Then it goes nuts and stops building completely unrelated project
what the actual fuck
danwalmsley
@danwalmsley
Oct 11 2017 13:17
and I probably just need to call Native.GtkWindowResize(GtkWidget, (int)value.Width, (int)value.Height);
if the popup has been resized but before its opened
Nikita Tsukanov
@kekekeks
Oct 11 2017 13:18
IsClosed means the handle is closed
Which basically means "window object is destroyed, you can't make calls anymore"
Nikita Tsukanov
@kekekeks
Oct 11 2017 13:23

Mkay, I think, I've found out what's causing msbuild issue
If you have references like that:

Foo (netstandard2.0) <- Bar (.NET 4.6.1, old SDK) <- FooBar (netstandard2.0)

everything goes Kaboom, if you build from console
And works perfectly fine from VS
I hate these people
danwalmsley
@danwalmsley
Oct 11 2017 13:31
@kekekeks have you had gtk3 running on windows?
I'm getting System.AggregateException: 'Unable to load Gdk (Error loading libgdk-3-0.dll error 193)'
dlls are present
Nikita Tsukanov
@kekekeks
Oct 11 2017 13:35
Run ControlCatalog.Desktop
dlls are 32-bit
ControlCatalog.NetCore is 64-bit
danwalmsley
@danwalmsley
Oct 11 2017 14:06
ok
Nikita Tsukanov
@kekekeks
Oct 11 2017 14:11
I think you won't be able to reproduce sizing issues on win32
Most of them are caused by X11
rconde01
@rconde01
Oct 11 2017 14:13
can you currently/are you planning on the ability to host native controls?
Nikita Tsukanov
@kekekeks
Oct 11 2017 14:14
Not in the immediate future
and not for all backends
rconde01
@rconde01
Oct 11 2017 14:19
OOC how would that even work...say you have multiple child windows, one of which is native...how can you emulate the window ordering such that the native window can be behind some of the others
I guess WPF can do it, but i've never personally tried
Nikita Tsukanov
@kekekeks
Oct 11 2017 14:20
native windows can't be behild our content
That's the main problem with embedding
Also, no matrix transformations
It's possible to get GTK and, I think, Cocoa, to render widgets offscreen
But that won't work well with our separate-thread rendering
rconde01
@rconde01
Oct 11 2017 14:28
yuck - that's what i thought
Nikita Tsukanov
@kekekeks
Oct 11 2017 14:29
Win32 won't allow window composition
Some native controls use HDC from WM_PAINT message for drawing
But that doesn't work for most of them
But we need native control embedding for sure
text input fields on mobile have tons of logic that would be hard to replicate
So I'm planning to get embedding working and create a small lib with NativeTextBox or something
That will use our implementation on desktop and platform-specific implementation on mobile
Jeremy Koritzinsky
@jkoritzinsky
Oct 11 2017 15:58
Now that the remote previewer is merged in, can we figure out plans for when our next release is going to be? I think we're at the point we really should do another release even if we aren't ready for beta 1 yet.
Nikita Tsukanov
@kekekeks
Oct 11 2017 15:59
I was planning to get some kind of packaging support
my PR for deb package generation was merged to https://github.com/qmfrederik/dotnet-packaging
So it's only OSX zip bundle that has to be figured out
After that it will be a matter of recipes and some console utility
For beta1, I think, we need to get DeferredRenderer stabilized
That also means that I need to make MonoMac backend to support it
I think we also have several bugs that needs to be fixed before the next release
Even if it won't be Beta1
We are pretty close to beta1, though
We'll probably make some kind of preview release on nuget
To have something for people who are coming here and asking about stuff that we've got fixed/changed since 0.5
It's also needed to stabilize tooling
Nikita Tsukanov
@kekekeks
Oct 11 2017 16:04
Also, I suggest to switch to develop/master model
with fixes being merged to both of them
My current plan:
  • fix VS extension, so it will use the new remote previewer (and get proper .NET Core support that way)
  • implement at least some sort of packaging (it's complicated to get OSX/Linux packages)
  • make MonoMac backend to support deferred rendering
Nikita Tsukanov
@kekekeks
Oct 11 2017 16:10
I will probably start with MonoMac
since packaging and VS extension won't need changes in the main repo
And that will allow to make a preview release
Jeremy Koritzinsky
@jkoritzinsky
Oct 11 2017 17:07
👌
Steven Kirk
@grokys
Oct 11 2017 21:32
yeah we should definitely try to work towards a beta
we should go through the beta milestone, see what's do-able and what isn't
i'm still trying to fix this damn resizing issue
Nikita Tsukanov
@kekekeks
Oct 11 2017 21:36
OpenGL support won't make it to beta1, I think
It's another huge set of changes for the rendering subsystem
global menu support isn't really needed
Monodevelop.... Let's just cancel it until they fix their IDE
Right now it's unusable with multitargeting
And there is not Linux support for .NET Core in Monodevelop
Touch and window transparency... Probably also not
Drag&Drop needs some research
Everything else seems to be mostly bugs
I suggest to get a somewhat stable build
And make a preview release on nuget
without annoucements, etc
So people can upgrade if needed
and then do something about the issues
Nikita Tsukanov
@kekekeks
Oct 11 2017 21:41
So we can get a stable beta version
Steven Kirk
@grokys
Oct 11 2017 22:21
yeah that sounds reasonable
feel free to add/remove stuff from the beta1 milestone
trying to figure out this resizing problem and work out where exactly it started, but VS hangs every time i change to a new commit and lots of old commits no longer build for some reason