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

Some firefox custom themes cannot adapt to Rounded browser corners and cannot cleearly display in the top-right #149

Open
Arcticn opened this issue Jul 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Arcticn
Copy link

Arcticn commented Jul 13, 2024

Description

First of all, thanks for your amazing work! Loves it so much!

Example themes to reproduce:

The problems are:

  1. Some firefox custom themes cannot adapt to Rounded browser corners. Is it possible to automatically fill this blank?
  • like this, cannot correctly fill the color at four corners
    image
  1. Those themes also cannot display well in the top-right due to dark background. In native Firefox, this area was highlighted in those themes
  • Origin firefox would display this:
    image

  • edge ver display this, makes it unable to see:
    image

Configuration

  • Firefox Version: 128.0
  • OS: Windows 11
  • Tweaks enabled:
    • uc.tweak.force-tab-colour
    • uc.tweak.rounded-corners
    • uc.tweak.show-tab-close-button-on-hover
    • uc.tweak.smaller-context-menu-text
@Arcticn Arcticn added the bug Something isn't working label Jul 13, 2024
@Robotino04
Copy link

I have a solution for the initial problem with the rounded corners:

diff --git a/chrome/global/browser.css b/chrome/global/browser.css
index 22bbd1a..f3a4f89 100644
--- a/chrome/global/browser.css
+++ b/chrome/global/browser.css
@@ -112,6 +112,9 @@
     background-color: var(--tabpanel-background-color) !important;
     position: relative !important;
 
+    clip-path: inset(0% 0% 0% 0% round calc(var(--uc-tweak-rounded-corners-radius) - 1px));
+    overflow: hidden;
+
     /* Use pseudo element overlay to simulate rounded corners, similar to the
      * tab corners, fixes bug with backdrop-filter. */
     &::after {

But this doesn't make the themes appear there instead, it'll just make it transparent. A somewhat hacky way to deal with this is the following:

diff --git a/chrome/global/browser.css b/chrome/global/browser.css
index 7ac9b64..22bbd1a 100644
--- a/chrome/global/browser.css
+++ b/chrome/global/browser.css
@@ -82,6 +82,7 @@
   /* Remove separator between toolbars and the browser window. */
   #navigator-toolbox {
     border-bottom: none !important;
+    height: 100%;
   }
 
   /* Disable rounded corners in fullscreen, only if the toolbar is hidden. */
@@ -95,6 +96,14 @@
   /*
     MARK: Rc Browser
   */
+  #browser {
+    position: absolute;
+    /* 70px is hardcoded to my setup, may be different for other OS/FF version/etc */
+    height: calc(100% - 70px);
+    width: 100%;
+    bottom: 0;
+  }
+
   #tabbrowser-tabbox .browserStack {
     margin-inline: var(--uc-tweak-rounded-corners-padding) !important;
     margin-block-end: var(--uc-tweak-rounded-corners-padding) !important;

This basically stretches the toolbox container to fill the entire window and places the browser on top of it. This isn't a proper solution because the height of the toolbar has to be known and hardcoded though.

Also this will probably break any theme that uses relative positions and won't look great for themes that use images (like your first one), because the images just end somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants