feat: apply animal island style to ToolApp

This commit is contained in:
7015725
2026-05-14 22:28:51 +08:00
parent b9409c9056
commit edb26dc593
5 changed files with 136 additions and 68 deletions

View File

@@ -9,6 +9,61 @@ FloatBallAppWM.prototype.getRotation = function() { try { return this.state.wm.g
// =======================【工具alpha/toast/vibrate】======================
FloatBallAppWM.prototype.withAlpha = function(colorInt, alpha01) { var a = Math.floor(Number(alpha01) * 255); return (colorInt & 0x00FFFFFF) | (a << 24); };
// Animal Island LiteToolApp 专用视觉主题。只供设置/按钮管理/编辑页调用,避免覆盖悬浮球 Monet 取色。
FloatBallAppWM.prototype.getAnimalIslandTheme = function() {
var isDark = false;
try { isDark = this.isDarkTheme(); } catch(eDark) { isDark = false; }
var Color = android.graphics.Color;
if (isDark) {
return {
bg: Color.parseColor("#1F2E29"),
bg2: Color.parseColor("#263A33"),
leaf: Color.parseColor("#31564A"),
card: Color.parseColor("#2F4037"),
card2: Color.parseColor("#3A4B40"),
cream: Color.parseColor("#FFF4D8"),
text: Color.parseColor("#FFF4D8"),
sub: Color.parseColor("#D8C6A6"),
brown: Color.parseColor("#A9855E"),
primary: Color.parseColor("#62D7C6"),
primaryDeep: Color.parseColor("#19A89A"),
primarySoft: Color.parseColor("#2C5C55"),
danger: Color.parseColor("#F08A86"),
dangerSoft: Color.parseColor("#5A3432"),
stroke: Color.parseColor("#66563F"),
onPrimary: Color.parseColor("#17352F")
};
}
return {
bg: Color.parseColor("#A8DDB4"),
bg2: Color.parseColor("#DDF3D8"),
leaf: Color.parseColor("#7DC395"),
card: Color.parseColor("#FFF9E6"),
card2: Color.parseColor("#FFFFFF"),
cream: Color.parseColor("#FFF9E6"),
text: Color.parseColor("#5E472D"),
sub: Color.parseColor("#7C5734"),
brown: Color.parseColor("#8B643D"),
primary: Color.parseColor("#19C8B9"),
primaryDeep: Color.parseColor("#0E9E91"),
primarySoft: Color.parseColor("#DDF7F2"),
danger: Color.parseColor("#D86962"),
dangerSoft: Color.parseColor("#FFE7E2"),
stroke: Color.parseColor("#E0C79E"),
onPrimary: Color.parseColor("#FFFFFF")
};
};
FloatBallAppWM.prototype.createAnimalCardDrawable = function(fillColor, radiusDp) {
var T = this.getAnimalIslandTheme();
return this.ui.createStrokeDrawable(fillColor || T.card, this.withAlpha(T.stroke, this.isDarkTheme() ? 0.36 : 0.55), this.dp(1), this.dp(radiusDp || 18));
};
FloatBallAppWM.prototype.createAnimalButtonDrawable = function(normalColor, pressedColor, radiusDp) {
return this.ui.createRippleDrawable(normalColor, pressedColor, this.dp(radiusDp || 18));
};
FloatBallAppWM.prototype.toast = function(msg) { try { android.widget.Toast.makeText(context, String(msg), 0).show(); } catch(e) { safeLog(null, 'e', "catch " + String(e)); } };
FloatBallAppWM.prototype.vibrateOnce = function(ms) {
if (!this.config.LONG_PRESS_HAPTIC_ENABLE) return;

View File

@@ -37,15 +37,16 @@ FloatBallAppWM.prototype.createSettingsHomeEntry = function(parent, title, desc,
var self = this;
var isDark = this.isDarkTheme();
var C = this.ui.colors;
var cardColor = isDark ? C.cardDark : android.graphics.Color.WHITE;
var textColor = isDark ? C.textPriDark : C.textPriLight;
var subTextColor = isDark ? C.textSecDark : C.textSecLight;
var T = this.getAnimalIslandTheme();
var cardColor = T.card;
var textColor = T.text;
var subTextColor = T.sub;
var row = new android.widget.LinearLayout(context);
row.setOrientation(android.widget.LinearLayout.HORIZONTAL);
row.setGravity(android.view.Gravity.CENTER_VERTICAL);
row.setPadding(this.dp(16), this.dp(14), this.dp(14), this.dp(14));
row.setBackground(this.ui.createRippleDrawable(cardColor, isDark ? this.withAlpha(C.primary, 0.16) : this.withAlpha(C.primary, 0.10), this.dp(18)));
try { row.setElevation(this.dp(3)); } catch(eElev) { safeLog(null, 'e', "catch " + String(eElev)); }
row.setBackground(this.ui.createRippleDrawable(cardColor, this.withAlpha(T.primary, isDark ? 0.20 : 0.14), this.dp(20)));
try { row.setElevation(this.dp(4)); } catch(eElev) { safeLog(null, 'e', "catch " + String(eElev)); }
var badge = new android.widget.TextView(context);
var icon = "⚙";
@@ -57,11 +58,11 @@ FloatBallAppWM.prototype.createSettingsHomeEntry = function(parent, title, desc,
else if (String(title).indexOf("动画") >= 0) icon = "↝";
else if (String(title).indexOf("日志") >= 0) icon = "⌁";
badge.setText(icon);
badge.setTextColor(C.primary);
badge.setTextColor(T.primaryDeep);
badge.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 19);
badge.setGravity(android.view.Gravity.CENTER);
badge.setTypeface(null, android.graphics.Typeface.BOLD);
badge.setBackground(this.ui.createRoundDrawable(this.withAlpha(C.primary, isDark ? 0.18 : 0.12), this.dp(15)));
badge.setBackground(this.ui.createStrokeDrawable(T.primarySoft, this.withAlpha(T.primaryDeep, isDark ? 0.36 : 0.28), this.dp(1), this.dp(16)));
var badgeLp = new android.widget.LinearLayout.LayoutParams(this.dp(46), this.dp(46));
badgeLp.setMargins(0, 0, this.dp(14), 0);
row.addView(badge, badgeLp);
@@ -87,12 +88,12 @@ FloatBallAppWM.prototype.createSettingsHomeEntry = function(parent, title, desc,
var tvGo = new android.widget.TextView(context);
tvGo.setText(String(actionText || "进入") + " ");
tvGo.setTextColor(C.primary);
tvGo.setTextColor(T.onPrimary);
tvGo.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 13);
tvGo.setTypeface(null, android.graphics.Typeface.BOLD);
tvGo.setGravity(android.view.Gravity.CENTER);
tvGo.setPadding(this.dp(10), this.dp(5), this.dp(10), this.dp(5));
tvGo.setBackground(this.ui.createRoundDrawable(this.withAlpha(C.primary, isDark ? 0.16 : 0.10), this.dp(14)));
tvGo.setBackground(this.ui.createRippleDrawable(T.primary, T.primaryDeep, this.dp(15)));
row.addView(tvGo);
row.setOnClickListener(new android.view.View.OnClickListener({ onClick: function(v) {
try { self.touchActivity(); } catch(eT) {}
@@ -108,9 +109,11 @@ FloatBallAppWM.prototype.buildSettingsHomePanelView = function() {
var self = this;
var isDark = this.isDarkTheme();
var C = this.ui.colors;
var bgColor = isDark ? C.bgDark : C.bgLight;
var subTextColor = isDark ? C.textSecDark : C.textSecLight;
var T = this.getAnimalIslandTheme();
var bgColor = T.bg;
var subTextColor = T.sub;
var panel = this.ui.createStyledPanel(this, 16);
try { panel.setBackground(this.ui.createRoundDrawable(T.bg, this.dp(18))); } catch(ePanelBg) {}
var quick = new android.widget.LinearLayout(context);
quick.setOrientation(android.widget.LinearLayout.HORIZONTAL);
@@ -135,7 +138,7 @@ FloatBallAppWM.prototype.buildSettingsHomePanelView = function() {
quick.addView(memTv);
quick.addView(this.ui.createSpacer(this));
var btnDoc = this.ui.createFlatButton(this, "文档", C.primary, function() {
var btnDoc = this.ui.createFlatButton(this, "文档", T.brown, function() {
try {
var intent = new android.content.Intent(android.content.Intent.ACTION_VIEW);
intent.setData(android.net.Uri.parse("https://xin-blog.com/114.html"));
@@ -145,7 +148,7 @@ FloatBallAppWM.prototype.buildSettingsHomePanelView = function() {
});
quick.addView(btnDoc);
var btnSave = this.ui.createSolidButton(this, "保存", C.primary, android.graphics.Color.WHITE, function() {
var btnSave = this.ui.createSolidButton(this, "保存", T.primary, T.onPrimary, function() {
try {
self.touchActivity();
var r = self.commitPendingUserCfg();
@@ -179,17 +182,17 @@ FloatBallAppWM.prototype.buildSettingsHomePanelView = function() {
titleCard.setOrientation(android.widget.LinearLayout.VERTICAL);
titleCard.setGravity(android.view.Gravity.CENTER);
titleCard.setPadding(this.dp(12), 0, this.dp(12), 0);
titleCard.setBackground(this.ui.createRoundDrawable(isDark ? this.withAlpha(C.primary, 0.20) : this.withAlpha(C.primary, 0.14), this.dp(18)));
titleCard.setBackground(this.ui.createStrokeDrawable(T.card, this.withAlpha(T.stroke, isDark ? 0.34 : 0.55), this.dp(1), this.dp(20)));
var titleMain = new android.widget.TextView(context);
titleMain.setText("ToolHub");
titleMain.setTextColor(isDark ? C.textPriDark : C.textPriLight);
titleMain.setText("ToolHub 岛屿");
titleMain.setTextColor(T.text);
titleMain.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 22);
titleMain.setTypeface(null, android.graphics.Typeface.BOLD);
titleMain.setGravity(android.view.Gravity.CENTER);
titleCard.addView(titleMain, new android.widget.LinearLayout.LayoutParams(-1, -2));
var titleSub = new android.widget.TextView(context);
titleSub.setText("悬浮球控制中心");
titleSub.setTextColor(subTextColor);
titleSub.setText("温暖风格控制中心");
titleSub.setTextColor(T.sub);
titleSub.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 12);
titleSub.setGravity(android.view.Gravity.CENTER);
titleCard.addView(titleSub, new android.widget.LinearLayout.LayoutParams(-1, -2));
@@ -201,16 +204,16 @@ FloatBallAppWM.prototype.buildSettingsHomePanelView = function() {
statCard.setOrientation(android.widget.LinearLayout.VERTICAL);
statCard.setGravity(android.view.Gravity.CENTER);
statCard.setPadding(this.dp(10), 0, this.dp(10), 0);
statCard.setBackground(this.ui.createRoundDrawable(isDark ? C.cardDark : android.graphics.Color.WHITE, this.dp(18)));
statCard.setBackground(this.ui.createStrokeDrawable(T.primarySoft, this.withAlpha(T.primaryDeep, isDark ? 0.34 : 0.24), this.dp(1), this.dp(20)));
var statLabel = new android.widget.TextView(context);
statLabel.setText("按钮启用");
statLabel.setTextColor(subTextColor);
statLabel.setTextColor(T.sub);
statLabel.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 12);
statLabel.setGravity(android.view.Gravity.CENTER);
statCard.addView(statLabel, new android.widget.LinearLayout.LayoutParams(-1, -2));
var statVal = new android.widget.TextView(context);
statVal.setText(String(enabledButtons) + " / " + String(totalButtons));
statVal.setTextColor(isDark ? C.textPriDark : C.textPriLight);
statVal.setTextColor(T.text);
statVal.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 25);
statVal.setTypeface(null, android.graphics.Typeface.BOLD);
statVal.setGravity(android.view.Gravity.CENTER);
@@ -589,22 +592,23 @@ FloatBallAppWM.prototype.matchesButtonManagerQuery = function(btnCfg, query) {
FloatBallAppWM.prototype.createButtonManagerSummaryCard = function(parent, totalCount, enabledCount, disabledCount) {
var isDark = this.isDarkTheme();
var C = this.ui.colors;
var T = this.getAnimalIslandTheme();
var card = new android.widget.LinearLayout(context);
card.setOrientation(android.widget.LinearLayout.VERTICAL);
card.setPadding(this.dp(14), this.dp(10), this.dp(14), this.dp(10));
card.setBackground(this.ui.createRoundDrawable(isDark ? this.withAlpha(C.cardDark, 0.88) : this.withAlpha(C.cardLight, 0.92), this.dp(14)));
try { card.setElevation(this.dp(2)); } catch(eElev) { safeLog(null, 'e', "catch " + String(eElev)); }
card.setBackground(this.ui.createStrokeDrawable(T.card, this.withAlpha(T.stroke, isDark ? 0.34 : 0.50), this.dp(1), this.dp(18)));
try { card.setElevation(this.dp(3)); } catch(eElev) { safeLog(null, 'e', "catch " + String(eElev)); }
var title = new android.widget.TextView(context);
title.setText("按钮统计");
title.setTextColor(isDark ? C.textPriDark : C.textPriLight);
title.setTextColor(T.text);
title.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 15);
title.setTypeface(null, android.graphics.Typeface.BOLD);
card.addView(title);
var sub = new android.widget.TextView(context);
sub.setText("共 " + totalCount + " 个 · 已启用 " + enabledCount + " · 已禁用 " + disabledCount);
sub.setTextColor(isDark ? C.textSecDark : C.textSecLight);
sub.setTextColor(T.sub);
sub.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 12);
sub.setPadding(0, this.dp(4), 0, 0);
card.addView(sub);
@@ -615,6 +619,7 @@ FloatBallAppWM.prototype.createButtonManagerSummaryCard = function(parent, total
};
FloatBallAppWM.prototype.createButtonManagerActionChip = function(text, textColor, strokeColor, onClickFn) {
var T = this.getAnimalIslandTheme();
var tv = new android.widget.TextView(context);
tv.setText(String(text || ""));
tv.setGravity(android.view.Gravity.CENTER);
@@ -625,10 +630,11 @@ FloatBallAppWM.prototype.createButtonManagerActionChip = function(text, textColo
tv.setPadding(this.dp(10), 0, this.dp(10), 0);
try {
var bg = new android.graphics.drawable.GradientDrawable();
bg.setColor(android.graphics.Color.TRANSPARENT);
bg.setCornerRadius(this.dp(12));
bg.setStroke(this.dp(1), strokeColor);
bg.setColor(this.withAlpha(T.primarySoft, this.isDarkTheme() ? 0.62 : 0.95));
bg.setCornerRadius(this.dp(14));
bg.setStroke(this.dp(1), strokeColor || this.withAlpha(T.primaryDeep, 0.32));
tv.setBackground(bg);
try { tv.setElevation(this.dp(1)); } catch(eElev) {}
} catch(eBg) { safeLog(null, 'e', "catch " + String(eBg)); }
if (onClickFn) {
tv.setOnClickListener(new android.view.View.OnClickListener({ onClick: function() {
@@ -658,25 +664,26 @@ FloatBallAppWM.prototype.createButtonManagerTextAction = function(text, textColo
FloatBallAppWM.prototype.createButtonManagerPolishedCard = function(parent, title, subtitle, statText) {
var isDark = this.isDarkTheme();
var C = this.ui.colors;
var T = this.getAnimalIslandTheme();
var card = new android.widget.LinearLayout(context);
card.setOrientation(android.widget.LinearLayout.VERTICAL);
card.setPadding(this.dp(14), this.dp(12), this.dp(14), this.dp(12));
card.setBackground(this.ui.createRoundDrawable(isDark ? this.withAlpha(C.cardDark, 0.74) : this.withAlpha(C.cardLight, 0.78), this.dp(18)));
try { card.setElevation(this.dp(2)); } catch(eElev) {}
card.setBackground(this.ui.createStrokeDrawable(T.card, this.withAlpha(T.stroke, isDark ? 0.32 : 0.48), this.dp(1), this.dp(20)));
try { card.setElevation(this.dp(3)); } catch(eElev) {}
var tv = new android.widget.TextView(context);
tv.setText(String(title || ""));
tv.setTextColor(isDark ? C.textPriDark : C.textPriLight);
tv.setTextColor(T.text);
tv.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 15);
tv.setTypeface(null, android.graphics.Typeface.BOLD);
card.addView(tv);
var sub = new android.widget.TextView(context);
sub.setText(String(subtitle || ""));
sub.setTextColor(isDark ? C.textSecDark : C.textSecLight);
sub.setTextColor(T.sub);
sub.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 12);
sub.setPadding(0, this.dp(4), 0, 0);
card.addView(sub);
if (statText) {
var chip = this.createButtonManagerActionChip(String(statText), C.primary, this.withAlpha(C.primary, 0.32), null);
var chip = this.createButtonManagerActionChip(String(statText), T.primaryDeep, this.withAlpha(T.primaryDeep, 0.32), null);
var chipLp = new android.widget.LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.WRAP_CONTENT, android.widget.LinearLayout.LayoutParams.WRAP_CONTENT);
chipLp.setMargins(0, this.dp(10), 0, 0);
card.addView(chip, chipLp);
@@ -700,20 +707,21 @@ FloatBallAppWM.prototype.addButtonEditorField = function(parent, view) {
FloatBallAppWM.prototype.createButtonEditorSectionCard = function(parent, title, desc) {
var isDark = this.isDarkTheme();
var C = this.ui.colors;
var T = this.getAnimalIslandTheme();
var box = new android.widget.LinearLayout(context);
box.setOrientation(android.widget.LinearLayout.VERTICAL);
box.setPadding(this.dp(12), this.dp(10), this.dp(12), this.dp(10));
box.setBackground(this.ui.createRoundDrawable(isDark ? this.withAlpha(C.cardDark, 0.72) : this.withAlpha(C.cardLight, 0.78), this.dp(14)));
box.setBackground(this.ui.createStrokeDrawable(T.card, this.withAlpha(T.stroke, isDark ? 0.30 : 0.46), this.dp(1), this.dp(18)));
var tv = new android.widget.TextView(context);
tv.setText(String(title || ""));
tv.setTextColor(isDark ? C.textPriDark : C.textPriLight);
tv.setTextColor(T.text);
tv.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 14);
tv.setTypeface(null, android.graphics.Typeface.BOLD);
box.addView(tv);
if (desc) {
var dv = new android.widget.TextView(context);
dv.setText(String(desc));
dv.setTextColor(isDark ? C.textSecDark : C.textSecLight);
dv.setTextColor(T.sub);
dv.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 11);
dv.setPadding(0, this.dp(3), 0, 0);
box.addView(dv);
@@ -729,11 +737,13 @@ FloatBallAppWM.prototype.createButtonEditorCollapsibleSection = function(parent,
var self = this;
var isDark = this.isDarkTheme();
var C = this.ui.colors;
var T = this.getAnimalIslandTheme();
var expanded = defaultExpanded !== false;
var card = new android.widget.LinearLayout(context);
card.setOrientation(android.widget.LinearLayout.VERTICAL);
card.setPadding(this.dp(12), this.dp(10), this.dp(12), this.dp(10));
card.setBackground(this.ui.createRoundDrawable(isDark ? this.withAlpha(C.cardDark, 0.72) : this.withAlpha(C.cardLight, 0.78), this.dp(14)));
card.setBackground(this.ui.createStrokeDrawable(T.card, this.withAlpha(T.stroke, isDark ? 0.30 : 0.46), this.dp(1), this.dp(18)));
try { card.setElevation(this.dp(2)); } catch(eCardElev) {}
var header = new android.widget.LinearLayout(context);
header.setOrientation(android.widget.LinearLayout.HORIZONTAL);
@@ -742,14 +752,14 @@ FloatBallAppWM.prototype.createButtonEditorCollapsibleSection = function(parent,
titleBox.setOrientation(android.widget.LinearLayout.VERTICAL);
var tv = new android.widget.TextView(context);
tv.setText(String(title || ""));
tv.setTextColor(isDark ? C.textPriDark : C.textPriLight);
tv.setTextColor(T.text);
tv.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 14);
tv.setTypeface(null, android.graphics.Typeface.BOLD);
titleBox.addView(tv);
if (desc) {
var dv = new android.widget.TextView(context);
dv.setText(String(desc));
dv.setTextColor(isDark ? C.textSecDark : C.textSecLight);
dv.setTextColor(T.sub);
dv.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 11);
dv.setPadding(0, this.dp(3), this.dp(8), 0);
titleBox.addView(dv);
@@ -759,7 +769,7 @@ FloatBallAppWM.prototype.createButtonEditorCollapsibleSection = function(parent,
header.addView(titleBox, titleLp);
var toggleTv = new android.widget.TextView(context);
toggleTv.setText(expanded ? "折叠 ▲" : "展开 ▼");
toggleTv.setTextColor(C.primary);
toggleTv.setTextColor(T.primaryDeep);
toggleTv.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 12);
toggleTv.setTypeface(null, android.graphics.Typeface.BOLD);
header.addView(toggleTv);
@@ -805,16 +815,18 @@ FloatBallAppWM.prototype.buildButtonEditorPanelView = function() {
var isEditing = (this.state.editingButtonIndex !== null);
var isDark = this.isDarkTheme();
var C = this.ui.colors;
var T = this.getAnimalIslandTheme();
// 颜色配置
var bgColor = isDark ? C.bgDark : C.bgLight;
var cardColor = isDark ? C.cardDark : C.cardLight;
var textColor = isDark ? C.textPriDark : C.textPriLight;
var subTextColor = isDark ? C.textSecDark : C.textSecLight;
var dividerColor = isDark ? C.dividerDark : C.dividerLight;
var inputBgColor = isDark ? C.inputBgDark : C.inputBgLight;
var bgColor = T.bg;
var cardColor = T.card;
var textColor = T.text;
var subTextColor = T.sub;
var dividerColor = T.stroke;
var inputBgColor = T.card2;
var panel = this.ui.createStyledPanel(this, 16);
try { panel.setBackground(this.ui.createRoundDrawable(bgColor, this.dp(18))); } catch(ePanelBg) {}
// --- 标题栏 ---
var header = this.ui.createStyledHeader(this, 12);
@@ -855,7 +867,7 @@ FloatBallAppWM.prototype.buildButtonEditorPanelView = function() {
header.addView(self.ui.createSpacer(self));
// 新增按钮 (右侧)
var btnAdd = self.ui.createSolidButton(self, "新增", C.primary, android.graphics.Color.WHITE, function() {
var btnAdd = self.ui.createSolidButton(self, "新增", T.primary, T.onPrimary, function() {
self.state.editingButtonIndex = -1;
if (self.state.toolAppActive && self.pushToolAppPage) self.pushToolAppPage("btn_editor");
else refreshPanel();
@@ -882,7 +894,7 @@ FloatBallAppWM.prototype.buildButtonEditorPanelView = function() {
var searchSurface = new android.widget.LinearLayout(context);
searchSurface.setOrientation(android.widget.LinearLayout.VERTICAL);
searchSurface.setPadding(self.dp(12), self.dp(10), self.dp(12), self.dp(10));
searchSurface.setBackground(self.ui.createRoundDrawable(isDark ? self.withAlpha(C.cardDark, 0.58) : self.withAlpha(C.cardLight, 0.62), self.dp(16)));
searchSurface.setBackground(self.ui.createStrokeDrawable(T.card, self.withAlpha(T.stroke, isDark ? 0.30 : 0.46), self.dp(1), self.dp(18)));
var searchRow = new android.widget.LinearLayout(context);
searchRow.setOrientation(android.widget.LinearLayout.HORIZONTAL);
searchRow.setGravity(android.view.Gravity.CENTER_VERTICAL);
@@ -890,7 +902,7 @@ FloatBallAppWM.prototype.buildButtonEditorPanelView = function() {
var searchInputLp = new android.widget.LinearLayout.LayoutParams(0, android.widget.LinearLayout.LayoutParams.WRAP_CONTENT);
searchInputLp.weight = 1;
searchRow.addView(searchInput.view, searchInputLp);
var btnSearch = self.createButtonManagerActionChip("搜索", C.primary, self.withAlpha(C.primary, 0.32), function() {
var btnSearch = self.createButtonManagerActionChip("搜索", T.primaryDeep, self.withAlpha(T.primaryDeep, 0.32), function() {
try { self.state.buttonManagerQuery = String(searchInput.getValue ? searchInput.getValue() : ""); } catch(eQ) { self.state.buttonManagerQuery = ""; }
self.state.btnEditorListScrollY = 0;
refreshPanel();
@@ -937,8 +949,8 @@ FloatBallAppWM.prototype.buildButtonEditorPanelView = function() {
card.setOrientation(android.widget.LinearLayout.VERTICAL);
card.setGravity(android.view.Gravity.CENTER_VERTICAL);
// 使用稍微不同的背景色以突出卡片
var cardBgColor = isDark ? self.withAlpha(C.cardDark, 0.8) : self.withAlpha(C.cardLight, 0.8);
card.setBackground(self.ui.createRoundDrawable(cardBgColor, self.dp(16)));
var cardBgColor = cardColor;
card.setBackground(self.ui.createStrokeDrawable(cardBgColor, self.withAlpha(T.stroke, isDark ? 0.28 : 0.45), self.dp(1), self.dp(18)));
try { card.setElevation(self.dp(4)); } catch(e) { safeLog(null, 'e', "catch " + String(e)); }
var cardLp = new android.widget.LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT, android.widget.LinearLayout.LayoutParams.WRAP_CONTENT);

View File

@@ -834,23 +834,24 @@ FloatBallAppWM.prototype.buildToolAppShell = function(contentView, title, canBac
var self = this;
var isDark = this.isDarkTheme();
var C = this.ui.colors;
var T = this.getAnimalIslandTheme();
var root = new android.widget.FrameLayout(context);
var body = new android.widget.LinearLayout(context);
body.setOrientation(android.widget.LinearLayout.VERTICAL);
var shellBg = isDark ? C.bgDark : C.bgLight;
var shellStroke = isDark ? C.dividerDark : C.dividerLight;
body.setBackground(this.ui.createStrokeDrawable(shellBg, this.withAlpha(shellStroke, 0.18), this.dp(1), this.dp(22)));
body.setPadding(this.dp(2), this.dp(2), this.dp(2), this.dp(2));
body.setBackground(this.ui.createStrokeDrawable(T.bg, this.withAlpha(T.stroke, isDark ? 0.42 : 0.70), this.dp(1), this.dp(24)));
try { body.setClipToOutline(true); } catch(eClip) {}
try { body.setElevation(this.dp(14)); } catch(eElev) { safeLog(null, 'e', "catch " + String(eElev)); }
try { body.setElevation(this.dp(16)); } catch(eElev) { safeLog(null, 'e', "catch " + String(eElev)); }
root.addView(body, new android.widget.FrameLayout.LayoutParams(-1, -1));
var bar = new android.widget.LinearLayout(context);
bar.setOrientation(android.widget.LinearLayout.HORIZONTAL);
bar.setGravity(android.view.Gravity.CENTER_VERTICAL);
bar.setPadding(this.dp(10), this.dp(10), this.dp(10), this.dp(6));
bar.setBackground(this.ui.createRoundDrawable(isDark ? this.withAlpha(C.cardDark, 0.45) : this.withAlpha(C.cardLight, 0.55), this.dp(18)));
bar.setBackground(this.ui.createStrokeDrawable(T.card, this.withAlpha(T.stroke, isDark ? 0.30 : 0.45), this.dp(1), this.dp(20)));
try { bar.setElevation(this.dp(3)); } catch(eBarElev) {}
var btnBack = this.ui.createFlatButton(this, canBack ? "" : "", C.primary, function() {
var btnBack = this.ui.createFlatButton(this, canBack ? "" : "", T.brown, function() {
self.popToolAppPage("topbar");
});
btnBack.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 24);
@@ -859,15 +860,15 @@ FloatBallAppWM.prototype.buildToolAppShell = function(contentView, title, canBac
var tvTitle = new android.widget.TextView(context);
tvTitle.setText(String(title || "ToolHub"));
tvTitle.setTextColor(isDark ? C.textPriDark : C.textPriLight);
tvTitle.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 16);
tvTitle.setTextColor(T.text);
tvTitle.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 17);
tvTitle.setTypeface(null, android.graphics.Typeface.BOLD);
tvTitle.setGravity(android.view.Gravity.CENTER_VERTICAL);
var titleLp = new android.widget.LinearLayout.LayoutParams(0, -1);
titleLp.weight = 1;
bar.addView(tvTitle, titleLp);
var btnClose = this.ui.createFlatButton(this, "✕", isDark ? C.textSecDark : C.textSecLight, function() {
var btnClose = this.ui.createFlatButton(this, "✕", T.sub, function() {
self.closeToolApp();
});
btnClose.setTextSize(android.util.TypedValue.COMPLEX_UNIT_SP, 18);

View File

@@ -14,8 +14,8 @@
"size": 5598
},
"th_04_theme.js": {
"sha256": "b815acfee30e56458e61c033ab3fddfe5d8d0c52ec172c419bad7187fcb341ba",
"size": 36083
"sha256": "8e82b6095f55bbf406f82f7a9c01a77919354a67e38dd6f666676b680a2410a0",
"size": 38293
},
"th_05_persistence.js": {
"sha256": "d80787c2810839ebbe499e93db3df33d6e8d2d6b6ae71644ce351db0f36e4d3e",
@@ -54,12 +54,12 @@
"size": 20386
},
"th_14_panels.js": {
"sha256": "47f49f5def41514c6a9a082fd06fcd0cc572a1650021309dbc946854e261ee0b",
"size": 244271
"sha256": "d89af917e8a594c5da78fa1e77203da8eddd3f49648e18de320d40b1a5e4a522",
"size": 244218
},
"th_15_extra.js": {
"sha256": "203e65c53d1cd37135af22584b90a89d43ec5f2a7ce1aada18a5d90a49b417d9",
"size": 90774
"sha256": "a95432faf7a8622b74107ea175154c903061dea362981a96554bb7bf78f8a428",
"size": 90762
},
"th_16_entry.js": {
"sha256": "e7c99c3dfbd6aedab05551426955081ae6cae034754f2f557cefa01dc75dc001",
@@ -68,5 +68,5 @@
},
"keyId": "toolhub-targets-2026-rsa3072",
"schema": 2,
"version": 20260514104438
"version": 20260514142843
}

View File

@@ -1 +1 @@
lcUYKpPt8XY3inn6Lt0GjCE4zBryJiafB2j7gBT6DkH12WR4nF4u3zSlAEEKu+aKAfMUYfupb1qOltGliIy/RtVAPWcVClLuQEsCVsZ0lP9IUiXIrsoKCQLRnD6K+0lPqY1NDtZK/rouA3q+j9AIqcvA6KUH3dG44LufV59xAPo5/XGF96sUcLGdGueZbNOgxR0RhJll2cUtSAP78YQob8iZxzoF1HlhI0Wzhlgqpo2qQdHJzDGigalgYWYjjkxahhZGjQlw9xBrf5KMJK+h0nD8BeKWyOO+Ieh8fFSuTY6r7qu9tj5cTLVorgP86YjSHinInU5n/XUe9oHGOg8waN81M5XWurLfIsxL7Sth2skix+n3s6KcEDp5hhjzydmhayHt9v2scQUlnIZdA2S0yw5ewwVIzBT5ohPEeKmSYzGJJLJPTdXkLxUbsL/P+hFO7dxqm2qT/uGF6PRup60uGAG94MfJ6iIQeLjLbzy9nUel/K8e/x1jDXn0WWAIFY/u
j0oTSR5ZVRDOvqR9jOi5IcvH7KDrHCDMRhZCDAivu7fCuudETXv/mwgActNQB8ouzPEeZ74JwVqWYdmaLrDI2tygFHBJX3arxilpzLiXl+d/abJR/Y5/h3eU715JHcoeuQ58ZdH6fm2yHyeUsKqwcYGyuoiQs5kC11xcZSOK5y7O3X/TFRaTjC4WNcZYdHAwVW9Flfw9+40k+LE6HeBBOKUqG00NE1rnjmPGAsZzU9/Gp6UjuNlyOYLQ+Ds7HnLX+SeK2IcK5uOqQqgZuz8YsgayTZ3xp4RQws7tteptZUv+2cUfsFpqfrMp/zqon0SW/oiF/VspV/yS1PfrcgKXqhxNhS/CyPZESmhB4nkinsGeAfz+nvpi9mWmtc2g8ij8S5oPKuSZ1VsD9XVH0J3z6GI9XGmheTgTKxmd45+FICaGRngxk+WR7l1akfPo3olmqaycFTExyswUZpx2Cct6Dj6Na5I92tbJ57rwT8E8P5IOhdHINLDXtBrV5NSFRil7