private void BackgroundColorsForLinux(IBloomTabArea currentTabView)
        {
            if (currentTabView.ToolStripBackground == null)
            {
                var bmp = new Bitmap(_toolStrip.Width, _toolStrip.Height);
                using (var g = Graphics.FromImage(bmp))
                {
                    using (var b = new SolidBrush(_panelHoldingToolStrip.BackColor))
                    {
                        g.FillRectangle(b, 0, 0, bmp.Width, bmp.Height);
                    }
                }
                currentTabView.ToolStripBackground = bmp;
            }

            _toolStrip.BackgroundImage = currentTabView.ToolStripBackground;
        }
Example #2
0
        private void SelectPage(Control view)
        {
            CurrentTabView = view as IBloomTabArea;
            //SetTabVisibility(_infoTab, false); //we always hide this after it is used

            if(_previouslySelectedControl !=null)
                _containerPanel.Controls.Remove(_previouslySelectedControl);

            view.Dock = DockStyle.Fill;
            _containerPanel.Controls.Add(view);

            _toolSpecificPanel.Controls.Clear();

            _panelHoldingToolStrip.BackColor = CurrentTabView.TopBarControl.BackColor = _tabStrip.BackColor;
            CurrentTabView.TopBarControl.Dock = DockStyle.Left;
            if(CurrentTabView!=null)//can remove when we get rid of info view
                _toolSpecificPanel.Controls.Add(CurrentTabView.TopBarControl);

            _selectedTabAboutToChangeEvent.Raise(new TabChangedDetails()
            {
                From = _previouslySelectedControl,
                To = view
            });

            _selectedTabChangedEvent.Raise(new TabChangedDetails()
                                            {
                                                From = _previouslySelectedControl,
                                                To = view
                                            });

            _previouslySelectedControl = view;
        }
Example #3
0
        private void BackgroundColorsForLinux(IBloomTabArea currentTabView)
        {
            if (currentTabView.ToolStripBackground == null)
            {
                var bmp = new Bitmap(_toolStrip.Width, _toolStrip.Height);
                using (var g = Graphics.FromImage(bmp))
                {
                    using (var b = new SolidBrush(_panelHoldingToolStrip.BackColor))
                    {
                        g.FillRectangle(b, 0, 0, bmp.Width, bmp.Height);
                    }
                }
                currentTabView.ToolStripBackground = bmp;
            }

            _toolStrip.BackgroundImage = currentTabView.ToolStripBackground;
        }