Commit 213015eb authored by Yue Li's avatar Yue Li Committed by Commit Bot

Update Assistant settings style

- Hide voice model settings if activity control state is false.
- Add a min-width to the DspState select box.

Bug: b/124246347, b/123376071
Change-Id: Ie025778aaf3173a9c8cb3fa56f0b6aff143d1704
Reviewed-on: https://chromium-review.googlesource.com/c/1464436
Commit-Queue: Yue Li <updowndota@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631920}
parent ef6379b3
......@@ -14,7 +14,15 @@
<dom-module id="settings-google-assistant-page">
<template>
<style include="settings-shared md-select"></style>
<style include="settings-shared md-select">
.text-area {
margin-inline-end: 24px;
}
select.md-select {
min-width: 200px;
}
</style>
<settings-toggle-button id="googleAssistantEnable"
class="first primary-toggle"
pref="{{prefs.settings.voice_interaction.enabled}}"
......@@ -59,7 +67,7 @@
</template>
</select>
</div>
<template is="dom-if" if="[[voiceMatchEnabled_]]">
<template is="dom-if" if="[[shouldShowVoiceMatchSettings_]]">
<div class="settings-box two-line">
<div class="start text-area">
<div class="label">
......
......@@ -31,7 +31,7 @@ Polymer({
},
/** @private */
voiceMatchEnabled_: {
shouldShowVoiceMatchSettings_: {
type: Boolean,
value: false,
},
......@@ -150,8 +150,11 @@ Polymer({
onPrefsChanged_: function() {
this.refreshDspHotwordState_();
this.voiceMatchEnabled_ = loadTimeData.getBoolean('voiceMatchEnabled') &&
this.getPref('settings.voice_interaction.hotword.enabled.value');
this.shouldShowVoiceMatchSettings_ =
loadTimeData.getBoolean('voiceMatchEnabled') &&
this.getPref('settings.voice_interaction.hotword.enabled.value') &&
this.getPref(
'settings.voice_interaction.activity_control.accepted.value');
},
/** @private */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment