-
Notifications
You must be signed in to change notification settings - Fork 957
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
HDPI Support? #54
Comments
I'm also interested in this... |
Hm, I don't think that's the solution. In my normal IE11 on Win8.1, the same site looks HDPI but if I open it with webview, it looks low-res.. It must be some setting for the MSHTML engine. |
Yeah, I noticed that too |
Probably related to application DPI awareness: EDIT: Or edit manifest manually: <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly> Or early in WinMain call SetProcessDpiAwareness( PROCESS_SYSTEM_DPI_AWARE ); Or SetProcessDpiAwareness( PROCESS_PER_MONITOR_DPI_AWARE ); |
Right click the exe file -> properties -> compatibility, there's an option "Override high DPI scaling behavior". Check it. |
Use the following code to adjust width and height automatically
and this works fine for most examples. |
I have a pull request which fixes this. |
I will merge it soon, don't worry!
I am about to make a meta-issue explaining the roadmap of webview for the
nearest future, some features are likely to be removed, others - reworked,
but your PR matches the overall plan, thanks for making it!
…On Fri, Jun 22, 2018 at 2:47 PM zenakuten ***@***.***> wrote:
I have a pull request which fixes this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#54 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB0r0L5ihXAWhV3-CkSwiYZOxr0dG2MDks5t_OdEgaJpZM4RMFvh>
.
--
"One must have a chaos inside oneself to give birth to a dancing star." -
Thus Spoke Zarathustra
|
Woah that was a quick reply. :) I took a drink of coffee, looked back over and here it is. Nice thank you for the great project |
Did this PR ever get merged? |
When I execute binary files directly, the application is not blurred. But when the application is packaged and run, the window becomes blurred. I use macOS. https://github.com/mantou132/evernote-webview |
I have a fix for windows that extends the minimal-go example.
No idea about mac so sorry about that but I hope this helps. |
Was there a regression of sorts? I think the pull request was for old version of this library that used the msedge HTML, and needs to be fixed for webview2 Edge implementation too. I'm testing the webview_rust in Windows 10, the windows are blurry. For webview_rust one can fix it like this: Cargo.toml [target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.9", features = ["shellscalingapi"] } main.rs fn main() {
#[cfg(target_os = "windows")]
unsafe {
winapi::um::shellscalingapi::SetProcessDpiAwareness(2);
}
// Rest of the application ... |
This library also doesn't support display scaling from KDE, when the display is scaled, the GTK+ webkit doesn't scale properly and elements are too small. |
So recently, I started using this library again and I've found a workaround for Linux. ✨ Use First, get the scale factor let scale_factor = {
use winit::{event_loop::EventLoop, window::WindowBuilder};
let event_loop = EventLoop::new();
let window = WindowBuilder::new()
.with_maximized(false)
.with_visible(false)
.build(&event_loop)?;
let scale_factor = window.scale_factor();
println!("Scale factor: {}", scale_factor);
drop(window);
scale_factor
}; Then, instantiate the webview and call webview.set_zoom_level(scale_factor); |
Closing as stale. The current situation on Windows is that the library enables DPI awareness. |
Hi,
I really love this library, and it is super useful to me. I was wondering about HDPI support, at least on windows. On my machine, the opened web browser looks very pixelated. IE10 looks just fine, and supports high definition fonts, but the window that this opens up just looks blocky.
Is there any way I can make the webview work well with HDPI displays?
The text was updated successfully, but these errors were encountered: