Skip to content

Commit

Permalink
Merge branch 'net6'
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatao Li committed Mar 11, 2022
2 parents 0190abd + b6045bd commit 76a08f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions ViewModels/GridViewModel.fs
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,8 @@ and GridViewModel(_gridid: int, ?_parent: GridViewModel, ?_gridsize: GridSize) a
#endif
m_bufnr <- 0

member __.GetRootGrid() =
getRootGrid()
(******************* Exposed properties ***********************)

member __.Item with get(row, col) = m_gridbuffer.[row, col]
Expand Down
9 changes: 6 additions & 3 deletions Views/Grid.xaml.fs
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,10 @@ type Grid() as this =
for tup in vm.ExtmarksOob.Values do
drawGuiWidgets tup

let scrollbar_bg_color = m_scrollbar_bg.ToUint32() ||| 0xff000000u
|> Color.FromUInt32
let scrollbar_cursor_color = grid_vm.GetRootGrid().CursorInfo.bg

let drawScrollbar() =
// scrollbar
// todo mouse over opacity adjustment
Expand All @@ -423,8 +427,7 @@ type Grid() as this =
let sign_w = 4.0
// -- bg
let bar_x = vm_x + vm_w - bar_w
let c = m_scrollbar_bg.ToUint32() ||| 0xff000000u
m_gadget_brush.Color <- Color.FromUInt32(c)
m_gadget_brush.Color <- scrollbar_bg_color
m_gadget_brush.Opacity <- 0.5
ctx.FillRectangle(m_gadget_brush, Rect(bar_x, vm_y, bar_w, vm_h))
// -- fg
Expand All @@ -441,7 +444,7 @@ type Grid() as this =
if line_count > 0.0 then
let cur_y = cur_row / line_count * vm_h
let cur_h = 2.0
m_gadget_brush.Color <- vm.CursorInfo.bg
m_gadget_brush.Color <- scrollbar_cursor_color
m_gadget_brush.Opacity <- 1.0
ctx.FillRectangle(m_gadget_brush, Rect(bar_x, vm_y + cur_y, bar_w, cur_h))
// -- signs
Expand Down

0 comments on commit 76a08f0

Please sign in to comment.