Skip to content

Commit

Permalink
fix: #966
Browse files Browse the repository at this point in the history
  • Loading branch information
windingwind committed Oct 5, 2024
1 parent ba239cb commit f8e243d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon/chrome/content/styles/panel.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ translator-plugin-panel .options-container {
width: inherit;
}

translator-plugin-panel .options-grid {
translator-plugin-panel .options-grid:not([hidden]) {
display: grid;
grid-template-columns: subgrid;
grid-column: span 2;
Expand Down
6 changes: 5 additions & 1 deletion src/elements/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ export class TranslatorPanel extends PluginCEBase {
render() {
const updateHidden = (type: string, pref: string) => {
const elem = this._queryID(type) as XUL.Box;
elem.hidden = !getPref(pref) as boolean;
const hidden = !getPref(pref) as boolean;
elem.hidden = hidden;
if (elem.nextElementSibling?.classList.contains("separator")) {
(elem.nextElementSibling as HTMLDivElement).hidden = hidden;
}
};
const setCheckBox = (type: string, checked: boolean) => {
const elem = this._queryID(type) as XUL.Checkbox;
Expand Down

0 comments on commit f8e243d

Please sign in to comment.