当Alignment =TabAlignment.Bottom时,页签文字偏上问题修复。
This commit is contained in:
parent
a756a94193
commit
3143d2f775
@ -476,8 +476,14 @@ namespace Sunny.UI
|
||||
if (TabSelectedHighColorSize > 0)
|
||||
g.FillRectangle(TabSelectedHighColor, 0, bmp.Height - TabSelectedHighColorSize, bmp.Width, TabSelectedHighColorSize);
|
||||
}
|
||||
|
||||
g.DrawString(TabPages[index].Text, Font, index == SelectedIndex ? tabSelectedForeColor : TabUnSelectedForeColor, textLeft, 2 + (TabRect.Height - sf.Height - 4) / 2.0f);
|
||||
if(Alignment ==TabAlignment.Bottom )
|
||||
{
|
||||
g.DrawString(TabPages[index].Text, Font, index == SelectedIndex ? tabSelectedForeColor : TabUnSelectedForeColor, textLeft, 2 + (TabRect.Height - sf.Height + 4) / 2.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
g.DrawString(TabPages[index].Text, Font, index == SelectedIndex ? tabSelectedForeColor : TabUnSelectedForeColor, textLeft, 2 + (TabRect.Height - sf.Height - 4) / 2.0f);
|
||||
}
|
||||
|
||||
var menuItem = Helper[index];
|
||||
bool show1 = TabPages[index].Text != MainPage;
|
||||
|
Loading…
x
Reference in New Issue
Block a user