Skip to content
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
79 changes: 71 additions & 8 deletions css/leptonChrome.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 35 additions & 3 deletions css/leptonChromeESR.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/tabbar/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
@include Option("userChrome.tabbar.on_bottom", "userChrome.tabbar.one_liner", "userChrome.hidden.tabbar") {
@import "layout";
}
@include Option("userChrome.hidden.tabbar") {
@include NotOption("userChrome.hidden.titlebar_container") {
@import "layout/hidden_tabbar_window_control";
}
}

/*= Tab Bar - Show only current tab ==========================================*/
@include Option("userChrome.tabbar.as_titlebar") {
Expand Down
33 changes: 33 additions & 0 deletions src/tabbar/layout/_hidden_tabbar_window_control.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Firefox keeps a titlebar-control copy in the nav bar and normally enables it
// only when native vertical tabs set `tabs-hidden`. Lepton hides the horizontal
// tab bar with CSS, so opt into that copy directly.
#nav-bar > .titlebar-buttonbox-container {
display: flex !important;
}

// Match the drag space at the start of the nav bar on the inner side of
// right-aligned window controls. Firefox normally exposes this spacer only
// when its native tab strip is hidden.
@include WindowControl_Right {
:root[sizemode="normal"]
Comment on lines +11 to +12

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like using a different option might cause problems due to the size mode.
I will review it over the weekend, make corrections, and merge it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was intentional, to match the behavior when the pre-spacer also appears only when the browser window is not maximized - which, if I remember correctly, was Lepton's behavior a several versions back.
Admittedly, I tested it only on my Windows configuration with right-side window controls, as left-sided variations are out of scope of my personal interest.

#toolbar-menubar[autohide][inactive]
~ #nav-bar
> .titlebar-spacer[type="post-tabs"] {
display: flex !important;
}
}

// Lepton's existing hidden-tabbar rules expose the menubar copy, so suppress it
// while the nav-bar copy is in use.
#toolbar-menubar[inactive] > .titlebar-buttonbox-container {
display: none !important;
}

// A permanently visible menubar owns the controls, so hide the nav-bar copy
// just as Firefox does for native vertical tabs.
:root:not([chromehidden~="menubar"], [inFullscreen])
#toolbar-menubar:not([autohide], [collapsed])
~ #nav-bar
> .titlebar-buttonbox-container {
display: none !important;
}
13 changes: 10 additions & 3 deletions src/tabbar/layout/_window_control_size.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,16 @@
}
}

@include Has {
#navigator-toolbox:has(#toolbar-menubar[autohide="false"]) {
@include _remove_spacer_pre;
@include Option("userChrome.hidden.tabbar") {
// The nav bar contains the actual controls, so don't reserve an additional
// fixed-width gap. Retain the pre-control drag space in a normal window.
#navigator-toolbox {
@include _remove_spacer_post;
}
}

// A permanently visible menu bar has no `autohide` attribute.
#navigator-toolbox:has(#toolbar-menubar:not([autohide], [collapsed])) {
@include _remove_spacer_pre;
@include _remove_spacer_post;
}
Loading