File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
src/SharpIDE.Godot/Features/CodeEditor Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,14 @@ public partial class SharpIdeCodeEdit
1919 private bool _isCodeCompletionScrollHovered = false ;
2020 private bool _isCodeCompletionScrollPressed = false ;
2121 private const int MaxLines = 7 ;
22+
23+ private static readonly StyleBoxFlat SelectedCompletionStyle = new StyleBoxFlat
24+ {
25+ CornerRadiusTopLeft = 4 ,
26+ CornerRadiusTopRight = 4 ,
27+ CornerRadiusBottomLeft = 4 ,
28+ CornerRadiusBottomRight = 4
29+ } ;
2230
2331 private int ? GetCompletionOptionAtPoint ( Vector2I point )
2432 {
@@ -201,16 +209,16 @@ private void DrawCompletionsPopup()
201209 ) ;
202210
203211 var codeCompletionSelectedColor = GetThemeColor ( ThemeStringNames . CompletionSelectedColor ) ;
204- RenderingServer . Singleton . CanvasItemAddRect (
212+ SelectedCompletionStyle . BgColor = codeCompletionSelectedColor ;
213+ SelectedCompletionStyle . Draw (
205214 ci ,
206215 new Rect2 (
207216 new Vector2 (
208217 _codeCompletionRect . Position . X ,
209218 _codeCompletionRect . Position . Y + ( _codeCompletionCurrentSelected - _codeCompletionLineOfs ) * rowHeight
210219 ) ,
211220 new Vector2 ( _codeCompletionRect . Size . X , rowHeight )
212- ) ,
213- codeCompletionSelectedColor
221+ )
214222 ) ;
215223
216224 // TODO: Cache
You can’t perform that action at this time.
0 commit comments