예제 #1
0
 public AppearanceControl(AppearanceDialogPage page)
 {
     this.InitializeComponent();
     this.m_AppearanceDialogPage = page;
     this.UpdateButtonColours();
     this.m_ColourThemeComboBox.Items.Clear();
     this.m_ColourThemeComboBox.Items.AddRange(Enum.GetNames(typeof(ColourTheme)));
     this.UpdateColourThemeComboBox();
     this.UpdateFontButton();
 }
예제 #2
0
        public void SetupBrushes(Settings settings)
        {
            AppearanceDialogPage appearance_settings = VSAnythingPackage.Inst.GetAppearanceDialogPage();

            this.m_BackgroundBrush            = new SolidBrush(appearance_settings.Colours.m_BackColour);
            this.m_SelectBarBrush             = new SolidBrush(appearance_settings.Colours.m_SelectColour);
            this.m_FileBrush                  = new SolidBrush(appearance_settings.Colours.m_ForeColour);
            this.m_FindTextBrush              = new SolidBrush(appearance_settings.Colours.m_CodeColour);
            this.m_HighlightBrush             = new SolidBrush(appearance_settings.Colours.m_HighlightColour);
            this.m_HighlightTextBrush         = new SolidBrush(appearance_settings.Colours.m_HighlightTextColour);
            this.m_SelectedHighlightTextBrush = new SolidBrush(appearance_settings.Colours.m_SelectedHighlightTextColour);
            this.m_FilenameBrush              = new SolidBrush(appearance_settings.Colours.m_CodeFilenameColour);
            Color sel_colour           = appearance_settings.Colours.m_SelectColour;
            Color highlight_bar_colour = Utils.Lerp(appearance_settings.Colours.m_BackColour, sel_colour, 0.1f);

            this.m_HighlightBarBrush = new SolidBrush(highlight_bar_colour);
            Color scroll_bar_colour = Utils.ModifyColour(appearance_settings.Colours.m_ControlColour, 50);

            this.m_ScrollBarBrush           = new SolidBrush(scroll_bar_colour);
            this.m_ScrollBarBackgroundBrush = new SolidBrush(Utils.Lerp(appearance_settings.Colours.m_BackColour, scroll_bar_colour, 0.3f));
            this.m_InfoItemBrush            = new SolidBrush(Utils.Lerp(appearance_settings.Colours.m_BackColour, appearance_settings.Colours.m_CodeFilenameColour, 0.3f));
        }