mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Allowing to disable hardware acceleration
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
2a9d39a8b9
commit
cd9a442fe1
@ -27,6 +27,7 @@ export interface UserPreferences {
|
|||||||
downloadKubectlBinaries?: boolean;
|
downloadKubectlBinaries?: boolean;
|
||||||
downloadBinariesPath?: string;
|
downloadBinariesPath?: string;
|
||||||
kubectlBinariesPath?: string;
|
kubectlBinariesPath?: string;
|
||||||
|
disableHardwareAcceleration?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class UserStore extends BaseStore<UserStoreModel> {
|
export class UserStore extends BaseStore<UserStoreModel> {
|
||||||
|
|||||||
@ -56,7 +56,6 @@ async function main() {
|
|||||||
|
|
||||||
// preload configuration from stores
|
// preload configuration from stores
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
userStore.load(),
|
|
||||||
clusterStore.load(),
|
clusterStore.load(),
|
||||||
workspaceStore.load(),
|
workspaceStore.load(),
|
||||||
]);
|
]);
|
||||||
@ -77,6 +76,12 @@ async function main() {
|
|||||||
windowManager = new WindowManager(proxyPort);
|
windowManager = new WindowManager(proxyPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disable hardware acceleration if flag is checked in Preferences
|
||||||
|
userStore.load();
|
||||||
|
if (userStore.preferences.disableHardwareAcceleration) {
|
||||||
|
app.disableHardwareAcceleration();
|
||||||
|
}
|
||||||
|
|
||||||
app.on("ready", main);
|
app.on("ready", main);
|
||||||
|
|
||||||
app.on("will-quit", async (event) => {
|
app.on("will-quit", async (event) => {
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import { themeStore } from "../../theme.store";
|
|||||||
import { history } from "../../navigation";
|
import { history } from "../../navigation";
|
||||||
import { Tooltip } from "../tooltip";
|
import { Tooltip } from "../tooltip";
|
||||||
import { KubectlBinaries } from "./kubectl-binaries";
|
import { KubectlBinaries } from "./kubectl-binaries";
|
||||||
|
import { isMac } from "../../../common/vars";
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
export class Preferences extends React.Component {
|
export class Preferences extends React.Component {
|
||||||
@ -194,6 +195,21 @@ export class Preferences extends React.Component {
|
|||||||
<small className="hint">
|
<small className="hint">
|
||||||
<Trans>Telemetry & usage data is collected to continuously improve the Lens experience.</Trans>
|
<Trans>Telemetry & usage data is collected to continuously improve the Lens experience.</Trans>
|
||||||
</small>
|
</small>
|
||||||
|
|
||||||
|
{isMac && (
|
||||||
|
<>
|
||||||
|
<h2><Trans>Hardware Acceleration</Trans></h2>
|
||||||
|
<Checkbox
|
||||||
|
label={<Trans>Disable hardware acceleration</Trans>}
|
||||||
|
value={preferences.disableHardwareAcceleration}
|
||||||
|
onChange={v => preferences.disableHardwareAcceleration = v}
|
||||||
|
/>
|
||||||
|
<small className="hint">
|
||||||
|
<Trans>Enabled hardware acceleration can cause rendering issues on some devices with the MacOS.</Trans><br />
|
||||||
|
<Trans>You need to restart the app to activate the changes.</Trans>
|
||||||
|
</small>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</WizardLayout>
|
</WizardLayout>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user