These are chat archives for AvaloniaUI/Avalonia

11th
May 2018
Rayyan Tahir
@RayyanTahir
May 11 2018 08:27

@danwalmsley and @Sorien this didn't work either:
https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Themes.Default/ScrollBar.xaml#L123

Maybe I need to set in more than one places? Anyways I'll set them all to find out which of those to set. ;)

Stano Turza
@Sorien
May 11 2018 08:51
hmm it should work when i change it to <Border Background="Red" /> i'll get that area with red color
Rayyan Tahir
@RayyanTahir
May 11 2018 08:52
I tried with Transparent, let me check with Red
Anything but Transparent does work, which means, I'll need to set Transparent in more than one places
Rayyan Tahir
@RayyanTahir
May 11 2018 08:58
Trying
That worked, Thanks @Sorien
Setting both lines did the trick
:smile:
danwalmsley
@danwalmsley
May 11 2018 11:31
@grokys #1544 is ready for approval now?
@kekekeks are you able to approve #1574? this is just fixing broken functionality that was introduced by the CanResize PR, preventing me from updating avalonia on AvalonStudio
we could implement the updateStyles function as you suggest, but it should be part of a separate PR
Rayyan Tahir
@RayyanTahir
May 11 2018 11:46
Is there an Avalonia's impl similar to WPF's CollectionViewSource?
I want to filter my bound items in ListBox
Steven Kirk
@grokys
May 11 2018 11:50
@RayyanTahir use a rxui derived collection
@danwalmsley sorry not had time to re-review yet
Rayyan Tahir
@RayyanTahir
May 11 2018 11:51
right, thanks
Stano Turza
@Sorien
May 11 2018 12:34
@grokys any idea how to extended clipping area for deffered node rendering i have some basic effect implementation but have to solve that clippings
image.png
its shadow effect (its backgraound) you can see its clipped from right/bottom
Steven Kirk
@grokys
May 11 2018 12:37
hmmm
Steven Kirk
@grokys
May 11 2018 12:45
the clip bounds come from the scene graph nodes
i assume you're associating an effect with a scene graph node?
if so we might want to just allow affects to modify the scene node bounds?
var clipBounds = clipToBounds ?
    bounds.TransformToAABB(contextImpl.Transform).Intersect(clip) :
    clip;

clipBounds = node?.Effect.ModifyClipBounds(clipBounds) ?? clipBounds;
would something like that work?
Stano Turza
@Sorien
May 11 2018 12:50
i'll try
Steven Kirk
@grokys
May 11 2018 12:51
though that will modify the clip bounds for the control content as well
hmm
maybe there should be 2 sets of clip bounds
or maybe effects shouldn't be clipped?
are effects clipped on WPF/UWP?
Stano Turza
@Sorien
May 11 2018 12:55
hmm not sure about WPF/UWP i think in html they are clipped
Steven Kirk
@grokys
May 11 2018 12:55
i think it's worth doing some research there before deciding how to do it
Stano Turza
@Sorien
May 11 2018 13:08
// i end up with effect as part of draw operation
Benedikt Schroeder
@Gillibald
May 11 2018 14:26
I will not introduce definable FontFallbacks for now. It is not easy to implement with SharpDx. It seems some bindings for FontFallbackBuilder are not implemented properly. Maybe we need a font shaping library in the future to support fallbacks and render glyphs ourselves. That's probably a thing in the future I don't know a library that already supports all render backends and platforms that Avalonia supports.
Benedikt Schroeder
@Gillibald
May 11 2018 14:40
Okay just realized that even if SharpDx had proper bindings we could not use FontFallback
IDWriteFontFallback is only supported for Windows 8.1 and above.
ahopper
@ahopper
May 11 2018 15:00
@Gillibald what is the issue with doing fallback at a higher level?
Benedikt Schroeder
@Gillibald
May 11 2018 15:08
@ahopper The only fallback that makes sense is the fallback for non present glyphs. If a font isnt installed on the system you can always pack them into the application per resources. Or what do you mean by higher Level?
Skia and DirectWrite still have build in fallbacks but you can't modify them
ahopper
@ahopper
May 11 2018 15:12
I may well misunderstand what you mean by fallback but I was thinking in terms of the case of providing a list in code or xaml and picking the first that is available
danwalmsley
@danwalmsley
May 11 2018 15:14
Fallback isn't required for embedded fonts
Because then you know the font exists
ahopper
@ahopper
May 11 2018 15:17
I guess I'm missing something here but if you ask for a font and not get it can't you simply try the next one without going to the platformImpl
Benedikt Schroeder
@Gillibald
May 11 2018 15:18
Thats quiet simple to achieve but will not match what is done under WPF etc. You define a Fallback like so:
FontFamily="FontFamilyA, FontFamilyB, FontFamilyC"
If FontFamilyA is missing on the System FontFamilyB is used and so on until None is present and the Default is used.
ahopper
@ahopper
May 11 2018 15:21
so is the issue that if you ask for FontFamilyA you might get the system fallback rather than FontFamilyB and not know?
Benedikt Schroeder
@Gillibald
May 11 2018 15:22
Thats only one way a fallback works. Under WPF a fallback also works for glyphs. If you have a text and a character can't be mapped to a glyph a the current font the Framework tries to find a glyph in the defined fallback.
Thats more advanced
ahopper
@ahopper
May 11 2018 15:23
so when you ask the system for a font, do you know what you actually get?
Benedikt Schroeder
@Gillibald
May 11 2018 15:24
Yes. I always know if a font is installed or not and can use the default.
That part isn't a problem. We just can't support fallbacks for glyphs. If we can live with that I will just implement the simple fallback.
ahopper
@ahopper
May 11 2018 15:25
so you can cope with your example above?
Rayyan Tahir
@RayyanTahir
May 11 2018 15:25
Do we have an impl similar to NotifyIcon of System.Windows.Forms?
I want to add Icon and menu item in system tray
ahopper
@ahopper
May 11 2018 15:28
@Gillibald I'm starting to get the picture, but the halfway house might still be useful
Benedikt Schroeder
@Gillibald
May 11 2018 15:28
The simple fallback for non installed fonts is already available in my current implementation. Wasn't sure if that is enough. If thats the behavior you would expect from a font family fallback it is fine for me.
ahopper
@ahopper
May 11 2018 15:32
is searching for missing glyphs (and maybe caching) too expensive? Sorry just thinking out loud.
Rayyan Tahir
@RayyanTahir
May 11 2018 15:33
ListBox.ItemCount always returns 0. I bound it with RxUI list
Benedikt Schroeder
@Gillibald
May 11 2018 15:33
That is already done by the render backends so it should not make a difference but we have no control over it so we have to implement our own logic.
ahopper
@ahopper
May 11 2018 15:36
@Gillibald I've just got the bigger picture, thanks, sorry if I've wasted you time.
Benedikt Schroeder
@Gillibald
May 11 2018 15:37
I can live with the simple approach for now. We can add more features in the future.