-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: add zoom config on UI and fix zoom-related issues #853
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Win
:aria-describedby="descriptionId" | ||
inputmode="number" | ||
:value="zoomFactorPercentage" | ||
@change="zoomFactorPercentage = $event.target.value" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal, but should we handle border values here (NcTextField, NcButton)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is handled by zoomFactorPercentage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant that it's still possible to set out of range values in UI, they just not kept in config and not reflected in the app window
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has different limits. Will put it to constants
src/app/zoom.service.ts
Outdated
|
||
browserWindow.webContents.setZoomFactor(zoom) | ||
// Resize the title bar to match the new zoom level | ||
browserWindow.setTitleBarOverlay({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
<NcSelect v-model="model" | ||
class="settings-select" | ||
:options="options" | ||
:clearable="false" | ||
:searchable="false" | ||
:input-id="inputId" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0313597
to
854b971
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ✅ 🦅
This part I cannot reproduce |
Styles aren't scoped to NcDateTimePicker: nextcloud-libraries/nextcloud-vue#6095 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So bug is unrelated to this PR, new changes look good
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
0684a74
to
9f53501
Compare
Squashed fixups, rebased onto main |
☑️ Resolves
zoomFactor
config to application configImplementations notes
Solution complexity
Zoom can be changes with user settings
zoom-changed
eventMenuItem
s and cannot be handledBecause the last option is not possible to handle in Electron at all, and there is no generic zoom changed event, the solution is a bit complex.
Zoom step
On each step zoom can be changed:
+20%
20% - 40% - 60% ... 100% - 120% ... 300% - 320%
20% -> 40%
is dramaticx2
while300% - 320%
slightly visiblex20%
:100% - 120% - 144% - 172.8%
Option 2 was chosen.
🖼️ Screenshots
Settings
Title bar height change (pay attention on the window buttons)
Windows on 200%