diff options
author | Vsevolod Kukol <sevoku@xamarin.com> | 2015-12-18 15:34:52 +0300 |
---|---|---|
committer | Vsevolod Kukol <sevoku@xamarin.com> | 2015-12-18 15:34:52 +0300 |
commit | 7b8995b2085500c1cc3188767456c91e366d10e4 (patch) | |
tree | 6a65b8e14c288be31168296710a1bb3ad2459fa9 /main | |
parent | 8dfc4f8111ecd6b45ff53d69cd357fecb173eb62 (diff) |
[Ide] Custom completion list category font
Diffstat (limited to 'main')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs index ca087d2281..de097c1275 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs @@ -126,7 +126,7 @@ namespace MonoDevelop.Ide.CodeCompletion } } - FontDescription itemFont, noMatchFont; + FontDescription itemFont, noMatchFont, categoryFont; const int marginIconSpacing = 4; const int iconTextSpacing = 6; @@ -139,15 +139,20 @@ namespace MonoDevelop.Ide.CodeCompletion if (itemFont != null) itemFont.Dispose (); + + if (categoryFont != null) + categoryFont.Dispose (); if (noMatchFont != null) noMatchFont.Dispose (); - + itemFont = FontService.MonospaceFont.Copy (); + categoryFont = FontService.MonospaceFont.Copy (); noMatchFont = FontService.SansFont.Copy (); // VV: prepared for further font tweaks when we have new fonts in var newItemFontSize = itemFont.Size; + var newCategoryFontSize = categoryFont.Size; var newNoMatchFontSize = noMatchFont.Size; if (newItemFontSize > 0) { @@ -155,6 +160,11 @@ namespace MonoDevelop.Ide.CodeCompletion layout.FontDescription = itemFont; } + if (newCategoryFontSize > 0) { + categoryFont.Size = (int)newCategoryFontSize; + categoryLayout.FontDescription = categoryFont; + } + if (newNoMatchFontSize > 0) { noMatchFont.Size = (int)newNoMatchFontSize; noMatchLayout.FontDescription = noMatchFont; |