morgan pushed to branch tor-browser-140.2.0esr-15.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
9b43d384
by Henry Wilkes at 2025-08-20T17:40:32+01:00
-
941d407e
by Henry Wilkes at 2025-08-20T17:40:33+01:00
-
57bb4918
by Henry Wilkes at 2025-08-20T17:40:34+01:00
-
1ab41197
by Henry Wilkes at 2025-08-20T17:57:06+01:00
6 changed files:
- browser/components/abouttor/content/aboutTor.html
- browser/components/torpreferences/content/connectionPane.inc.xhtml
- toolkit/components/torconnect/content/aboutTorConnect.html
- toolkit/content/widgets/lit-utils.mjs
- toolkit/content/widgets/moz-input-common.css
- toolkit/content/widgets/moz-toggle/moz-toggle.mjs
Changes:
... | ... | @@ -77,6 +77,7 @@ |
77 | 77 | />
|
78 | 78 | <moz-toggle
|
79 | 79 | id="onionize-toggle"
|
80 | + label-align-before=""
|
|
80 | 81 | data-l10n-id="tor-browser-home-onionize-toggle"
|
81 | 82 | data-l10n-attrs="label"
|
82 | 83 | ></moz-toggle>
|
... | ... | @@ -79,7 +79,6 @@ |
79 | 79 | <html:moz-toggle
|
80 | 80 | id="tor-connection-quickstart-toggle"
|
81 | 81 | class="tor-toggle"
|
82 | - label-align-after=""
|
|
83 | 82 | data-l10n-id="tor-connection-quickstart-checkbox"
|
84 | 83 | data-l10n-attrs="label"
|
85 | 84 | />
|
... | ... | @@ -145,7 +144,6 @@ |
145 | 144 | <html:moz-toggle
|
146 | 145 | id="tor-bridges-enabled-toggle"
|
147 | 146 | class="tor-toggle"
|
148 | - label-align-after=""
|
|
149 | 147 | data-l10n-id="tor-bridges-use-bridges"
|
150 | 148 | data-l10n-attrs="label"
|
151 | 149 | />
|
... | ... | @@ -62,7 +62,7 @@ |
62 | 62 | <button id="viewLogButton"></button>
|
63 | 63 | |
64 | 64 | <div id="quickstartContainer">
|
65 | - <moz-toggle id="quickstartToggle" label-align-after=""></moz-toggle>
|
|
65 | + <moz-toggle id="quickstartToggle"></moz-toggle>
|
|
66 | 66 | </div>
|
67 | 67 | |
68 | 68 | <div class="button-container">
|
... | ... | @@ -250,6 +250,9 @@ export class MozBaseInputElement extends MozLitElement { |
250 | 250 | supportPage: { type: String, attribute: "support-page" },
|
251 | 251 | accessKey: { type: String, mapped: true, fluent: true },
|
252 | 252 | parentDisabled: { type: Boolean, state: true },
|
253 | + // label-align-before is a customisation for the moz-toggle in about:tor.
|
|
254 | + // See tor-browser#43727.
|
|
255 | + labelAlignBefore: { type: Boolean, attribute: "label-align-before" },
|
|
253 | 256 | };
|
254 | 257 | static inputLayout = "inline";
|
255 | 258 | |
... | ... | @@ -404,9 +407,10 @@ export class MozBaseInputElement extends MozLitElement { |
404 | 407 | part="label"
|
405 | 408 | for="input"
|
406 | 409 | shownaccesskey=${ifDefined(this.accessKey)}
|
407 | - >${this.isInlineLayout
|
|
410 | + >${this.labelAlignBefore ? this.labelTemplate() : ""}${this
|
|
411 | + .isInlineLayout
|
|
408 | 412 | ? this.inputTemplate()
|
409 | - : ""}${this.labelTemplate()}</label
|
|
413 | + : ""}${this.labelAlignBefore ? "" : this.labelTemplate()}</label
|
|
410 | 414 | >${this.hasDescription ? "" : this.supportLinkTemplate()}
|
411 | 415 | </span>
|
412 | 416 | ${this.descriptionTemplate()}
|
... | ... | @@ -12,6 +12,7 @@ |
12 | 12 | --input-margin-block-adjust: calc((1lh - var(--input-height)) / 2);
|
13 | 13 | --icon-margin-block-adjust: calc((1lh - var(--icon-size-default)) / 2);
|
14 | 14 | --input-margin-inline-start-adjust: calc(-1 * var(--input-space-offset));
|
15 | + --input-margin-inline-adjust: var(--input-margin-inline-start-adjust) var(--space-small);
|
|
15 | 16 | }
|
16 | 17 | |
17 | 18 | :host(:not([hidden])) {
|
... | ... | @@ -32,6 +33,13 @@ |
32 | 33 | --input-margin-block-adjust: 0;
|
33 | 34 | }
|
34 | 35 | |
36 | + :host([label-align-before]) {
|
|
37 | + /* The label is before the input, so we need the input to only have a
|
|
38 | + * starting gap between it and the label. */
|
|
39 | + --input-space-offset: 0;
|
|
40 | + --input-margin-inline-adjust: var(--space-small) 0;
|
|
41 | + }
|
|
42 | + |
|
35 | 43 | @media (forced-colors) {
|
36 | 44 | :host(:state(disabled)) {
|
37 | 45 | color: GrayText;
|
... | ... | @@ -72,7 +80,7 @@ |
72 | 80 | line-height: inherit;
|
73 | 81 | vertical-align: top;
|
74 | 82 | margin-block: var(--input-margin-block-adjust);
|
75 | - margin-inline: var(--input-margin-inline-start-adjust) var(--space-small);
|
|
83 | + margin-inline: var(--input-margin-inline-adjust);
|
|
76 | 84 | |
77 | 85 | :host(:not(:state(has-label))) & {
|
78 | 86 | margin-inline-end: 0;
|
... | ... | @@ -27,8 +27,6 @@ export default class MozToggle extends MozBaseInputElement { |
27 | 27 | pressed: { type: Boolean, reflect: true },
|
28 | 28 | // Extension for tor-browser. Used for tor-browser#41333.
|
29 | 29 | title: { type: String, attribute: "title" },
|
30 | - // Extension for tor-browser. Used for tor-browser#40837.
|
|
31 | - labelAlignAfter: { type: Boolean, attribute: "label-align-after" },
|
|
32 | 30 | };
|
33 | 31 | |
34 | 32 | static activatedProperty = "pressed";
|