6.6.2 - Alpha5 - 代码编辑器标题文字支持字体大小自适应

This commit is contained in:
SuperMonster003
2025-03-24 19:51:24 +08:00
parent 2235cba860
commit fb93e169cb
8 changed files with 212 additions and 100 deletions

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

View File

@@ -1,44 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:orientation="horizontal">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="?attr/actionBarSize"
android:layout_gravity="end"
android:orientation="horizontal">
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/step_over"
android:layout_width="40dp"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
app:icon="@drawable/ic_debug_step_over"
app:text="@string/text_debug_step_over"/>
app:text="@string/text_debug_step_over" />
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/step_into"
android:layout_width="40dp"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
app:icon="@drawable/ic_debug_step_into"
app:text="@string/text_debug_step_into"/>
app:text="@string/text_debug_step_into" />
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/step_out"
android:layout_width="40dp"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
app:icon="@drawable/ic_debug_step_out"
app:text="@string/text_debug_step_out"/>
app:text="@string/text_debug_step_out" />
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/resume"
android:layout_width="40dp"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
app:icon="@drawable/ic_play_arrow_white_48dp"
app:text="@string/text_debug_resume_script"/>
app:text="@string/text_debug_resume_script" />
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/force_stop"
android:layout_width="40dp"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
app:icon="@drawable/ic_close_white_48dp"
app:text="@string/text_stop"/>
app:text="@string/text_stop" />
</LinearLayout>

View File

@@ -1,38 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:orientation="horizontal">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="?attr/actionBarSize"
android:layout_gravity="end"
android:orientation="horizontal">
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/run"
android:layout_width="40dp"
android:layout_height="match_parent"
app:icon="@drawable/ic_play_arrow_white_48dp"
app:text="@string/text_run_simplified" />
android:id="@+id/run"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
app:icon="@drawable/ic_play_arrow_white_48dp"
app:text="@string/text_run_simplified" />
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/undo"
android:layout_width="40dp"
android:layout_height="match_parent"
app:icon="@drawable/ic_undo_white_48dp"
app:text="@string/text_undo_simplified" />
android:id="@+id/undo"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
app:icon="@drawable/ic_undo_white_48dp"
app:text="@string/text_undo_simplified" />
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/redo"
android:layout_width="40dp"
android:layout_height="match_parent"
app:icon="@drawable/ic_redo_white_48dp"
app:text="@string/text_redo_simplified" />
android:id="@+id/redo"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
app:icon="@drawable/ic_redo_white_48dp"
app:text="@string/text_redo_simplified" />
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/save"
android:layout_width="40dp"
android:layout_height="match_parent"
android:enabled="false"
app:icon="@drawable/ic_save_white_48dp"
app:text="@string/text_save_simplified" />
android:id="@+id/save"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
android:enabled="false"
app:icon="@drawable/ic_save_white_48dp"
app:text="@string/text_save_simplified" />
</LinearLayout>

View File

@@ -1,37 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:orientation="horizontal">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="?attr/actionBarSize"
android:layout_gravity="end"
android:orientation="horizontal">
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/replace"
android:layout_width="40dp"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
app:icon="@drawable/ic_ali_replace"
app:text="@string/text_replace_simplified"/>
app:text="@string/text_replace_simplified" />
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/find_prev"
android:layout_width="40dp"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
app:icon="@drawable/ic_ali_up"
app:text="@string/text_find_prev_simplified"/>
app:text="@string/text_find_prev_simplified" />
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/find_next"
android:layout_width="40dp"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
app:icon="@drawable/ic_ali_down"
app:text="@string/text_find_next_simplified"/>
app:text="@string/text_find_next_simplified" />
<org.autojs.autojs.ui.widget.ToolbarMenuItem
android:id="@+id/cancel_search"
android:layout_width="40dp"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="match_parent"
app:icon="@drawable/ic_close_white_48dp"
app:text="@string/text_cancel_simplified"/>
app:text="@string/text_cancel_simplified" />
</LinearLayout>

View File

@@ -1,29 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="?selectableItemBackgroundBorderless"
android:orientation="vertical">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="@dimen/toolbar_menu_item_width"
android:layout_height="?attr/actionBarSize"
android:gravity="center"
android:layout_gravity="center"
android:background="?selectableItemBackgroundBorderless"
android:orientation="vertical">
<ImageView
android:id="@+id/icon"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:paddingBottom="20dp"
android:paddingTop="10dp"
tools:src="@drawable/autojs6_material" />
android:id="@+id/icon"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
android:paddingBottom="23dp"
android:paddingTop="5dp"
tools:src="@drawable/autojs6_material" />
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-20dp"
android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
android:textSize="12sp"
tools:textColor="@color/day_night"
tools:text="@string/text_sample_string" />
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-23dp"
android:gravity="center"
android:maxLines="1"
android:ellipsize="end"
android:textSize="12sp"
tools:textColor="@color/day_night"
tools:text="@string/text_sample_string" />
</LinearLayout>

View File

@@ -23,7 +23,15 @@
<dimen name="snackbar_padding_horizontal">12dp</dimen>
<dimen name="snackbar_padding_vertical">14dp</dimen>
<dimen name="snackbar_text_size">14sp</dimen>
<dimen name="editor_title_text_size">18sp</dimen>
<dimen name="editor_title_text_size">19sp</dimen>
<dimen name="editor_title_text_size_double_line_ascii">19sp</dimen>
<dimen name="editor_title_text_size_double_line_non_ascii">16sp</dimen>
<dimen name="editor_title_text_size_triple_line_ascii">13sp</dimen>
<dimen name="editor_title_text_size_triple_line_non_ascii">11sp</dimen>
<dimen name="editor_title_min_text_size_single_line">16sp</dimen>
<dimen name="editor_title_min_text_size_double_line">13sp</dimen>
<dimen name="editor_title_min_text_size_triple_line">11sp</dimen>
<dimen name="editor_title_text_size_step">1sp</dimen>
<dimen name="main_title_text_size">20sp</dimen>
<dimen name="textSize_item_property">14sp</dimen>
<dimen name="first_char_view_stroke_width">2dp</dimen>
@@ -51,5 +59,6 @@
<dimen name="ref_md_listitem_vertical_margin">12dp</dimen>
<dimen name="ref_md_listitem_textsize">16sp</dimen>
<dimen name="ref_md_listitem_height">48dp</dimen>
<dimen name="toolbar_menu_item_width">40dp</dimen>
</resources>