private SourceEditorPrintSettings()
        {
            var font = Xwt.Drawing.Font.FromName(DefaultSourceEditorOptions.Instance.FontName);

            if (font == null)
            {
                LoggingService.LogWarning("Could not load font: {0}", DefaultSourceEditorOptions.Instance.FontName);
            }
            else
            {
                Font = font.ToPangoFont();
            }

            if (Font == null || String.IsNullOrEmpty(Font.Family))
            {
                Font = Pango.FontDescription.FromString(TextEditorOptions.DEFAULT_FONT);
            }
            if (Font != null)
            {
                Font.Size = (int)(Font.Size * 0.5);
            }
            TabSize               = DefaultSourceEditorOptions.Instance.TabSize;
            HeaderFormat          = "%F";
            FooterFormat          = GettextCatalog.GetString("Page %N of %Q");
            EditorTheme           = SyntaxHighlightingService.GetDefaultColorStyleName(MonoDevelop.Ide.Theme.Light);
            HeaderSeparatorWeight = FooterSeparatorWeight = 0.5;
            HeaderPadding         = FooterPadding = 6;
            UseHighlighting       = true;
        }
Exemple #2
0
            protected override string OnGetValue()
            {
                var style = base.OnGetValue();

                if (SyntaxHighlightingService.ContainsStyle(style))
                {
                    return(style);
                }

                var defaultStyle = SyntaxHighlightingService.GetDefaultColorStyleName();

                LoggingService.LogWarning("Highlighting Theme \"{0}\" not found, using default \"{1}\" instead", style, defaultStyle);
                Value = defaultStyle;
                return(SyntaxHighlightingService.GetDefaultColorStyleName());
            }