fix: align color picker bottom actions

This commit is contained in:
7015725
2026-05-22 03:26:51 +08:00
parent c15869e319
commit 3069e4ec4d
3 changed files with 19 additions and 7 deletions

View File

@@ -5803,7 +5803,7 @@ FloatBallAppWM.prototype.showColorPickerPopup = function(opts) {
// 操作按钮 // 操作按钮
var actionRow = new android.widget.LinearLayout(context); var actionRow = new android.widget.LinearLayout(context);
actionRow.setOrientation(android.widget.LinearLayout.HORIZONTAL); actionRow.setOrientation(android.widget.LinearLayout.HORIZONTAL);
actionRow.setGravity(android.view.Gravity.CENTER); actionRow.setGravity(android.view.Gravity.CENTER_VERTICAL);
actionRow.setPadding(self.dp(12), self.dp(8), self.dp(12), self.dp(8)); actionRow.setPadding(self.dp(12), self.dp(8), self.dp(12), self.dp(8));
var btnClear = self.ui.createFlatButton(self, "恢复默认", T.primaryDeep, function() { var btnClear = self.ui.createFlatButton(self, "恢复默认", T.primaryDeep, function() {
@@ -5819,7 +5819,16 @@ FloatBallAppWM.prototype.showColorPickerPopup = function(opts) {
alphaValTv.setText("255"); alphaValTv.setText("255");
currentAlphaByte = 255; currentAlphaByte = 255;
}); });
actionRow.addView(btnClear); try {
btnClear.setGravity(android.view.Gravity.CENTER);
btnClear.setSingleLine(true);
btnClear.setMinHeight(self.dp(44));
btnClear.setClickable(true);
} catch(eClearStyle) { safeLog(self.L, 'w', "color clear style fail: " + String(eClearStyle)); }
var clearLp = new android.widget.LinearLayout.LayoutParams(0, self.dp(44));
clearLp.weight = 1;
clearLp.setMargins(0, 0, self.dp(6), 0);
actionRow.addView(btnClear, clearLp);
var okTextColor = T.onPrimary; var okTextColor = T.onPrimary;
try { if (okTextColor === undefined || okTextColor === null) okTextColor = android.graphics.Color.WHITE; } catch(eOkText) { okTextColor = android.graphics.Color.WHITE; } try { if (okTextColor === undefined || okTextColor === null) okTextColor = android.graphics.Color.WHITE; } catch(eOkText) { okTextColor = android.graphics.Color.WHITE; }
@@ -5853,7 +5862,10 @@ FloatBallAppWM.prototype.showColorPickerPopup = function(opts) {
okLp.setMargins(self.dp(6), 0, 0, 0); okLp.setMargins(self.dp(6), 0, 0, 0);
actionRow.addView(btnOk, okLp); actionRow.addView(btnOk, okLp);
content.addView(actionRow); content.addView(actionRow, new android.widget.LinearLayout.LayoutParams(
android.widget.LinearLayout.LayoutParams.MATCH_PARENT,
android.widget.LinearLayout.LayoutParams.WRAP_CONTENT
));
} }
}); });

View File

@@ -54,8 +54,8 @@
"size": 21198 "size": 21198
}, },
"th_14_panels.js": { "th_14_panels.js": {
"sha256": "39dfa96ac08f9bd67381b2d98b3019f9a4f86d663887d91917bf9b8ddcc112b2", "sha256": "3db4a2776f41fe19d2947d20514d4de0fda5499daaa90904fbda59cadd76a90c",
"size": 290958 "size": 291603
}, },
"th_15_extra.js": { "th_15_extra.js": {
"sha256": "11a9866ba156c2a7862633530eb0d796a9955698a0c3fad4199dcccd4bb27c47", "sha256": "11a9866ba156c2a7862633530eb0d796a9955698a0c3fad4199dcccd4bb27c47",
@@ -68,5 +68,5 @@
}, },
"keyId": "toolhub-targets-2026-rsa3072", "keyId": "toolhub-targets-2026-rsa3072",
"schema": 2, "schema": 2,
"version": 20260521192350 "version": 20260521192648
} }

View File

@@ -1 +1 @@
HK+q5fbdIDSfXIEcYdEijX81pNwIcEKx8DF8C6BKNpTQLSvVCTrRzITgIBoub0lrHoF0UZNOEFlPCuQb36azjGWYFQ7GYXCP3gJ273mCdNUBXQbqHQXdoeFpKmeaGqEm/BBbdxXcGqjsPRPqk0tby1TsRNSNEaGfwlSfPjmVwdIOg+7pIjTiXkr+kgoHswzNzliey9Ev6J4GX7aLywKM0/cVJ+58bm4vS/WAlocsvxwEJTFZcKrF3ZLri1S8kn6PDFTLj6CEnRBw7mN76lV7ceGSwJ4jFGGbdGNshEORoKdN3B1W3xPzHujgGAKfzeq3An+V5kCMWdQJGjZOM7xfGXfa8Ku9EpWAFsNyGQFhQtUMyRuiMD9po7OoU9oCPRGNQRU0NqDgyUnNpT1JL66QaON387wFQk3RZAg9gpcE6k9smAJSJ3o44pfSxyrlAl6U0iqS8/NvFKWect15q68CvAu+/NwmenWC85mRbdMts7B3yfJivKZo/aT2LfBHCx4M EuGsaFlEhooYTpjskZyjcwMZHfWCWss7lmXVQAws/2JfV4nK4DRwISkgWAwKCcPzV+vkrupMcMFNLCfFczF8xpbz5qHUE+i9cJkVkJNGZcN71a1XOcNVKp1hwg5VXoDXofqj5KOS0Ir+iEKlNzQG8S4afriGd5de5LiST5TrJfIKlMP8xc1JfYFEDnHi5Ia2C6U9WTujV9YBxOyENXAvcTA8ZJuSeFM4B/D+a1wQdH6ZD2WgcYl2kb4EalnNk/MxzIUcn5O+ek+0hejV4SANPvi4s6QQHYZijScP0jU0o8mJIsC1Be2gxWjwbljU0pL/R7PmAJaq1P9ucKJBJdeggaCq2MeBWHLCsAXUUK3TzIrKS5TLR4c/e+mjmyijhWTBIQvQiu+Ii38xqFK0/NgICFt9Wp/9AOXpRsqaD+BTXaN4BKukBDKq1riShx/bwOuWnkX5rEXF6iuLZGmOips9A36IcWoI8n8YpP34c4DcurQu5K4DDzIHxBLYmKHJvSBe