Merge pull request #2763 from AmnonOwed/FixCodeCompletionBoxDisplayWin8

Prevent unnecessary scroll bars in code completion popup
This commit is contained in:
Manindra Moharana
2014-08-09 10:16:56 +05:30

View File

@@ -189,6 +189,9 @@ public class CompletionPanel {
float h = itemHeight * (itemCount);
if (itemCount >= 4)
h += itemHeight * 0.3; // a bit of offset
return Math.min(maxHeight, (int) h); // popup menu height
}
@@ -212,7 +215,7 @@ public class CompletionPanel {
if(w == maxWidth)
horizontalScrollBarVisible = true;
w += editor.dmode.classIcon.getIconWidth(); // add icon width too!
w += fm.stringWidth(" "); // a bit of offset
w += fm.stringWidth(" "); // a bit of offset
//log("popup width " + w);
return w; // popup menu width
}