These are chat archives for AvaloniaUI/Avalonia

25th
Jan 2016
Nikita Tsukanov
@kekekeks
Jan 25 2016 01:19
What do you need PointPair for?
I don't remember a similar type in WPF
Steven Kirk
@grokys
Jan 25 2016 07:23
I agree, PointPair seems like a bit of a strange addition. is there another library/framework you took the idea from?
Johan Larsson
@JohanLarsson
Jan 25 2016 07:29
pointpair is a line no?
Nikita Tsukanov
@kekekeks
Jan 25 2016 07:32
People usually just construct line from two points
not from pointpair struct
Steven Kirk
@grokys
Jan 25 2016 07:33
i think it would also make binding more difficult
as PointPair isn't a PerspexObject, changes to the points will not be picked up by the control
Ivan Kochurkin
@KvanTTT
Jan 25 2016 07:51
It's better to replace one PointPair with two Point in Line and LineGeometry?
Steven Kirk
@grokys
Jan 25 2016 07:52
that's the way it's done in WPF etc right?
I don't really see the point of PointPair
and like i said, it breaks binding
in WPF
Steven Kirk
@grokys
Jan 25 2016 07:53
ok, in WPF it was done that way I think because you can't bind with WPF's Point
however Perspex's Point is immutable so should be fine for binding
I think 2 points in Line would be preferable for me
though i'm willing to be convinced otherwise: why did you decide on PointPair?
Ivan Kochurkin
@KvanTTT
Jan 25 2016 07:56
Ok, will fix it. Because of only one assignment instead of P1 = ...; P2 = ...
Steven Kirk
@grokys
Jan 25 2016 07:57
ok, did you realise it would break binding though?
i.e. when assigning to PointPair.P1 there's no way for Line to tell the point has changed
i know Polygon/Polyline won't currently work with binding either, but WPF has that limitation too
and I was going to suggest a change to make it work as a separate PR
Ivan Kochurkin
@KvanTTT
Jan 25 2016 08:13
That is I should remove PointPair and make another PR?
Steven Kirk
@grokys
Jan 25 2016 08:14
no, just update it in the current PR
Ivan Kochurkin
@KvanTTT
Jan 25 2016 08:14
Ok
Amer Koleci
@amerkoleci
Jan 25 2016 09:50
Hi guys, I was thinking on using Perspex as my game engine editor
Did someone managed to have something like Docking using Perspex?
Nikita Tsukanov
@kekekeks
Jan 25 2016 09:58
Ask @ImaBrokeDude
He was working on something like that
Ivan Kochurkin
@KvanTTT
Jan 25 2016 11:51
It seems to me that Uniform Stretch now is not working for Polygon and Polyline.
Steven Kirk
@grokys
Jan 25 2016 11:54
any idea what's wrong with it?
i think the stretch algorithm for Shape was taken from moonlight
Ivan Kochurkin
@KvanTTT
Jan 25 2016 11:57
I know, I overload method MeasureOverride. So, do not merge my PR just now.
Why some SKIA Path tests skipped and marked as "FIXME"
SKIA renderer increases contour size with uniform scaling?
Ivan Kochurkin
@KvanTTT
Jan 25 2016 12:43

