Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix downloads button positioning and interactivity #27112

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions chromium_src/chrome/browser/resources/downloads/toolbar.ts
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'
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'
Loading