-
Notifications
You must be signed in to change notification settings - Fork 894
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27112 from brave/emerick-fix-clear-all-downloads-…
…button Fix downloads button positioning and interactivity
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
chromium_src/chrome/browser/resources/downloads/toolbar.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) 2024 The Brave Authors. All rights reserved. | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
// You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
import { injectStyle } from '//resources/brave/lit_overriding.js' | ||
import { css } from '//resources/lit/v3_0/lit.rollup.js' | ||
import { DownloadsToolbarElement } from './toolbar-chromium.js' | ||
|
||
// Our downloads page doesn't have a static area to display the "Clear All" | ||
// button, so it ends up overlapping the scrollbar when the list of download | ||
// items is long. Add some margin to the button to avoid that. | ||
injectStyle(DownloadsToolbarElement, css` | ||
#clearAll { | ||
margin-right: 20px; | ||
} | ||
`) | ||
|
||
export * from './toolbar-chromium.js' |
21 changes: 21 additions & 0 deletions
21
chromium_src/ui/webui/resources/cr_components/managed_footnote/managed_footnote.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) 2024 The Brave Authors. All rights reserved. | ||
// This Source Code Form is subject to the terms of the Mozilla Public | ||
// License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
// You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
import { injectStyle } from '//resources/brave/lit_overriding.js' | ||
import { css } from '//resources/lit/v3_0/lit.rollup.js' | ||
import { ManagedFootnoteElement } from './managed_footnote-chromium.js' | ||
|
||
// Don't show the managed footnote on the downloads page, as our downloads page | ||
// doesn't have a static area to display the footnote and it thus interferes | ||
// with the hit box for the "Clear All" button | ||
if (window.location.href === 'chrome://downloads/') { | ||
injectStyle(ManagedFootnoteElement, css` | ||
:host([is-managed_]) { | ||
display: none !important; | ||
} | ||
`) | ||
} | ||
|
||
export * from './managed_footnote-chromium.js' |