sniffnet
sniffnet copied to clipboard
Font is comically large
Describe the bug
(nemo font for comparison)
Desktop (please complete the following information):
- OS: Arch Linux 6.2.12-arch1-1
- Version: 1.2.0
- WM: bspwm 0.9.10
I'm not sure what is causing this
Could you also post a screenshot with Sniffnet at full screen, please?
Sorry for the late reply, here it is
I've had this problem with another application before, and I think it was related to it incorrectly identifying the screen (?) as a high-dpi one. I could be wrong though.
If you have Rust installed, I can suggest building the app against the glow-renderer branch which uses an alternative renderer (glow instead of wgpu).
I don't know if it's related but maybe it helps.
I have a similar issue on my laptop screen. It has a normal 1920x1080 resolution and is configured to use a 125% zoom. The font size in sniffnet looks more like 200%. However, it looks normal on my external screen (also 1920x1080).
I'm using Manjaro Linux with KDE Plasma.
I have a similar issue on my laptop screen.
Could you try the glow-renderer branch and let me know if it changes something?
@GyulyVGC I have the same bug with the glow-renderer branch.
JFYI guys I've set up an alternative branch in which the text size is reduced to 67% of the original value.
To note that this is not a definitive solution, but considering that a very minor part of the users incurred in this issue and that the GUI library in use is completely changing its text handling strategy, I think it's enough for the moment.
I will come back with updates as soon as the GUI library publishes a release featuring the new text management.
@GyulyVGC Is there an open issue in the iced repo? I couldn't find one. I ran some examples from the iced repo, and they have the same bug.
@GyulyVGC Is there an open issue in the
icedrepo? I couldn't find one. I ran some examples from the iced repo, and they have the same bug.
Not that I'm aware of, but I didn't check yet specifically.
JFYI guys I've set up an alternative branch in which the text size is reduced to 67% of the original value.
To note that this is not a definitive solution, but considering that a very minor part of the users incurred in this issue and that the GUI library in use is completely changing its text handling strategy, I think it's enough for the moment.
I will come back with updates as soon as the GUI library publishes a release featuring the new text management.
Iced released a version characterised by the new text handling strategy. However, this issue is not related to that.
I found out that Iced has a really nice way of setting a scale factor different than 1.0. In this way, it's possible to resize all the widgets, not just text. In the next release of Sniffnet (v.1.3 most likely) it will be possible to set a custom scale factor for the UI.
@Aloso @mvrozanti can you please try building from this branch and let me know if by lowering the scale factor the issue is solved? You can change the scale factor from the application settings (top right corner of the app) in the rightmost tab (advanced settings).
I got the following error after running using that branch:
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_wgpu-0.11.1/src/text.rs:206:25
stack backtrace:
0: rust_begin_unwind
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:593:5
1: core::panicking::panic_fmt
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:67:14
2: core::panicking::panic_bounds_check
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:162:5
3: <usize as core::slice::index::SliceIndex<[T]>>::index
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/slice/index.rs:258:10
4: core::slice::index::<impl core::ops::index::Index<I> for [T]>::index
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/slice/index.rs:18:9
5: <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/alloc/src/vec/mod.rs:2690:9
6: iced_wgpu::text::Pipeline::render
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_wgpu-0.11.1/src/text.rs:206:25
7: iced_wgpu::backend::Backend::render
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_wgpu-0.11.1/src/backend.rs:303:17
8: iced_wgpu::backend::Backend::present
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_wgpu-0.11.1/src/backend.rs:105:9
9: iced_wgpu::window::compositor::present
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_wgpu-0.11.1/src/window/compositor.rs:176:13
10: <iced_renderer::compositor::Compositor<Theme> as iced_graphics::compositor::Compositor>::present::{{closure}}
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_renderer-0.1.0/src/compositor.rs:124:17
11: iced_graphics::renderer::Renderer<B,T>::with_primitives
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_graphics-0.9.0/src/renderer.rs:51:9
12: <iced_renderer::compositor::Compositor<Theme> as iced_graphics::compositor::Compositor>::present
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_renderer-0.1.0/src/compositor.rs:123:18
13: iced_winit::application::run_instance::{{closure}}
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.10.0/src/application.rs:523:23
14: iced_winit::application::run::{{closure}}
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.10.0/src/application.rs:251:24
15: winit::platform_impl::platform::sticky_exit_callback
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.6/src/platform_impl/linux/mod.rs:884:9
16: winit::platform_impl::platform::x11::EventLoop<T>::run_return::single_iteration
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.6/src/platform_impl/linux/x11/mod.rs:375:21
17: winit::platform_impl::platform::x11::EventLoop<T>::run_return
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.6/src/platform_impl/linux/x11/mod.rs:443:31
18: winit::platform_impl::platform::EventLoop<T>::run_return
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.6/src/platform_impl/linux/mod.rs:785:56
19: <winit::event_loop::EventLoop<T> as winit::platform::run_return::EventLoopExtRunReturn>::run_return
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.6/src/platform/run_return.rs:51:9
20: iced_winit::application::platform::run
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.10.0/src/application.rs:909:17
21: iced_winit::application::run
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.10.0/src/application.rs:226:5
22: iced::application::Application::run
at /home/m/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced-0.10.0/src/application.rs:208:12
23: sniffnet::main
at /home/m/adata/util/sniffnet/src/main.rs:119:5
24: core::ops::function::FnOnce::call_once
at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
%
@mvrozanti @Aloso hey guys, a fix to this issue has just been merged to the main branch (implemented as part of #365).
This and many other changes will be officially released in version 1.3.
Nice! Glad to hear!
I just tested it, it works fine after you set the zoom. Perhaps the default should be 0.5x? Just an idea, I'm not sure. I'm gonna play around with this now lol I've been dying to do so for a while. Thanks again @GyulyVGC !
@mvrozanti 0.5 is far too small for most of the environments. x1.0 is best for most setups. Anyway, if you set it to x0.5 and then close the app, it will automatically open again with x0.5, isn't it?
It does indeed, right on