I think I'm right. So, that is the question occured. What is the best way to scale Thickness for Path, Polygon and Polyline (thickness is setting up here)? There are three strategies:

  • Average: ```(float)(pen.Thickness / ((Transform.M11 + Transform.M22) * 0.5));
    Avg
  • Min: ```(float)(pen.Thickness / Math.Min(Transform.M11, Transform.M22));
    Min
  • Max: ```(float)(pen.Thickness / Math.Max(Transform.M11, Transform.M22));
    Max

Direct 2D scales by the following way (Average):
Direct2D

So, I suppose to use Average strategy for non-uniform scaling (Stretch.Fill for example).

Steven Kirk
@grokys
Jan 25 2016 12:50
tbh - I have no idea!
when in doubt with such things i tend to look to WPF and HTML (or SVG in this case)
Ivan Kochurkin
@KvanTTT
Jan 25 2016 12:52
I think in this case Direct2D and Cairo is enough)
That is new unit-test is needed.
Ivan Kochurkin
@KvanTTT
Jan 25 2016 15:02
Skia can not render sharp joins. See this smaple. There is no differences between kMiter_Join and kBevel_Join enum. Is it a Skia bug?
Steven Kirk
@grokys
Jan 25 2016 15:39
@kekekeks is responsible for the skia stuff so best to ping him
Nikita Tsukanov
@kekekeks
Jan 25 2016 15:40
This message was deleted
Ivan Kochurkin
@KvanTTT
Jan 25 2016 15:45
Oh, It is not a bug. StrokeMiter should be setted up. paint.setStrokeMiter(10);
Nikita Tsukanov
@kekekeks
Jan 25 2016 15:47
Yep
Ivan Kochurkin
@KvanTTT
Jan 25 2016 15:48
But in Perspex Skia not configured and differs from Direct2D and Cairo.
Steven Kirk
@grokys
Jan 25 2016 16:43
just committed some improvements to devtool - when devtools is open, holding down ctrl+shift while hovering over a control will now move to that control in devtools
you have to move the mouse with the keys held though, as ctrl and shift don't currently trigger events
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 17:11
nice
can you add AutoScrollToSelectedItem to ListBox ?
Steven Kirk
@grokys
Jan 25 2016 17:40
yep, i can ;)
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 17:40
that would be nice
Steven Kirk
@grokys
Jan 25 2016 17:40
@danwalmsley has requested it as well
the question there is: in the case of multiple selection, what gets selected?
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 17:41
first item
Steven Kirk
@grokys
Jan 25 2016 17:41
yeah, that's what i was thinking
and if a new item is added to the existing multiple selection?
i was thinking that probably only single items should be scrolled to
so adding an item to a multiple selection wouldn't cause any scrolling
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 17:43
multiple item scrolling would make hard to select new items
Steven Kirk
@grokys
Jan 25 2016 17:43
well you have to bear in mind that this only affects selection via code, not user interaction
user interaction already scrolls
well, with keyboard anyway
and you can't select a non-visible item with the mouse ;)
are there other frameworks with a property like this? i would like to see what they do
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 17:51
no idea
Steven Kirk
@grokys
Jan 25 2016 17:52
ok, i'll go with my original thoughts and we'll change it from there if necessary
i think i will take a look at the layout problem first though
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 17:58
I am looking at this layout problem too
looks like something may be wrong with TabControl xaml template
will try something now
Steven Kirk
@grokys
Jan 25 2016 17:59
ah ok, i'll let you take a look first then ;)
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 18:00
success!
I have found the cause
If I change to this version the problem is gone
Steven Kirk
@grokys
Jan 25 2016 18:01
what did you change?
you have changed this template to use dockpanel
Steven Kirk
@grokys
Jan 25 2016 18:01
yeah, i figured it could be done more easily that way
is it a DockPanel bug?
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 18:02
dont know
Steven Kirk
@grokys
Jan 25 2016 18:02
Perspex/Perspex#348
could be that?
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 18:02
possible
in devtools dockpanel hase strange size
Steven Kirk
@grokys
Jan 25 2016 18:03
ok, it sounds like a DockPanel bug
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 18:04
not sure
Steven Kirk
@grokys
Jan 25 2016 18:04
i think the code for DockPanel can be drastically simplified as well
if that is indeed the problem
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 18:05
this may be also problem with style selector in TabControl.paml
Steven Kirk
@grokys
Jan 25 2016 18:06
i have to do something else for a little while
but please continue reporting your findings here
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 18:06
ok
Wiesław Šoltés
@wieslawsoltes
Jan 25 2016 18:19
@grokys Yep DockPanel issue:
<Window xmlns="https://github.com/perspex" Width="500" Height="400">
    <Grid ColumnDefinitions="*,250">
        <ScrollViewer Grid.Column="1">
            <DockPanel>
                <TextBlock Text="Top" DockPanel.Dock="Top" />
                <DockPanel>
                    <TextBlock Text="Top" DockPanel.Dock="Top" />
                    <StackPanel Background="Red">
                        <CheckBox Content="CheckBox1"/>
                        <CheckBox Content="CheckBox2"/>
                        <CheckBox Content="CheckBox3"/>
                        <CheckBox Content="CheckBox4"/>
                        <CheckBox Content="CheckBox5"/>
                        <CheckBox Content="CheckBox6"/>
                        <CheckBox Content="CheckBox7"/>
                        <CheckBox Content="CheckBox8"/>
                        <CheckBox Content="CheckBox9"/>
                    </StackPanel>
                </DockPanel>
            </DockPanel>
        </ScrollViewer>
    </Grid>
</Window>
Przechwytywanie.PNG
this layout is similar to Perspex/Perspex#397
Taryn
@Phrohdoh
Jan 25 2016 18:50
Hi all, is Linux/OS X support on the back burner atm?
Steven Kirk
@grokys
Jan 25 2016 18:51
no, it should be working using either cairo or skia
Nikita Tsukanov
@kekekeks
Jan 25 2016 18:51
Linux/OS X are working just fine
Taryn
@Phrohdoh
Jan 25 2016 18:51
Awesome, cloning atm.
Nikita Tsukanov
@kekekeks
Jan 25 2016 18:51
Skia still doesn't support FormattedText::SetForegroundBrush and has some minor rendering issues that you won't see in our test app
Mobile support is still experimental through
Gotta update that tinywm stuff
Taryn
@Phrohdoh
Jan 25 2016 18:52
I'm only looking to target desktop clients. :-)
Nikita Tsukanov
@kekekeks
Jan 25 2016 18:52
Then you should be fine
There is some guy who wants to use perspex on some ARM terminal with 64MB RAM
Taryn
@Phrohdoh
Jan 25 2016 18:57
So what are these paml files? Perspex's custom markup/xaml?
Steven Kirk
@grokys
Jan 25 2016 18:57
they're xaml files
we couldn't use the .xaml extension because VS treats them as WPF files
Taryn
@Phrohdoh
Jan 25 2016 18:58
Alright let's see if I can get this thing running.
Steven Kirk
@grokys
Jan 25 2016 18:58
i think there must be a way around this, but we've not really looked for it yet
Taryn
@Phrohdoh
Jan 25 2016 18:58
lol way to go
Steven Kirk
@grokys
Jan 25 2016 18:58
if you're an expert with VS extensions, help is appreciated ;)
Taryn
@Phrohdoh
Jan 25 2016 18:58
I'm not, I hardly touch VS (though I will be once I'm running a Windows machine again).
Just so you guys know wget doesn't exist on OS X by default.
I'll see if I can get getnatives working via curl
Taryn
@Phrohdoh
Jan 25 2016 19:06

Set the TestApplication project as the startup project and click Run.

There is no TestApplication project.

derp
ignore my idiocy.
My lunch is over. Hopefully I'll be back later and can help solve this.
Steven Kirk
@grokys
Jan 25 2016 19:30
we may need to update the build instructions for osx/linux
Steven Kirk
@grokys
Jan 25 2016 22:47
yeah, basically, DockPanel is completely wrong in just about every test i've done...
sorry @SuperJMN i'm going to remove your implementation and replace it with https://github.com/xyzzer/WinRTXamlToolkit/blob/master/WinRTXamlToolkit.UWP/Controls/DockPanel/DockPanel.cs
Steven Kirk
@grokys
Jan 25 2016 23:18
ok, that implementation seems to work according to my tests - @wieslawsoltes