mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Restore linux native view
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
1e459dc501
commit
d1ac212143
@ -86,6 +86,7 @@ export class WindowManager extends Singleton {
|
||||
minWidth: 700, // accommodate 800 x 600 display minimum
|
||||
minHeight: 500, // accommodate 800 x 600 display minimum
|
||||
titleBarStyle: isWindows ? "hidden" : "hiddenInset",
|
||||
autoHideMenuBar: true,
|
||||
backgroundColor: "#1e2124",
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
|
||||
@ -47,13 +47,7 @@ describe("<Tobar/> in Linux", () => {
|
||||
TopBarRegistry.resetInstance();
|
||||
});
|
||||
|
||||
it("shows menu icon", () => {
|
||||
const { getByTestId } = render(<TopBar/>);
|
||||
|
||||
expect(getByTestId("window-menu")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("doesn't show windows title buttons", () => {
|
||||
it("doesn't show custom title buttons used in Windows", () => {
|
||||
const { queryByTestId } = render(<TopBar/>);
|
||||
|
||||
expect(queryByTestId("window-minimize")).not.toBeInTheDocument();
|
||||
|
||||
@ -33,6 +33,10 @@
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
:global(.is-mac) .topBar {
|
||||
padding-left: var(--hotbar-width);
|
||||
}
|
||||
|
||||
.winMenu {
|
||||
width: var(--hotbar-width);
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ import { watchHistoryState } from "../../remote-helpers/history-updater";
|
||||
import { isActiveRoute, navigate } from "../../navigation";
|
||||
import { catalogRoute, catalogURL } from "../../../common/routes";
|
||||
import { IpcMainWindowEvents } from "../../../main/window-manager";
|
||||
import { isLinux, isWindows } from "../../../common/vars";
|
||||
import { isWindows } from "../../../common/vars";
|
||||
|
||||
interface Props extends React.HTMLAttributes<any> {
|
||||
}
|
||||
@ -125,13 +125,13 @@ export const TopBar = observer(({ children, ...rest }: Props) => {
|
||||
return (
|
||||
<div className={styles.topBar} onDoubleClick={windowSizeToggle} ref={elem} {...rest}>
|
||||
<div className={styles.tools}>
|
||||
<div className={styles.winMenu}>
|
||||
{(isWindows || isLinux) && (
|
||||
{isWindows && (
|
||||
<div className={styles.winMenu}>
|
||||
<div onClick={openContextMenu} data-testid="window-menu">
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" shapeRendering="crispEdges"><path fill="currentColor" d="M0,8.5h12v1H0V8.5z"/><path fill="currentColor" d="M0,5.5h12v1H0V5.5z"/><path fill="currentColor" d="M0,2.5h12v1H0V2.5z"/></svg>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<Icon
|
||||
data-testid="home-button"
|
||||
material="home"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user