mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 10:30:44 +01:00
Merge pull request #2763 from AmnonOwed/FixCodeCompletionBoxDisplayWin8
Prevent unnecessary scroll bars in code completion popup
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user