fix: 送出/停止按鈕跟著「聊天的顏色」——安靜和只用黑色時是墨色,只有「跟著 Bot」才用 Bot 的顏色
This commit is contained in:
parent
ea8fccd9a4
commit
fe222507f4
|
|
@ -4203,7 +4203,9 @@ impl App {
|
|||
let has_text = !draft.trim().is_empty() || self.has_pending_attachments(bot.id);
|
||||
let call = self.call_state();
|
||||
let in_call = call.map(|c| c.0 == bot.id).unwrap_or(false);
|
||||
let colour = self.bot_color(bot);
|
||||
// The send / stop button follows 聊天的顏色 like the bubbles: the bot's
|
||||
// colour only under 「跟著 Bot」; ink otherwise (安靜, 只用黑色).
|
||||
let colour = if self.state.accent == Accent::BotColor { self.bot_color(bot) } else { p.primary };
|
||||
let colour = if colour.r() as u32 + colour.g() as u32 + colour.b() as u32 <= 0x30 * 3 { p.primary } else { colour };
|
||||
let ink = if colour == p.primary { p.on_primary } else { Color32::WHITE };
|
||||
if has_text {
|
||||
|
|
|
|||
Loading…
Reference in New Issue