Browse Source

Add flag for grab handle

Blaise 2 years ago
parent
commit
a58d3c6855
3 changed files with 23 additions and 0 deletions
  1. 1 0
      docs/flags.md
  2. 21 0
      patches/extra/ungoogled-chromium/add-flag-for-grab-handle.patch
  3. 1 0
      patches/series

+ 1 - 0
docs/flags.md

@@ -31,6 +31,7 @@ If a switch requires a value, you must specify it with an `=` sign; e.g. flag `-
   `--bookmark-bar-ntp` | Sets the visibility of the bookmark bar on the New Tab Page. Only takes the value `never`.
   `--close-window-with-last-tab` | Determines whether a window should close once the last tab is closed.  Only takes the value `never`.
   `--pdf-plugin-name` | Sets the internal PDF viewer plugin name. Useful for sites that probe JavaScript API `navigator.plugins`. Supports values `chrome` for Chrome, `edge` for Microsoft Edge. Default value when omitted is Chromium.
+  `--remove-grab-handle` | Removes the reserved empty space in the tabstrip for moving the window.
   `--remove-tabsearch-button` | Removes the tabsearch button from the tabstrip.
   `--scroll-tabs` | Determines if scrolling will cause a switch to a neighboring tab if the cursor hovers over the tabs, or the empty space beside the tabs. The flag requires one the values: `always`, `never`, `incognito-and-guest`. When omitted, the default is to use platform-specific behavior, which is currently enabled only on desktop Linux.
   `--show-avatar-button` | Sets visibility of the avatar button. The flag requires one of the values: `always`, `incognito-and-guest` (only show Incognito or Guest modes), or `never`.

+ 21 - 0
patches/extra/ungoogled-chromium/add-flag-for-grab-handle.patch

@@ -0,0 +1,21 @@
+--- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc
++++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc
+@@ -72,6 +72,7 @@ class FrameGrabHandle : public views::Vi
+     // Reserve some space for the frame to be grabbed by, even if the tabstrip
+     // is full.
+     // TODO(tbergquist): Define this relative to the NTB insets again.
++    if (base::CommandLine::ForCurrentProcess()->HasSwitch("remove-grab-handle")) return gfx::Size(0, 0);
+     return gfx::Size(42, 0);
+   }
+ };
+--- a/chrome/browser/ungoogled_flag_entries.h
++++ b/chrome/browser/ungoogled_flag_entries.h
+@@ -76,4 +76,8 @@
+      "Disable QR Generator",
+      "Disables the QR generator for sharing page links.  ungoogled-chromium flag",
+      kOsDesktop, FEATURE_VALUE_TYPE(kDisableQRGenerator)},
++    {"remove-grab-handle",
++     "Remove Grab Handle",
++     "Removes the reserved empty space in the tabstrip for moving the window.  ungoogled-chromium flag",
++     kOsDesktop, SINGLE_VALUE_TYPE("remove-grab-handle")},
+ #endif  // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_

+ 1 - 0
patches/series

@@ -91,6 +91,7 @@ extra/ungoogled-chromium/fix-distilled-icons.patch
 extra/ungoogled-chromium/add-flag-to-clear-data-on-exit.patch
 extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch
 extra/ungoogled-chromium/add-flag-for-qr-generator.patch
+extra/ungoogled-chromium/add-flag-for-grab-handle.patch
 extra/bromite/fingerprinting-flags-client-rects-and-measuretext.patch
 extra/bromite/flag-max-connections-per-host.patch
 extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch