MaterialSkin
MaterialSkin copied to clipboard
New Contribution
First, very good, I recommend.
Second, during development I came across some problems and would like to share:
1- In the ListBox, when I put inside a panel or Tab, it was necessary to add an extra size [Line 769] if (_scrollBar.Maximum < _scrollBar.Value + Height + 44) _scrollBar.Value = _scrollBar.Maximum - Height + 44;
2- In TabSelector I added a property for the user to choose the size of the Tab:
private int _tab_width;
[Category("Material Skin"), Browsable(true), DisplayName("Tab Width"), DefaultValue(100)]
public int TabWidthTab
{
get { return _tab_width; }
set
{
if (value < 1)
throw new ArgumentOutOfRangeException("Tab Width", value, "Value should be > 0");
else
{
_tab_width = value;
refresh();
}
}
}
In the constructor: TabWidthTab = 100;
On UpdateTabRects:
if (i==0)
_tabRects.Add(new Rectangle(FIRST_TAB_PADDING - (TAB_HEADER_PADDING), 0, TabWidthTab, Height));
else
_tabRects.Add(new Rectangle(_tabRects[i - 1].Right, 0, TabWidthTab, Height));
If you can, please open a new pull request with your fix