mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fix: Scrolling inside DarkListView and DarkMenuContainer based on Font.GetLineSpacing()
This commit is contained in:
parent
12247df512
commit
97b65c7ea1
2 changed files with 23 additions and 0 deletions
|
@ -1028,6 +1028,12 @@ namespace Beefy.theme.dark
|
||||||
mScrollContentInsets.mBottom += GS!(2);
|
mScrollContentInsets.mBottom += GS!(2);
|
||||||
|
|
||||||
base.InitScrollbars(wantHorz, wantVert);
|
base.InitScrollbars(wantHorz, wantVert);
|
||||||
|
|
||||||
|
float scrollIncrement = this.mFont.GetLineSpacing();
|
||||||
|
if (mHorzScrollbar != null)
|
||||||
|
mHorzScrollbar.mScrollIncrement = scrollIncrement;
|
||||||
|
if (mVertScrollbar != null)
|
||||||
|
mVertScrollbar.mScrollIncrement = scrollIncrement;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override ListViewItem CreateListViewItem()
|
protected override ListViewItem CreateListViewItem()
|
||||||
|
|
|
@ -239,6 +239,23 @@ namespace Beefy.theme.dark
|
||||||
MarkDirty();
|
MarkDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void InitScrollbars(bool wantHorz, bool wantVert)
|
||||||
|
{
|
||||||
|
if (!wantHorz)
|
||||||
|
mScrollContentInsets.mBottom += GS!(2);
|
||||||
|
|
||||||
|
base.InitScrollbars(wantHorz, wantVert);
|
||||||
|
|
||||||
|
float scrollIncrement = 0;
|
||||||
|
if (var darkMenuWidget = mScrollContent as DarkMenuWidget)
|
||||||
|
scrollIncrement = darkMenuWidget.mFont.GetLineSpacing();
|
||||||
|
|
||||||
|
if (mHorzScrollbar != null)
|
||||||
|
mHorzScrollbar.mScrollIncrement = scrollIncrement;
|
||||||
|
if (mVertScrollbar != null)
|
||||||
|
mVertScrollbar.mScrollIncrement = scrollIncrement;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DarkMenuWidget : MenuWidget
|
public class DarkMenuWidget : MenuWidget
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue