fix: lighten animal island main panel

This commit is contained in:
7015725
2026-05-19 03:37:25 +08:00
parent 4ce1924299
commit d557bdefa2
4 changed files with 21 additions and 55 deletions

View File

@@ -859,10 +859,10 @@ FloatBallAppWM.prototype.updatePanelBackground = function(panelView) {
var radiusDp = 22; var radiusDp = 22;
if (settTheme === "animal" && this.getAnimalIslandTheme) { if (settTheme === "animal" && this.getAnimalIslandTheme) {
var T = this.getAnimalIslandTheme(); var Color = android.graphics.Color;
bgInt = this.withAlpha(isDark ? T.bg : T.bg2, isDark ? 0.96 : 0.94); bgInt = Color.parseColor(isDark ? "#27362E" : "#E4F1DF");
tc = T.text; tc = Color.parseColor(isDark ? "#F5EBD2" : "#3F3528");
stroke = this.withAlpha(T.stroke, isDark ? 0.28 : 0.34); stroke = this.withAlpha(Color.parseColor(isDark ? "#526454" : "#E8DEC8"), isDark ? 0.50 : 0.52);
radiusDp = 30; radiusDp = 30;
} else { } else {
bgInt = this.getPanelBgColorInt(); bgInt = this.getPanelBgColorInt();

View File

@@ -95,25 +95,22 @@ FloatBallAppWM.prototype.buildPanelView = function(panelType) {
var panelStrokeColor = isDark ? C.dividerDark : C.dividerLight; var panelStrokeColor = isDark ? C.dividerDark : C.dividerLight;
var cardStrokeColor = isDark ? C.dividerDark : C.dividerLight; var cardStrokeColor = isDark ? C.dividerDark : C.dividerLight;
var pressedCardColor = this.withAlpha(C.primary, 0.20); var pressedCardColor = this.withAlpha(C.primary, 0.20);
var iconBubbleColor = pressedCardColor;
var iconTintColor = textColor;
var panelRadiusDp = 22; var panelRadiusDp = 22;
var cardRadiusDp = 12; var cardRadiusDp = 12;
var panelElevationDp = 8; var panelElevationDp = 8;
var cardElevationDp = 2; var cardElevationDp = 2;
if (useAnimalPanel && TPanel) { if (useAnimalPanel && TPanel) {
bgColor = this.withAlpha(isDark ? TPanel.bg : TPanel.bg2, isDark ? 0.96 : 0.94); var Color = android.graphics.Color;
cardColor = TPanel.card; bgColor = Color.parseColor(isDark ? "#27362E" : "#E4F1DF");
textColor = TPanel.text; cardColor = Color.parseColor(isDark ? "#34463A" : "#FFFDF4");
panelStrokeColor = this.withAlpha(TPanel.stroke, isDark ? 0.28 : 0.34); textColor = Color.parseColor(isDark ? "#F5EBD2" : "#3F3528");
cardStrokeColor = this.withAlpha(TPanel.stroke, isDark ? 0.26 : 0.34); panelStrokeColor = this.withAlpha(Color.parseColor(isDark ? "#526454" : "#E8DEC8"), isDark ? 0.50 : 0.52);
pressedCardColor = isDark ? this.withAlpha(TPanel.primarySoft, 0.92) : this.withAlpha(TPanel.primarySoft, 0.98); cardStrokeColor = this.withAlpha(Color.parseColor(isDark ? "#526454" : "#E8DEC8"), isDark ? 0.52 : 0.56);
iconBubbleColor = isDark ? this.withAlpha(TPanel.card2, 0.92) : TPanel.primarySoft; pressedCardColor = this.withAlpha(Color.parseColor(isDark ? "#526454" : "#DDEEDB"), isDark ? 0.36 : 0.42);
iconTintColor = TPanel.sub;
panelRadiusDp = 30; panelRadiusDp = 30;
cardRadiusDp = 22; cardRadiusDp = 20;
panelElevationDp = isDark ? 2 : 3; panelElevationDp = isDark ? 1 : 2;
cardElevationDp = isDark ? 1 : 2; cardElevationDp = isDark ? 1 : 2;
} }
@@ -197,16 +194,6 @@ FloatBallAppWM.prototype.buildPanelView = function(panelType) {
return sd; return sd;
} }
function isAppLikeIcon(btnObj) {
try {
if (!btnObj) return false;
var tp = (btnObj.type == null) ? "" : String(btnObj.type);
var pkg = (btnObj.pkg == null) ? "" : String(btnObj.pkg);
if ((tp === "app" || tp === "shortcut") && pkg.length > 0) return true;
} catch(eAppLike) {}
return false;
}
scroll.setOnTouchListener(new JavaAdapter(android.view.View.OnTouchListener, { scroll.setOnTouchListener(new JavaAdapter(android.view.View.OnTouchListener, {
onTouch: function(v, e) { self.touchActivity(); return false; } onTouch: function(v, e) { self.touchActivity(); return false; }
})); }));
@@ -251,12 +238,7 @@ FloatBallAppWM.prototype.buildPanelView = function(panelType) {
var dr = this.resolveIconDrawable(btnCfg); var dr = this.resolveIconDrawable(btnCfg);
if (dr) { if (dr) {
iv.setImageDrawable(dr); iv.setImageDrawable(dr);
// 如果图标是白色的(通常是系统图标),且我们在亮色卡片上,可能需要染色 // 主面板是高频工具入口:默认保留图标原色;仅 resolveIconDrawable 内显式 iconTint 时才染色
// 但 resolveIconDrawable 逻辑比较复杂,这里暂时不强制染色,除非用户配置了 TINT
if (btnCfg && !isAppLikeIcon(btnCfg) && !btnCfg.iconPath) {
// ShortX/系统图标与问号占位走主题色,避免灰黑重阴影感
try { iv.setColorFilter(useAnimalPanel ? iconTintColor : (isDark ? C.textPriDark : C.textPriLight), android.graphics.PorterDuff.Mode.SRC_IN); } catch(eCF) { safeLog(null, 'e', "catch " + String(eCF)); }
}
} }
var ivLp = new android.widget.LinearLayout.LayoutParams( var ivLp = new android.widget.LinearLayout.LayoutParams(
@@ -264,23 +246,7 @@ FloatBallAppWM.prototype.buildPanelView = function(panelType) {
this.dp(this.config.PANEL_ICON_SIZE_DP) this.dp(this.config.PANEL_ICON_SIZE_DP)
); );
iv.setLayoutParams(ivLp); iv.setLayoutParams(ivLp);
if (btnCfg && useAnimalPanel && !isAppLikeIcon(btnCfg)) { cell.addView(iv);
var iconBubble = new android.widget.FrameLayout(context);
iconBubble.setForegroundGravity(android.view.Gravity.CENTER);
iconBubble.setBackground(self.ui.createStrokeDrawable(iconBubbleColor, self.withAlpha(TPanel.stroke, isDark ? 0.20 : 0.24), self.dp(1), self.dp(15)));
iconBubble.setPadding(self.dp(4), self.dp(4), self.dp(4), self.dp(4));
var bubbleLp = new android.widget.LinearLayout.LayoutParams(self.dp(38), self.dp(38));
iconBubble.setLayoutParams(bubbleLp);
var ivInBubbleLp = new android.widget.FrameLayout.LayoutParams(
self.dp(self.config.PANEL_ICON_SIZE_DP),
self.dp(self.config.PANEL_ICON_SIZE_DP),
android.view.Gravity.CENTER
);
iconBubble.addView(iv, ivInBubbleLp);
cell.addView(iconBubble);
} else {
cell.addView(iv);
}
if (this.config.PANEL_LABEL_ENABLED) { if (this.config.PANEL_LABEL_ENABLED) {
var tv = new android.widget.TextView(context); var tv = new android.widget.TextView(context);

View File

@@ -14,8 +14,8 @@
"size": 5598 "size": 5598
}, },
"th_04_theme.js": { "th_04_theme.js": {
"sha256": "35ca63c9b142c0debc54f6ffd4742b29585f7c77d39c6bc334dc8fb6c76d372f", "sha256": "cb020f0fd3842df526429b7816ad0cec7abbe1b7c45dc587198c9b2bbdb4b0d6",
"size": 40814 "size": 40884
}, },
"th_05_persistence.js": { "th_05_persistence.js": {
"sha256": "7d913b2caddf04c41ca13023c06763c03a7e372bb31080af37e7a3b2aa81d5f8", "sha256": "7d913b2caddf04c41ca13023c06763c03a7e372bb31080af37e7a3b2aa81d5f8",
@@ -58,8 +58,8 @@
"size": 262019 "size": 262019
}, },
"th_15_extra.js": { "th_15_extra.js": {
"sha256": "9880128b2d5ad5abedd38aa732bf1934e2e97535aea13095a62c5ac8c71293e7", "sha256": "1aa3bbe9c99e047cfaf663f17501d87bba1b5810a8002e66bca1f6ea605371a4",
"size": 101106 "size": 99378
}, },
"th_16_entry.js": { "th_16_entry.js": {
"sha256": "e7c99c3dfbd6aedab05551426955081ae6cae034754f2f557cefa01dc75dc001", "sha256": "e7c99c3dfbd6aedab05551426955081ae6cae034754f2f557cefa01dc75dc001",
@@ -68,5 +68,5 @@
}, },
"keyId": "toolhub-targets-2026-rsa3072", "keyId": "toolhub-targets-2026-rsa3072",
"schema": 2, "schema": 2,
"version": 20260518192400 "version": 20260518193704
} }

View File

@@ -1 +1 @@
N8cv7NaVdm1RcA8QxFnyYyuJEk84L9XPqaZmRtjIjkwdulNa6tJu2r4luZrqtip0eUHtBkbcDnTHDaUS6vfWmT6i/4Wdzoa8fujHfJrpZbqWJseMshzjJZazPn9eUmQcPxhDEahksGu48W9aGrscfsnQgI4qeih/dhs/sNCdVlPqQ1oil+dAnqZ9UWmWMVODEapHXSkANPWopeXBAs5Gw3KJhhUb4wKb/bHUJ4FxTfJr77dXbdWNXn84fbPzIOkLt5Ru6j7b5SJF1+vHrgJy4U3yamlrYdsOie5qjNqDlquhKR4eiM7sTialhtPKmWB7temDCQL0z0c5BZkqolnOP68SRB3DqcRozYmjrWjWKM1Ji2epwiSjHICgXoauDTrVmHuLPXU+1Y30Ao33Y/OXF1bkhklKwkESnG2x8k2SpROP9DCkcFteNkZZTViAPM6E50cV5WYrrCJw3LCzeilAEKvjYHic7LqS7xW0Uj/53VEXa0b1IK29WldWpEpVbemQ RiocpL++kNT2BnMm7JXBi0t4M2cek0qF1WIsf3WiUXER3N2sUlCH1jx87D5fWKnSm4LUqka7AvBYGvsce0B8HxEs7jXV28OqEjaf0UoACyELffN61hU2O4muSmXjAmqaDeT8yInsK4fpMSfhiS3sAWtiMk03e9S7qmx+3xECaUefIrKCAomdSMflXF+Y/i9oc+Uf8p4l1uOZvZpyDmF03HSsk+slLNasd79NvzLSA4QYh6YFhKFGRRW73w0FGbao5+VquFPwmq5CeCKePVWE4sSWIFhOdhaCXqhyuwjTP/A6zoX0Rv3qWg8drYqnhcJADYDVWBC/SIts8hIqRRKeN5RiGV62kPEh6nMeF9F1L8xrayaP2NqadZbw/6MT72YW1s0uXz1KsXJHMLl8vY78gZF1YA7+9cgpRDfp4pY15r4zvXi95gUlGoTkVljagbQaoSDyAgRDfPl2lFkzP5GoCebCMQWmt/IrPqM4qXc6oBw5BHBjjWxHnJmjiZN3Q0+H