feat(client): move toggle sidebar to tab bar on horizontal layout

This commit is contained in:
Elian Doran 2024-11-30 01:20:47 +02:00
parent 29d6ef85ff
commit ca6687208b
No known key found for this signature in database
4 changed files with 16 additions and 2 deletions

View File

@ -101,6 +101,7 @@ export default class DesktopLayout {
.class((launcherPaneIsHorizontal ? "horizontal" : "vertical") + "-layout")
.optChild(launcherPaneIsHorizontal, new FlexContainer('row')
.class("tab-row-container")
.child(new LeftPaneToggleWidget(true))
.child(new TabRowWidget().class("full-width"))
.child(new TitleBarButtonsWidget())
.css('height', '40px')
@ -244,7 +245,6 @@ export default class DesktopLayout {
launcherPane = new FlexContainer("row")
.css("height", "53px")
.class("horizontal")
.child(new LeftPaneToggleWidget(true))
.child(new LauncherContainer(true))
.child(new GlobalMenuWidget(true))
} else {

View File

@ -7,7 +7,7 @@ export default class LeftPaneToggleWidget extends CommandButtonWidget {
constructor(isHorizontalLayout) {
super();
this.class("launcher-button");
this.class(isHorizontalLayout ? "toggle-button" : "launcher-button");
this.settings.icon = () => options.is('leftPaneVisible')
? "bx-chevrons-left"

View File

@ -1269,3 +1269,13 @@ textarea {
color: var(--muted-text-color);
}
.tab-row-container .toggle-button {
background: transparent;
appearance: none;
border: 0;
width: 24px;
height: 24px;
color: var(--launcher-pane-text-color);
margin: 8px 10px;
font-size: 18px;
}

View File

@ -614,6 +614,10 @@ html body #left-pane .quick-search:focus-within .search-button:hover,
height: var(--tab-bar-height) !important;
}
.tab-row-container .toggle-button {
margin: 13px 10px !important;
}
.tab-row-widget-container {
margin-top: calc((var(--tab-bar-height) - var(--tab-height)) / 2);
height: var(--tab-height) !important;