yiiyahui / Neptune-Firefox

A clean and compact Firefox theme.
MIT License
142 stars 6 forks source link

This is my favorite theme but #19

Closed 1000deaths closed 1 week ago

1000deaths commented 2 weeks ago

any chance of having a version with windows controls (on the right) sorry if this isn't the place to ask.

yiiyahui commented 2 weeks ago

ok, although I don't really like it, I will add it as soon as possible.

yiiyahui commented 1 week ago

EDIT: Sorry, since I originally didn't plan to use Windows control buttons and didn't use an imported CSS file, it makes it impossible for both types of buttons to coexist. So for now, I've decided not to add the control buttons on the right. However, here is a method to obtain Windows control buttons that has been tested; you can modify and use it.

Step 1: Search for these codes in the userChrome.css file and remove them.

@media (-moz-platform: windows) {
    .titlebar-buttonbox-container {
        position: absolute;
        left: 20px;
        top: 21px;

        :root[inFullscreen] & {
            display: none;
        }
    }

    ...............

    ...............

    ...............

    .titlebar-close:-moz-window-inactive,
    .titlebar-min:-moz-window-inactive,
    .titlebar-restore:-moz-window-inactive,
    .titlebar-max:-moz-window-inactive {
        background: url("neptune/titlebuttons/titlebutton-backdrop.svg") no-repeat;
        background-size: contain;

        @media (prefers-color-scheme: dark) {
            background: url("neptune/titlebuttons/titlebutton-backdrop-dark.svg") no-repeat;
            background-size: contain;
        }
    }
}

Step 2: Add these contents to userChrome.css.

/* Windows control buttons */
.titlebar-buttonbox-container {
    position: absolute;
    margin-block-start: 12px;
    right: 0 !important;
}

.titlebar-button {
    margin-inline: 4px !important;
    padding: 8px !important;
    border-radius: 7px;
}

#nav-bar {
    padding-inline-start: var(--toolbar-start-end-padding) !important;
}

#TabsToolbar {
    padding-inline-end: calc(3 * var(--tab-min-height) + 4 * var(--toolbar-start-end-padding) + 100px)!important;
}

#PanelUI-menu-button {
    right: calc(var(--toolbar-start-end-padding) + 100px);
}

#tabs-newtab-button,
#TabsToolbar #new-tab-button {
    right: calc(var(--tab-min-height) + 2 * var(--toolbar-start-end-padding) + 100px);
}

#unified-extensions-button {
    right: calc(2 * var(--tab-min-height) + 3 * var(--toolbar-start-end-padding) + 100px);
}
1000deaths commented 1 week ago

thank you, I appreciate your efforts!