diff --git a/app/src/main/java/com/coldmint/rust/pro/edit/autoComplete/AutoCompleteJob.kt b/app/src/main/java/com/coldmint/rust/pro/edit/autoComplete/AutoCompleteJob.kt index 17126ab..00895f5 100644 --- a/app/src/main/java/com/coldmint/rust/pro/edit/autoComplete/AutoCompleteJob.kt +++ b/app/src/main/java/com/coldmint/rust/pro/edit/autoComplete/AutoCompleteJob.kt @@ -1,7 +1,6 @@ package com.coldmint.rust.pro.edit.autoComplete import android.os.Bundle -import com.coldmint.rust.pro.edit.RustAutoComplete import com.coldmint.rust.pro.edit.RustCompletionItem import io.github.rosemoe.sora.lang.completion.CompletionPublisher import io.github.rosemoe.sora.text.CharPosition diff --git a/editor/src/main/java/io/github/rosemoe/sora/widget/SymbolInputView.java b/editor/src/main/java/io/github/rosemoe/sora/widget/SymbolInputView.java index e12f607..c854896 100644 --- a/editor/src/main/java/io/github/rosemoe/sora/widget/SymbolInputView.java +++ b/editor/src/main/java/io/github/rosemoe/sora/widget/SymbolInputView.java @@ -27,6 +27,7 @@ import android.content.Context; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.util.AttributeSet; +import android.util.Log; import android.widget.Button; import android.widget.LinearLayout; @@ -95,6 +96,8 @@ public class SymbolInputView extends LinearLayout { for (int i = 0; i < getChildCount(); i++) { ((Button) getChildAt(i)).setTextColor(color); } + + Log.i("SymbolInputView", "Set text color to " + color); textColor = color; } diff --git a/editor/src/main/java/io/github/rosemoe/sora/widget/base/EditorPopupWindow.java b/editor/src/main/java/io/github/rosemoe/sora/widget/base/EditorPopupWindow.java index efafab1..dfa8667 100644 --- a/editor/src/main/java/io/github/rosemoe/sora/widget/base/EditorPopupWindow.java +++ b/editor/src/main/java/io/github/rosemoe/sora/widget/base/EditorPopupWindow.java @@ -23,6 +23,7 @@ */ package io.github.rosemoe.sora.widget.base; +import android.util.Log; import android.view.Gravity; import android.view.View; import android.widget.PopupWindow; @@ -271,6 +272,7 @@ public class EditorPopupWindow { if (isShowing()) { return; } + Log.i("EditorPopupWindow", "Created a new window for editor"); applyWindowAttributes(true); } diff --git a/editor/src/main/java/io/github/rosemoe/sora/widget/component/DefaultCompletionItemAdapter.java b/editor/src/main/java/io/github/rosemoe/sora/widget/component/DefaultCompletionItemAdapter.java index 43c5257..70919a7 100644 --- a/editor/src/main/java/io/github/rosemoe/sora/widget/component/DefaultCompletionItemAdapter.java +++ b/editor/src/main/java/io/github/rosemoe/sora/widget/component/DefaultCompletionItemAdapter.java @@ -23,6 +23,7 @@ */ package io.github.rosemoe.sora.widget.component; +import android.graphics.Color; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; @@ -30,6 +31,8 @@ import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import androidx.core.content.ContextCompat; + import io.github.rosemoe.sora.R; import io.github.rosemoe.sora.widget.schemes.EditorColorScheme; @@ -53,13 +56,18 @@ public final class DefaultCompletionItemAdapter extends EditorCompletionAdapter } var item = getItem(pos); + + //编辑器代码提示文本渲染 TextView tv = view.findViewById(R.id.result_item_label); tv.setText(item.label); - tv.setTextColor(getThemeColor(EditorColorScheme.COMPLETION_WND_TEXT_PRIMARY)); +// tv.setTextColor(getThemeColor(EditorColorScheme.COMPLETION_WND_TEXT_PRIMARY)); + tv.setTextColor(ContextCompat.getColor(getContext(),R.color.defaultSymbolInputTextColor)); + tv = view.findViewById(R.id.result_item_desc); tv.setText(item.desc); - tv.setTextColor(getThemeColor(EditorColorScheme.COMPLETION_WND_TEXT_SECONDARY)); +// tv.setTextColor(getThemeColor(EditorColorScheme.COMPLETION_WND_TEXT_SECONDARY)); + tv.setTextColor(ContextCompat.getColor(getContext(),R.color.defaultSymbolInputTextColor)); view.setTag(pos); if (isCurrentCursorPosition) { diff --git a/editor/src/main/java/io/github/rosemoe/sora/widget/component/EditorDiagnosticTooltipWindow.kt b/editor/src/main/java/io/github/rosemoe/sora/widget/component/EditorDiagnosticTooltipWindow.kt index 6f6225c..a1b5822 100644 --- a/editor/src/main/java/io/github/rosemoe/sora/widget/component/EditorDiagnosticTooltipWindow.kt +++ b/editor/src/main/java/io/github/rosemoe/sora/widget/component/EditorDiagnosticTooltipWindow.kt @@ -25,6 +25,7 @@ package io.github.rosemoe.sora.widget.component import android.graphics.drawable.GradientDrawable +import android.util.Log import android.view.LayoutInflater import android.view.MotionEvent import android.view.View diff --git a/editor/src/main/res/layout/default_completion_result_item.xml b/editor/src/main/res/layout/default_completion_result_item.xml index 6030872..78f93ed 100644 --- a/editor/src/main/res/layout/default_completion_result_item.xml +++ b/editor/src/main/res/layout/default_completion_result_item.xml @@ -52,9 +52,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Medium Text" - android:textColor="#FF000000" - android:id="@+id/result_item_label" - android:textSize="15sp"/> + style="@style/TextAppearance.Material3.TitleSmall" + android:id="@+id/result_item_label" />