Created attachment 147586 [details] screenshot showing the problem When using SAL_USE_VCLPLUGIN=qt5, all fonts, tooltips, toolbar icons etc. are way too large. Only the menu bar is the right size. (See attached screenshot). This is on X11 at a resolution of 1920x1080 in Plasma 5.14.4 (Qt 5.11.2). Other Qt/KDE applications look right. SAL_USE_VCLPLUGIN=kde5 is better (though not 100% right, will file another report for that), SAL_USE_VCLPLUGIN=gtk3 looks perfect.
FWIW, report about the possibly related problem with SAL_USE_VCLPLUGIN=kde5 is bug 122133
Interesting phenomenon, which I can't reproduce. It's not related to bug 122133. One eventually related bug is 121283. The menu bar is a real QMenu, so I guess that's the reason why it's font is ok. Currently I have no idea what might force icon and font scaling in LO. I guess it's something DPI related, but have currently no idea how to reproduce this. Is this some small screen like a 10" notebook, which might result in a high DPI value? What's your output for xdpyinfo? The interesting part looks something like: $ xdpyinfo ... screen #0: dimensions: 1920x1200 pixels (508x317 millimeters) resolution: 96x96 dots per inch ...
I'm setting the bug to NEEDINFO. Please change the bug back to UNCONFIRMED when you have provided the requested information. Please also include the following stuff: - check the possible settings mentioned in http://doc.qt.io/qt-5/highdpi.html (paragraph: High DPI Support in Qt), especially the environment variables of the soffice.bin process via /proc. - provide the kwin support information via "qdbus org.kde.KWin /KWin supportInformation".
This is on a 24" desktop screen. xdpyinfo doesn't say anything too surprising. screen #0: dimensions: 1920x1080 pixels (508x285 millimeters) resolution: 96x96 dots per inch The only relevant bit in /proc/$(pidof soffice.bin)/environ is QT_AUTO_SCREEN_SCALE_FACTOR=0 $ qdbus org.kde.KWin /KWin supportInformation KWin Support Information: The following information should be used when requesting support on e.g. http://forum.kde.org. It provides information about the currently running instance, which options are used, what OpenGL driver and which effects are running. Please post the information provided underneath this introductory text to a paste bin service like http://paste.kde.org instead of pasting into support threads. ========================== Version ======= KWin version: 5.14.4 Qt Version: 5.12.0 Qt compile version: 5.11.2 XCB compile version: 1.13.1 Operation Mode: X11 only Build Options ============= KWIN_BUILD_DECORATIONS: yes KWIN_BUILD_TABBOX: yes KWIN_BUILD_ACTIVITIES: yes HAVE_DRM: yes HAVE_GBM: yes HAVE_X11_XCB: yes HAVE_EPOXY_GLX: yes HAVE_WAYLAND_EGL: yes X11 === Vendor: OpenMandriva Vendor Release: 12003000 Protocol Version/Revision: 11/0 SHAPE: yes; Version: 0x11 RANDR: yes; Version: 0x14 DAMAGE: yes; Version: 0x11 Composite: yes; Version: 0x4 RENDER: yes; Version: 0xb XFIXES: yes; Version: 0x50 SYNC: yes; Version: 0x31 GLX: yes; Version: 0x0 Decoration ========== Plugin: org.kde.breeze Theme: Blur: 0 onAllDesktopsAvailable: false alphaChannelSupported: true closeOnDoubleClickOnMenu: false decorationButtonsLeft: 0, 2 decorationButtonsRight: 6, 3, 4, 5 borderSize: 3 gridUnit: 10 font: Noto Sans,10,-1,5,50,0,0,0,0,0 smallSpacing: 2 largeSpacing: 10 Platform ========== Name: KWin::X11StandalonePlatform Options ======= focusPolicy: 0 nextFocusPrefersMouse: false clickRaise: true autoRaise: false autoRaiseInterval: 0 delayFocusInterval: 0 shadeHover: false shadeHoverInterval: 250 separateScreenFocus: false placement: 4 focusPolicyIsReasonable: true borderSnapZone: 10 windowSnapZone: 10 centerSnapZone: 0 snapOnlyWhenOverlapping: false rollOverDesktops: true focusStealingPreventionLevel: 1 legacyFullscreenSupport: false operationTitlebarDblClick: 5000 operationMaxButtonLeftClick: 5000 operationMaxButtonMiddleClick: 5015 operationMaxButtonRightClick: 5014 commandActiveTitlebar1: 0 commandActiveTitlebar2: 30 commandActiveTitlebar3: 2 commandInactiveTitlebar1: 4 commandInactiveTitlebar2: 30 commandInactiveTitlebar3: 2 commandWindow1: 7 commandWindow2: 8 commandWindow3: 8 commandWindowWheel: 31 commandAll1: 10 commandAll2: 3 commandAll3: 14 keyCmdAllModKey: 16777251 showGeometryTip: false condensedTitle: false electricBorderMaximize: true electricBorderTiling: true electricBorderCornerRatio: 0.25 borderlessMaximizedWindows: false killPingTimeout: 5000 hideUtilityWindowsForInactive: true inactiveTabsSkipTaskbar: false autogroupSimilarWindows: false autogroupInForeground: true compositingMode: 1 useCompositing: true compositingInitialized: true hiddenPreviews: 1 glSmoothScale: 0 xrenderSmoothScale: false maxFpsInterval: 16666666 refreshRate: 0 vBlankTime: 6000000 glStrictBinding: true glStrictBindingFollowsDriver: true glCoreProfile: true glPreferBufferSwap: 101 glPlatformInterface: 1 windowsBlockCompositing: true Screen Edges ============ desktopSwitching: false desktopSwitchingMovingClients: true cursorPushBackDistance: 1x1 timeThreshold: 150 reActivateThreshold: 350 actionTopLeft: 0 actionTop: 0 actionTopRight: 0 actionRight: 0 actionBottomRight: 0 actionBottom: 0 actionBottomLeft: 0 actionLeft: 0 Screens ======= Multi-Head: no Active screen follows mouse: no Number of Screens: 1 Screen 0: --------- Name: HDMI-2 Geometry: 0,0,1920x1080 Scale: 1 Refresh Rate: 60 Compositing =========== Compositing is active Compositing Type: OpenGL OpenGL vendor string: Intel Open Source Technology Center OpenGL renderer string: Mesa DRI Intel(R) Haswell Desktop OpenGL version string: 4.5 (Core Profile) Mesa 18.3.1 OpenGL platform interface: GLX OpenGL shading language version string: 4.50 Driver: Intel GPU class: Haswell OpenGL version: 4.5 GLSL version: 4.50 Mesa version: 18.3.1 Linux kernel version: 4.20 Direct rendering: Requires strict binding: yes GLSL shaders: yes Texture NPOT support: yes Virtual Machine: no OpenGL 2 Shaders are used Painting blocks for vertical retrace: no Loaded Effects: --------------- zoom kwin4_effect_fade kwin4_effect_frozenapp kwin4_effect_login kwin4_effect_maximize kwin4_effect_logout kwin4_effect_translucency kwin4_effect_morphingpopups kwin4_effect_windowaperture kwin4_effect_dialogparent slidingpopups slide screenshot minimizeanimation desktopgrid cube colorpicker presentwindows highlightwindow blur contrast startupfeedback screenedge kscreen Currently Active Effects: ------------------------- blur contrast Effect Settings: ---------------- zoom: zoomFactor: 1.2 mousePointer: 0 mouseTracking: 0 enableFocusTracking: false followFocus: true focusDelay: 350 moveFactor: 20 targetZoom: 1 kwin4_effect_fade: kwin4_effect_frozenapp: kwin4_effect_login: kwin4_effect_maximize: kwin4_effect_logout: kwin4_effect_translucency: kwin4_effect_morphingpopups: kwin4_effect_windowaperture: kwin4_effect_dialogparent: slidingpopups: slideInDuration: 150 slideOutDuration: 250 slide: duration: 500 horizontalGap: 45 verticalGap: 20 slideDocks: false slideBackground: true screenshot: minimizeanimation: desktopgrid: zoomDuration: 300 border: 10 desktopNameAlignment: 0 layoutMode: 0 customLayoutRows: 2 usePresentWindows: true cube: cubeOpacity: 0.800000011920929 opacityDesktopOnly: false displayDesktopName: true reflection: true rotationDuration: 500 backgroundColor: #000000 capColor: #eff0f1 paintCaps: true closeOnMouseRelease: false zPosition: 100 useForTabBox: false invertKeys: false invertMouse: false capDeformationFactor: 0 useZOrdering: false texturedCaps: true colorpicker: presentwindows: layoutMode: 0 showCaptions: true showIcons: true doNotCloseWindows: false ignoreMinimized: false accuracy: 20 fillGaps: true fadeDuration: 150 showPanel: false leftButtonWindow: 1 rightButtonWindow: 2 middleButtonWindow: 0 leftButtonDesktop: 2 middleButtonDesktop: 0 rightButtonDesktop: 0 highlightwindow: blur: contrast: startupfeedback: type: 1 screenedge: kscreen:
Created attachment 147880 [details] Minimal Qt5 program to dump QScreen information Nothing in this output shows any problem I can identify :-( I've added a minimal program to dump all QScreen information. It's just a 64bit binary, but I included the source if you need to build a 32bit version. This can be done simply by calling $ qmake && make Please run it on the same screen from a terminal, where you start LO. For my single NEC monitor the output is: availableGeometry: QRect(0,0 1920x1170) availableSize: QSize(1920, 1170) availableVirtualGeometry: QRect(0,0 1920x1170) availableVirtualSize: QSize(1920, 1170) depth: 24 devicePixelRatio: 1 geometry: QRect(0,0 1920x1200) logicalDotsPerInch: 96.0757 logicalDotsPerInchX: 96 logicalDotsPerInchY: 96.1514 nativeOrientation: Qt::ScreenOrientation(PrimaryOrientation) orientation: Qt::ScreenOrientation(LandscapeOrientation) orientationUpdateMask: QFlags<Qt::ScreenOrientation>(PrimaryOrientation) physicalDotsPerInch: 94.1104 physicalDotsPerInchX: 94.1467 physicalDotsPerInchY: 94.0741 physicalSize: QSizeF(518, 324) primaryOrientation: Qt::ScreenOrientation(LandscapeOrientation) refreshRate: 59 size: QSize(1920, 1200) virtualGeometry: QRect(0,0 1920x1200) virtualSiblings: (QScreen(0x563f582e6780, name="DVI-0")) virtualSize: QSize(1920, 1200) Thanks.
The interesting part is probably physicalSize (and the resulting physicalDotsPerInch). Those numbers look off... (but KDE and other Qt applications look perfect). manufacturer: "Samsung Electric Company" model: "SyncMaster-" name: "HDMI-2" serialNumber: "1162228275" availableGeometry: QRect(0,0 1920x1026) availableSize: QSize(1920, 1026) availableVirtualGeometry: QRect(0,0 1920x1026) availableVirtualSize: QSize(1920, 1026) depth: 24 devicePixelRatio: 1 geometry: QRect(0,0 1920x1080) logicalDotsPerInch: 96 logicalDotsPerInchX: 96 logicalDotsPerInchY: 96 nativeOrientation: Qt::PrimaryOrientation orientation: Qt::LandscapeOrientation orientationUpdateMask: QFlags<Qt::ScreenOrientation>(PrimaryOrientation) physicalDotsPerInch: 304.8 physicalDotsPerInchX: 304.8 physicalDotsPerInchY: 304.8 physicalSize: QSizeF(160, 90) primaryOrientation: Qt::LandscapeOrientation refreshRate: 60 size: QSize(1920, 1080) virtualGeometry: QRect(0,0 1920x1080) virtualSiblings: (QScreen(0x55aff8c7a610, name="HDMI-2")) virtualSize: QSize(1920, 1080)
(In reply to Bernhard Rosenkraenzer from comment #6) > The interesting part is probably physicalSize (and the resulting > physicalDotsPerInch). Those numbers look off... (but KDE and other Qt > applications look perfect). > > logicalDotsPerInch: 96 > physicalDotsPerInch: 304.8 > physicalSize: QSizeF(160, 90) Yup - that would be a tiny screen, as it's in mm... xdpyinfo seems more correct with "508x317 millimeters"; not sure if this is a guess based on the 96 DPI or on real data. The icons are roughly scaled 3x when I tried to measure their rectangle using gimp, so that would correspond to logicalDotsPerInch : physicalDotsPerInch. Currently Qt5Font uses QFont::setPixelSize to set the font size. Quoting the docs: "Using this function makes the font device dependent. Use setPointSize() or setPointSizeF() to set the size of the font in a device independent manner." So in theory - setPixelSize(rFSP.mnHeight); + setPointSizeF(rFSP.mfExactHeight * 72.0 / QGuiApplication::primaryScreen()->logicalDotsPerInch()); should fix your problem. Docs for QScreen::logicalDotsPerInch claim "this value can be used to convert font point sizes to pixel sizes". My final patch is a bit different. LO still looks ok for me, but I have no idea, if this would work for you. Maybe this needs adaption of Qt5Font::ImplGetGlyphBoundRect too Can you test the patch at https://gerrit.libreoffice.org/#/c/65696/ ?
Still looks the same after applying the patch (and updating to 6.2.0.1)
New patch, which might be related: https://gerrit.libreoffice.org/#/c/66525/
(In reply to Jan-Marek Glogowski from comment #9) > New patch, which might be related: https://gerrit.libreoffice.org/#/c/66525/ @Bernhard: The patch was merged to master now. Any chance you could do a quick test whether this fixes the issue for you?
Setting to NEEDINFO until the question from comment:10 has been answered.
(In reply to Michael Weghorn from comment #10) > (In reply to Jan-Marek Glogowski from comment #9) > > New patch, which might be related: https://gerrit.libreoffice.org/#/c/66525/ > > @Bernhard: The patch was merged to master now. Any chance you could do a > quick test whether this fixes the issue for you? Since a potential fix has been merged and there has been no reply in the meantime, let's set this to WORKSFORME. @Bernhard: Please just reopen this bug if the problem is still there for you with a current master build.