| | |
| | | { |
| | | foreach (CrownDockContent content in orderedContent) |
| | | { |
| | | CrownDockTab tab = _tabs[content]; |
| | | Rectangle closeRect = new(tab.ClientRectangle.Right - 7 - closeButtonSize - 1, |
| | | tab.ClientRectangle.Top + (tab.ClientRectangle.Height / 2) - (closeButtonSize / 2) - 1, |
| | | closeButtonSize, closeButtonSize); |
| | | tab.CloseButtonRectangle = closeRect; |
| | | if (content.IsShowCloseIcon) |
| | | { |
| | | CrownDockTab tab = _tabs[content]; |
| | | Rectangle closeRect = new(tab.ClientRectangle.Right - 7 - closeButtonSize - 1, |
| | | tab.ClientRectangle.Top + (tab.ClientRectangle.Height / 2) - (closeButtonSize / 2) - 1, |
| | | closeButtonSize, closeButtonSize); |
| | | tab.CloseButtonRectangle = closeRect; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | Graphics g = e.Graphics; |
| | | |
| | | using (SolidBrush b = new(ThemeProvider.Theme.Colors.GreyBackground)) |
| | | using (SolidBrush b = new(System.Drawing.Color.White))//tangxu ThemeProvider.Theme.Colors.GreyBackground)) |
| | | { |
| | | g.FillRectangle(b, ClientRectangle); |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | using (SolidBrush b = new(ThemeProvider.Theme.Colors.MediumBackground)) |
| | | using (SolidBrush b = new(System.Drawing.Color.White))//tangxu ThemeProvider.Theme.Colors.MediumBackground)) |
| | | { |
| | | g.FillRectangle(b, _tabArea.ClientRectangle); |
| | | } |
| | |
| | | { |
| | | // Color divider |
| | | bool isActiveGroup = DockPanel.ActiveGroup == this; |
| | | Color divColor = isActiveGroup ? ThemeProvider.Theme.Colors.BlueSelection : ThemeProvider.Theme.Colors.GreySelection; |
| | | Color divColor = isActiveGroup ? ThemeProvider.Theme.Colors.BlueSelection : System.Drawing.Color.White;// ThemeProvider.Theme.Colors.GreySelection; |
| | | using (SolidBrush b = new(divColor)) |
| | | { |
| | | Rectangle divRect = new(_tabArea.ClientRectangle.Left, _tabArea.ClientRectangle.Bottom - 2, _tabArea.ClientRectangle.Width, 2); |
| | |
| | | // Content dropdown list |
| | | Rectangle dropdownRect = new(_tabArea.DropdownRectangle.Left, _tabArea.DropdownRectangle.Top, _tabArea.DropdownRectangle.Width, _tabArea.DropdownRectangle.Height - 2); |
| | | |
| | | using (SolidBrush b = new(ThemeProvider.Theme.Colors.MediumBackground)) |
| | | using (SolidBrush b = new(System.Drawing.Color.White))//tangxu 箭头背景色 ThemeProvider.Theme.Colors.MediumBackground)) |
| | | { |
| | | g.FillRectangle(b, dropdownRect); |
| | | } |
| | | |
| | | using Bitmap img = Properties.Resources.arrow; |
| | | using Bitmap img = Properties.Resources.arrow;//箭头是灰色, 以后改成别的颜色 |
| | | g.DrawImageUnscaled(img, dropdownRect.Left + (dropdownRect.Width / 2) - (img.Width / 2), dropdownRect.Top + (dropdownRect.Height / 2) - (img.Height / 2) + 1); |
| | | } |
| | | } |
| | |
| | | bool isVisibleTab = VisibleContent == tab.DockContent; |
| | | bool isActiveGroup = DockPanel.ActiveGroup == this; |
| | | |
| | | Color bgColor = isVisibleTab ? ThemeProvider.Theme.Colors.BlueSelection : ThemeProvider.Theme.Colors.DarkBackground; |
| | | Color bgColor = isVisibleTab ? ThemeProvider.Theme.Colors.BlueSelection : System.Drawing.Color.White;// ThemeProvider.Theme.Colors.DarkBackground; |
| | | |
| | | if (!isActiveGroup) |
| | | { |
| | | bgColor = isVisibleTab ? ThemeProvider.Theme.Colors.GreySelection : ThemeProvider.Theme.Colors.DarkBackground; |
| | | } |
| | | //if (!isActiveGroup) |
| | | //{ |
| | | // bgColor = isVisibleTab ? ThemeProvider.Theme.Colors.GreySelection : System.Drawing.Color.White;//ThemeProvider.Theme.Colors.DarkBackground; |
| | | // //bgColor = isVisibleTab ? : ThemeProvider.Theme.Colors.DarkBackground; |
| | | //} |
| | | |
| | | if (tab.Hot && !isVisibleTab) |
| | | { |
| | | bgColor = ThemeProvider.Theme.Colors.MediumBackground; |
| | | bgColor = System.Drawing.Color.Gray;// ThemeProvider.Theme.Colors.MediumBackground; |
| | | } |
| | | |
| | | |
| | | using (SolidBrush b = new(bgColor)) |
| | | { |
| | | g.FillRectangle(b, tabRect); |
| | |
| | | img = tab.CloseButtonHot ? Properties.Resources.close_selected : Properties.Resources.active_inactive_close; |
| | | } |
| | | } |
| | | |
| | | Rectangle closeRect = RectangleToTabArea(tab.CloseButtonRectangle); |
| | | g.DrawImageUnscaled(img, closeRect.Left, closeRect.Top); |
| | | if (tab.DockContent == null || tab.DockContent.IsShowCloseIcon) |
| | | { |
| | | Rectangle closeRect = RectangleToTabArea(tab.CloseButtonRectangle); |
| | | g.DrawImageUnscaled(img, closeRect.Left, closeRect.Top); |
| | | } |
| | | } |
| | | |
| | | private void PaintToolWindowTab(Graphics g, CrownDockTab tab) |
| | |
| | | bool isVisibleTab = VisibleContent == tab.DockContent; |
| | | |
| | | Color bgColor = isVisibleTab ? ThemeProvider.Theme.Colors.GreyBackground : ThemeProvider.Theme.Colors.DarkBackground; |
| | | |
| | | //System.Drawing.Color.White : System.Drawing.Color.Gray;// |
| | | if (tab.Hot && !isVisibleTab) |
| | | { |
| | | bgColor = ThemeProvider.Theme.Colors.MediumBackground; |
| | | bgColor = System.Drawing.Color.Gray;//ThemeProvider.Theme.Colors.MediumBackground; |
| | | } |
| | | |
| | | using (SolidBrush b = new(bgColor)) |