[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser] branch tor-browser-91.10.0esr-11.5-1 updated: fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection



This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch tor-browser-91.10.0esr-11.5-1
in repository tor-browser.

The following commit(s) were added to refs/heads/tor-browser-91.10.0esr-11.5-1 by this push:
     new 5b768d43132a4 fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
5b768d43132a4 is described below

commit 5b768d43132a4876ef93d51b50140e8cd2968c7f
Author: Pier Angelo Vendrame <pierov@xxxxxxxxxxxxxx>
AuthorDate: Tue Jul 5 19:35:09 2022 +0200

    fixup! Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection
    
    Bug 41044: Added another workaround for modal sizes
---
 .../torpreferences/content/builtinBridgeDialog.jsm  |  4 ++++
 .../content/connectionSettingsDialog.jsm            |  4 ++++
 .../torpreferences/content/torPreferences.css       | 21 +++++++++++++++++++--
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/browser/components/torpreferences/content/builtinBridgeDialog.jsm b/browser/components/torpreferences/content/builtinBridgeDialog.jsm
index 948ddb6b6de10..5b5e1560cd466 100644
--- a/browser/components/torpreferences/content/builtinBridgeDialog.jsm
+++ b/browser/components/torpreferences/content/builtinBridgeDialog.jsm
@@ -92,6 +92,10 @@ class BuiltinBridgeDialog {
         "tab"
       );
     });
+
+    // Hack: see the CSS
+    this._dialog.style.minWidth = '0';
+    this._dialog.style.minHeight = '0';
   }
 
   init(window, aDialog) {
diff --git a/browser/components/torpreferences/content/connectionSettingsDialog.jsm b/browser/components/torpreferences/content/connectionSettingsDialog.jsm
index abc177c43f884..41b9565780dcc 100644
--- a/browser/components/torpreferences/content/connectionSettingsDialog.jsm
+++ b/browser/components/torpreferences/content/connectionSettingsDialog.jsm
@@ -214,6 +214,10 @@ class ConnectionSettingsDialog {
     this._dialog.addEventListener("dialogaccept", e => {
       this._applySettings();
     });
+
+    // Hack: see the CSS
+    this._dialog.style.minWidth = '0';
+    this._dialog.style.minHeight = '0';
   }
 
   // callback when proxy is toggled
diff --git a/browser/components/torpreferences/content/torPreferences.css b/browser/components/torpreferences/content/torPreferences.css
index 19fd5f9a92312..8782e68ce5fcc 100644
--- a/browser/components/torpreferences/content/torPreferences.css
+++ b/browser/components/torpreferences/content/torPreferences.css
@@ -490,6 +490,22 @@ dialog#torPreferences-requestBridge-dialog > hbox {
 }
 
 /* Builtin bridge dialog */
+#torPreferences-builtinBridge-dialog {
+  /* Hack: ask XUL to load with a lot of space, then we will remove the minimum
+  sizes after we populate the string. Users with high resolutions should see a
+  big dialog, but with all the needed buttons, users with small resolutions
+  should see scrollbars.
+  Known problems:
+  1) the hack works only if a window is *already* small: if it is big, and then
+     it is resized, the dialog will not shrink;
+  2) horizontal scrollbars are never added.
+  The proper solution for this will be loading the localized string with
+  Mozilla's way.
+  See also https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/41044 */
+  min-width: 700px;
+  min-height: 550px;
+}
+
 #torPreferences-builtinBridge-header {
   margin: 8px 0 10px 0;
 }
@@ -500,7 +516,6 @@ dialog#torPreferences-requestBridge-dialog > hbox {
 
 #torPreferences-builtinBridge-typeSelection {
   margin-bottom: 16px;
-  min-height: 14em; /* Hack: make room for at least 4 lines of content for 3 types + 2 for spacing */
 }
 
 #torPreferences-builtinBridge-typeSelection radio label {
@@ -533,7 +548,9 @@ groupbox#torPreferences-bridges-group textarea {
 
 /* Connection settings dialog */
 #torPreferences-connection-dialog {
-  min-height: 400px;
+  /* Hack: like the built-in dialog */
+  min-width: 700px;
+  min-height: 550px;
 }
 
 #torPreferences-connection-header {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits