Skip to content

Commit

Permalink
experimenting with linux compositors
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatao Li committed Sep 30, 2019
1 parent 9bf977c commit 9f21a50
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions Views/MainWindow.xaml.fs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type MainWindow() as this =
#endif

DragDrop.SetAllowDrop(this, true)
configBackground()

let flushop =
if RuntimeInformation.IsOSPlatform(OSPlatform.Linux) then
Expand Down
12 changes: 10 additions & 2 deletions ui.fs
Original file line number Diff line number Diff line change
Expand Up @@ -441,5 +441,13 @@ let SetWindowBackgroundComposition (win: Avalonia.Controls.Window) (composition:
let c = Color(byte(op * 255.0), c.R, c.G, c.B)
win.Background <- SolidColorBrush(c)
ignore <| vh_add_view(win.PlatformImpl.Handle.Handle)
()

elif RuntimeInformation.IsOSPlatform(OSPlatform.Linux) then
match composition with
| SolidBackground c ->
win.Background <- SolidColorBrush(c)
| GaussianBlur(op, c)
| AdvancedBlur(op, c) ->
(*let c = Color(byte(op * 255.0), c.R, c.G, c.B)*)
let c = Color(0uy,0uy,0uy,0uy)
win.Background <- SolidColorBrush(c)
(*ignore <| vh_add_view(win.PlatformImpl.Handle.Handle)*)

0 comments on commit 9f21a50

Please sign in to comment.