public CommonTextEditorOptions()
 {
     PropertyService.PropertyChanged += PropertyServiceChanged;
     base.FontName    = PropertyService.Get("FontName", FontService.MonospaceFontName);
     base.ColorScheme = IdeApp.Preferences.ColorScheme;
     FontService.RegisterFontChangedCallback("Editor", UpdateFont);
 }
 DefaultSourceEditorOptions(MonoDevelop.Ide.Gui.Content.TextStylePolicy currentPolicy)
 {
     LoadAllPrefs();
     UpdateStylePolicy(currentPolicy);
     PropertyService.PropertyChanged += UpdatePreferences;
     FontService.RegisterFontChangedCallback("Editor", UpdateFont);
     FontService.RegisterFontChangedCallback("MessageBubbles", UpdateFont);
 }
Exemple #3
0
 public CommonTextEditorOptions()
 {
     PropertyService.PropertyChanged += PropertyServiceChanged;
     base.FontName    = PropertyService.Get("FontName", MonoDevelop.Ide.DesktopService.DefaultMonospaceFont);
     base.ColorScheme = IdeApp.Preferences.ColorScheme;
     FontService.RegisterFontChangedCallback("Editor", UpdateFont);
     FontService.RegisterFontChangedCallback("Editor(Gutter)", UpdateFont);
 }
Exemple #4
0
 public CommonTextEditorOptions()
 {
     PropertyService.PropertyChanged += PropertyServiceChanged;
     base.FontName        = PropertyService.Get("FontName", MonoDevelop.Ide.DesktopService.DefaultMonospaceFont);
     base.ColorScheme     = PropertyService.Get("ColorScheme", "Default");
     base.UseAntiAliasing = PropertyService.Get("UseAntiAliasing", true);
     FontService.RegisterFontChangedCallback("Editor", UpdateFont);
 }
        DefaultSourceEditorOptions(TextStylePolicy currentPolicy)
        {
            wordNavigationStyle = ConfigurationProperty.Create("WordNavigationStyle", WordNavigationStyle.Windows);

            UpdateStylePolicy(currentPolicy);
            FontService.RegisterFontChangedCallback("Editor", UpdateFont);
            FontService.RegisterFontChangedCallback("MessageBubbles", UpdateFont);

            IdeApp.Preferences.ColorScheme.Changed += OnColorSchemeChanged;
        }
Exemple #6
0
        public void InitCell(Widget container, bool diffMode, string[] lines, TreePath path)
        {
            if (isDisposed)
            {
                return;
            }
            if (lines == null)
            {
                throw new ArgumentNullException("lines");
            }
            this.lines    = lines;
            this.diffMode = diffMode;
            this.path     = path;

            if (diffMode)
            {
                if (lines != null && lines.Length > 0)
                {
                    int maxlen = -1;
                    int maxlin = -1;
                    for (int n = 0; n < lines.Length; n++)
                    {
                        string line = ProcessLine(lines [n]);
                        if (line == null)
                        {
                            throw new Exception("Line " + n + " from diff was null.");
                        }
                        if (line.Length > maxlen)
                        {
                            maxlen = lines [n].Length;
                            maxlin = n;
                        }
                    }
                    DisposeLayout();
                    layout = CreateLayout(container, lines [maxlin]);
                    layout.GetPixelSize(out width, out lineHeight);
                    height = lineHeight * lines.Length;
                    width += LeftPaddingBlock + RightPadding;
                }
                else
                {
                    width = height = 0;
                }
            }
            else
            {
                DisposeLayout();
                layout = CreateLayout(container, string.Join(Environment.NewLine, lines));
                layout.GetPixelSize(out width, out height);
            }
            FontService.RegisterFontChangedCallback("Editor", OnDiffFontChanged);
            IdeApp.Preferences.CustomOutputPadFont.Changed += OnTextFontChanged;
        }
Exemple #7
0
        DefaultSourceEditorOptions(TextStylePolicy currentPolicy)
        {
            WordNavigationStyle defaultWordNavigation = WordNavigationStyle.Unix;

            if (Platform.IsWindows)
            {
                defaultWordNavigation = WordNavigationStyle.Windows;
            }
            wordNavigationStyle = ConfigurationProperty.Create("WordNavigationStyle", defaultWordNavigation);

            UpdateStylePolicy(currentPolicy);
            FontService.RegisterFontChangedCallback("Editor", UpdateFont);
            FontService.RegisterFontChangedCallback("MessageBubbles", UpdateFont);
        }
Exemple #8
0
 internal IdePreferences()
 {
     FontService.RegisterFontChangedCallback("OutputPad", delegate {
         if (CustomOutputPadFontChanged != null)
         {
             CustomOutputPadFontChanged(null, EventArgs.Empty);
         }
     });
     FontService.RegisterFontChangedCallback("Pad", delegate {
         if (CustomPadFontChanged != null)
         {
             CustomPadFontChanged(null, EventArgs.Empty);
         }
     });
 }