Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Electron-only UI scale setting outside of Electron #6488

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

absidue
Copy link
Member

@absidue absidue commented Dec 30, 2024

Hide Electron-only UI scale setting outside of Electron

Pull Request Type

  • Bugfix

Related issue

Description

FreeTube's UI scale setting only works in Electron as it sets the zoom level of the window through an Electron API, so we should hide it outside of Electron (e.g. FreeTubeAndroid). I also removed the unnecessary call to parseInt, as the value in ft-slider's change emit is already a number.

uiScale: {
defaultValue: 100,
sideEffectsHandler: (_, value) => {
if (process.env.IS_ELECTRON) {
const { webFrame } = require('electron')
webFrame.setZoomFactor(value / 100)
}
}
}
}

Testing

  1. yarn dev
  2. Check that the setting still shows up
  3. yarn dev:web
  4. Check that the setting is hidden

Desktop

  • OS: Windows
  • OS Version: 10
  • FreeTube version: b01abad

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) December 30, 2024 23:19
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 30, 2024
@FreeTubeBot FreeTubeBot merged commit ec59b02 into FreeTubeApp:development Dec 30, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 30, 2024
@absidue absidue deleted the ui-scale-electron branch December 31, 2024 09:51
SuperAKWA pushed a commit to SuperAKWA/FreeTube that referenced this pull request Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants