修复编辑器弹窗颜色问题
This commit is contained in:
parent
7c052f0f7a
commit
3fc7bbc769
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
Loading…
Reference in New Issue
Block a user