Code Monkey home page Code Monkey logo

Comments (7)

rafaelmardojai avatar rafaelmardojai commented on May 26, 2024

The theme has the --gnome-navbar-csd-offset CSS var to know how much offset the navbar needs to show the window controls. The theme sets the value of this var based on the linux-only -moz-gtk-csd-minimize-button, -moz-gtk-csd-maximize-button and -moz-gtk-csd-close-button media queries. Then it uses the -moz-gtk-csd-reversed-placement to know if the offset needs to go in the start or end.

Said that, if you know some macOS-only media query in Firefox we could use it to set --gnome-navbar-csd-offset with some value that works for macOS, and I guess it would also need to set the offset in the start.

Otherwise you can add custom styles on top of the theme to fix your issue:

/* Window controls offset */
:root[tabsintitlebar]:not([inFullscreen]) #nav-bar {
    padding-left: 117px !important;
    padding-right: 3px !important;
}

from firefox-gnome-theme.

rafaelmardojai avatar rafaelmardojai commented on May 26, 2024

Looking at https://github.com/mozilla/gecko-dev/blob/f602853ba8d55ba157e2a74d9b571615f6ed97b8/layout/style/test/chrome/chrome-only-media-queries.js looks like we might have some alternatives.

Can you check if the following code works?

@media (-moz-platform: macos) {
	:root {
		--gnome-navbar-csd-offset: 117px;
	}
	:root[tabsintitlebar]:not([inFullscreen]) #nav-bar {
		padding-left: var(--gnome-navbar-csd-offset) !important;
		padding-right: 3px !important;
	}
	:root[tabsintitlebar] #titlebar .titlebar-buttonbox-container {
		left: 0;
		right: auto !important;
	}
}

from firefox-gnome-theme.

qwertychouskie avatar qwertychouskie commented on May 26, 2024

Put that in customChrome.css, got this result:

image

from firefox-gnome-theme.

rafaelmardojai avatar rafaelmardojai commented on May 26, 2024

Hmm, so it works fine (adding the offset) but there are no window controls. I would need to inspect the UI I guess, but I don't have macOS, so we're at a dead end.

from firefox-gnome-theme.

qwertychouskie avatar qwertychouskie commented on May 26, 2024

Hmm, so it works fine (adding the offset) but there are no window controls. I would need to inspect the UI I guess, but I don't have macOS, so we're at a dead end.

I have an older Macbook that I can set up remote desktop on if you wanted to use that to test on.

from firefox-gnome-theme.

ChrisW-B avatar ChrisW-B commented on May 26, 2024

This seems to get the gnome style buttons workable/visible:

@media (-moz-platform: macos) {
    :root {
        --gnome-navbar-csd-offset: 120px;
    }
    :root[tabsintitlebar]:not([inFullscreen]) #nav-bar {
        padding-left: var(--gnome-navbar-csd-offset) !important;
        padding-right: 3px !important;
    }
    :root[tabsintitlebar] #titlebar .titlebar-buttonbox-container {
        left: 0;
        right: auto !important;
    }

    :root[tabsintitlebar] #titlebar .titlebar-buttonbox {
        display: flex !important;
    }

    :root[tabsintitlebar] #titlebar .titlebar-button.titlebar-min,
    :root[tabsintitlebar] #titlebar .titlebar-button.titlebar-max,
    :root[tabsintitlebar] #titlebar .titlebar-button.titlebar-close {
        display: flex !important;
    }

    :root[tabsintitlebar] #titlebar .titlebar-button.titlebar-close {
        order: 1;
    }

    :root[tabsintitlebar] #titlebar .titlebar-button.titlebar-min {
        order: 2;
    }

    :root[tabsintitlebar] #titlebar .titlebar-button.titlebar-max {
        order: 3;
    }

    :root[tabsintitlebar]
        #titlebar
        #TabsToolbar
        .titlebar-buttonbox-container:not(#hack) {
        display: block !important;
    }

    :root[tabsintitlebar] .titlebar-buttonbox {
        position: absolute;
        top: -46px;
    }
}

Screenshot 2024-05-01 at 10 06 40 AM

I can make a PR if this is something you want, I'm not sure if you have a variable for the #nav-bar height, which is where that -46px is coming from.

I also added another 3px to --gnome-navbar-csd-offset as the button padding overlapped the maximize button on hover.

I wrote this in Nightly (127.0a1 (2024-04-30) (64-bit)) - I haven't tested it anywhere else

from firefox-gnome-theme.

qwertychouskie avatar qwertychouskie commented on May 26, 2024

This seems to get the gnome style buttons workable/visible:

@media (-moz-platform: macos) {
    :root {
        --gnome-navbar-csd-offset: 120px;
    }
    :root[tabsintitlebar]:not([inFullscreen]) #nav-bar {
        padding-left: var(--gnome-navbar-csd-offset) !important;
        padding-right: 3px !important;
    }
    :root[tabsintitlebar] #titlebar .titlebar-buttonbox-container {
        left: 0;
        right: auto !important;
    }

    :root[tabsintitlebar] #titlebar .titlebar-buttonbox {
        display: flex !important;
    }

    :root[tabsintitlebar] #titlebar .titlebar-button.titlebar-min,
    :root[tabsintitlebar] #titlebar .titlebar-button.titlebar-max,
    :root[tabsintitlebar] #titlebar .titlebar-button.titlebar-close {
        display: flex !important;
    }

    :root[tabsintitlebar] #titlebar .titlebar-button.titlebar-close {
        order: 1;
    }

    :root[tabsintitlebar] #titlebar .titlebar-button.titlebar-min {
        order: 2;
    }

    :root[tabsintitlebar] #titlebar .titlebar-button.titlebar-max {
        order: 3;
    }

    :root[tabsintitlebar]
        #titlebar
        #TabsToolbar
        .titlebar-buttonbox-container:not(#hack) {
        display: block !important;
    }

    :root[tabsintitlebar] .titlebar-buttonbox {
        position: absolute;
        top: -46px;
    }
}

Screenshot 2024-05-01 at 10 06 40 AM

I can make a PR if this is something you want, I'm not sure if you have a variable for the #nav-bar height, which is where that -46px is coming from.

I also added another 3px to --gnome-navbar-csd-offset as the button padding overlapped the maximize button on hover.

I wrote this in Nightly (127.0a1 (2024-04-30) (64-bit)) - I haven't tested it anywhere else

I can confirm that this makes the buttons show up, but they all seem shifted too far to the right, and more importantly, I can't click on any of the tabs beneath the window buttons.

from firefox-gnome-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.