Skip to content

Commit

Permalink
Fix PIP controls not showing #130
Browse files Browse the repository at this point in the history
Fix picture-in-picture controls not showing on hover when the rounded
corners tweak is enabled.

Also disables rounded corners on pop-up windows (such as extension pop
-ups).
  • Loading branch information
bmFtZQ committed Jan 30, 2024
1 parent cff835d commit d5f24b5
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions chrome/global/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,31 @@
/* Rounded Corners Tweak */
@media (-moz-bool-pref: "uc.tweak.rounded-corners") {
/* Since Firefox 120, when the bookmarks bar is set to only open on new tabs,
the bookmarks bar overlaps the #browser element. */
* the bookmarks bar overlaps the #browser element. */

/* Change the element that shifts the browser content to the correct position. */
:root[BookmarksToolbarOverlapsBrowser] .newTabBrowserPanel,
:root[BookmarksToolbarOverlapsBrowser] #sidebar-box {
#main-window[BookmarksToolbarOverlapsBrowser] .newTabBrowserPanel,
#main-window[BookmarksToolbarOverlapsBrowser] #sidebar-box {
padding-top: 0 !important;
}

:root[BookmarksToolbarOverlapsBrowser] #browser {
#main-window[BookmarksToolbarOverlapsBrowser] #browser {
margin-top: var(--bookmarks-toolbar-overlapping-browser-height);
}

/* Make sure that the toolbars are not positioned in-front of the browser
element. */
:root[BookmarksToolbarOverlapsBrowser] #navigator-toolbox:not([style*="z-index"]) {
* element. */
#main-window[BookmarksToolbarOverlapsBrowser] #navigator-toolbox:not([style*="z-index"]) {
z-index: auto !important;
}

/* Move the browser element in-front of the toolbars when on the new tab page. */
:root:not([BookmarksToolbarOverlapsBrowser]) #browser {
#main-window:not([BookmarksToolbarOverlapsBrowser]) #browser {
z-index: 1 !important;
}

/* Variables used for the rounded corners. */
:root {
#main-window:not([chromehidden~="toolbar"]) {
--uc-tweak-rounded-corners-padding: 4px;
--uc-tweak-rounded-corners-radius: 8px;
--uc-tweak-rounded-corners-shadow:
Expand All @@ -67,6 +67,13 @@
}
}

/* Hide border below titlebar on macOS, as its titlebar already has a border. */
@media (-moz-platform: macos) {
:root[chromehidden~="toolbar"][chromehidden~="location"][chromehidden~="directories"] {
border-top: none !important;
}
}

/* Remove separator between toolbars and the browser window. */
#navigator-toolbox {
border-bottom: none !important;
Expand Down

0 comments on commit d5f24b5

Please sign in to comment.