Created attachment 198894 [details] Demonstration video See attached demonstration video. 1. Open Writer (it can be a blank document, or a document with contents) 2. Make sure page Zoom Factor is set to "Fit width". Zoom's "View Layout" can be "Automatic" (i.e. single page) or "Columns: 2". 3. Slowly resize the width of the window Result: the horizontal scrollbar frantically pops in and out of the view depending on the exact pixel position/width of the window. This issue can also happen on startup / window creation, not just during resize. --- Tested on GNOME 47.2's Wayland session on Fedora 41, with: Version: 24.8.4.2 (X86_64) / LibreOffice Community Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002 CPU threads: 8; OS: Linux 6.12; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Flatpak Calc: threaded
With my geek hat on, I'll also venture a guess that beyond the visual symptoms, this (and bug #164963) opens the potential for a performance optimization too: If it's flashing the scrollbar like that, that means it's constantly calculating the width and checking whether it should be showing the scrollbar during resize. That is certainly very wasteful and contributes to unnecessary CPU usage, redraws, jank, etc. If possible, don't make those checks at all when the zoom mode is set to automatically "Fit width" or "Fit width and height".
Tested on LibreOffice 25.8.3.2 (x86_64) on Windows 11. Version: 25.8.3.2 (X86_64) CPU threads: 32 OS: Windows 11 (build 26200) UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Using View → Zoom → Page Width in a blank Writer document, the horizontal scrollbar remains visible but stable. During slow window resize, the scrollbar does not flicker, pop in/out, or change visibility depending on pixel width. The behavior is consistent and reproducible, and no flickering was observed on startup either. The flickering behavior could not be reproduced on Windows in this configuration.
Repro already in oldest of linux-43all repo. Contrary to comment 2, I also repro on windows.
I did some searching and debugging and found that SwView::UpdateScrollbars() in sw/source/uibase/uiview/viewport.cxx is relevant to this. The machinery there seems rather complicated and I'm not sure where to stick a conditional for this. Other stuff: SwView::IsHScrollbarVisible() in sw/source/uibase/uiview/viewmdi.cxx
Bonus: the flag for Fit width zoom is SvxZoomEnableFlags::PAGEWIDTH
Let's make this an easy hack. I'm not the best person to review patches for this, but I will find someone. Bug 164963 could be tackled in the same patch or in a separate patch depending on how many changes are needed. There the relevant zoom flag is SvxZoomEnableFlags::WHOLEPAGE