summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qfusionstyle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Docs: silence documentation warning in QFusionStyleVolker Hilsheimer7 days1-1/+1
| | | | | | | | QFusionStyle::iconFromTheme is not a reimplementation of a virtual function, so document it as internal instead of \reimp. Change-Id: I676de4aa68c41af8982e55d8bcf24a7cdc202c7c Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QStyleHelper: pass devicePixelRatio to uniqueName()Christian Ehrlicher2024-04-221-6/+8
| | | | | | | | | | | QStyleHelper::uniqueName() took the size of the pixmap to cache but not the dpr. This might lead to a situation (e.g. in a multi-display environment) where we use a pixmap with the wrong dpr and get a pixelated result on the screen. Change-Id: Ifdebeddff3380931398b3284a7757b7da950caa9 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
* QStyle: let styleCachePixmap() use the correct devicePixelRatioChristian Ehrlicher2024-04-221-14/+12
| | | | | | | | | | | | | The helper function styleCachePixmap() might not be using the correct dpr. It was written in a time when there was only one application-wide dpr available but nowadays we have to use the dpr from the paintDevice we paint on instead. As a drive-by replace the one usage of styleCacheImage() by styleCachePixmap() and remove the now superfluous function. Change-Id: I14eb3fd3bad7f9299d42b63b03fa1f68b4f81cd6 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
* QStyle: deprecate PM_DialogButtons* enumsChristian Ehrlicher2024-04-171-1/+0
| | | | | | | | | | | | The threee enumerations - PM_DialogButtonsSeparator - PM_DialogButtonsButtonWidth - PM_DialogButtonsButtonHeight Are not documented since Qt3 times and also not used anywhere. Therefore deprecated them and remove the logic to handle them. Change-Id: Ia59fe15482e744123e7fbf04b8d44661afb58b5c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Widgets: Improve usage of string view typesAnton Kudryavtsev2024-04-081-1/+1
| | | | | | | Use string views in QFontDialog, QColorDialog and QCommonStyle Change-Id: I22f4b4694e2d18b784aaa85aebff8d92b8f0b871 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Fix -Wimplicit-fallthrough for clangTim Blechmann2024-03-011-0/+1
| | | | | | | | | | | | | | | | | | | Clang's `-Wimplicit-fallthrough` warnings are a little stricter than gcc's interpretation: switch (i) { case 0: foo(); case 4: break; } While gcc accepts the implicit fallthrough, if the following statement is a trivial `break`, clang will warn about it. Pick-to: 6.7 Change-Id: I38e0817f1bc034fbb552aeac21de1516edcbcbb0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFusionStyle: Pass handling of FrameGroupBox to base styleChristian Ehrlicher2024-02-131-15/+13
| | | | | | | | | | | | | | | | | | | The fusion style had an own handling for PE_FrameGroupBox/SC_GroupBoxFrame but failed to handle all cases (e.g. with checkbox, text and horizontal alignment) correct. In contrast, the base class (QCommonStyle) is properly handling all those attributes and returns a correct subControlRect(). Therefore remove the special handling, let styleHint() return the correct value for SH_GroupBox_TextLabelVerticalAlginment based on the groupBox's text alignment and rely on QCommonStyle ability to calculate the correct values. Pick-to: 6.7 6.6 Fixes: QTBUG-85425 Fixes: QTBUG-95472 Change-Id: I98ccf861274026a8fd4a2ef436efc3bb009be056 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
* Remove extra semi-colonsTasuku Suzuki2024-02-061-1/+1
| | | | | Change-Id: I92fddb36cd136fd1bd627955f15d0559b9942d7e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fusion style: add right side indent to groupbox titleGhenady Kuznetsov2024-02-031-3/+5
| | | | | | | | | | Add right side indent to the title if groupbox alignment is set to Qt::AlignRight | Qt::AlignVCenter. Fixes: QTBUG-121049 Pick-to: 6.7 6.6 Change-Id: I9aac295c824ad774410efd679f59075e4251b611 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Fusion style: add indent to groupbox titleGhenady Kuznetsov2024-01-311-0/+4
| | | | | | | | | | Add indent to the title if groupbox alignment is set to Qt::AlignLeft | Qt::AlignVCenter. Fixes: QTBUG-121049 Pick-to: 6.7 6.6 Change-Id: I25e2fe4e73b920baf4c678b6b0e758d1da7cf632 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Fusion style: wrongly used PixelMetric enumGhenady Kuznetsov2024-01-231-5/+5
| | | | | | | | | | | Wrongly used QStyle::PM_ExclusiveIndicatorHeight, which is height of a radio button indicator instead of QStyle::PM_IndicatorHeight, which is height of a checkbox indicator in pixelMetric() calls for checkbox subcontrol of groupbox. Pick-to: 6.7 6.6 Change-Id: Ifbf7783fd4494d1e00ee28c27fa5f62b319b8787 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Fusion style: add clip region for groupbox titleGhenady Kuznetsov2024-01-171-0/+16
| | | | | | | | | | | | | Fusion style is missing clip region for the title in QFusionStyle::drawComplexControl(). Without that region, the top line of the frame will be visible behind the vertically centered title. Fixes: QTBUG-121041 Pick-to: 6.7 6.6 Change-Id: I3daf5854195e28a5ee3cb50343e2dd56e66ed940 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QFusionStyle: draw slider in a scrollbar using lighter colorTimur Pocheptsov2024-01-161-1/+3
| | | | | | | | | | | The gradient we are using now, makes slider almost invisible in 'Dark' theme (non-transient scroll bar). Instead of using gradient for non-selected and non-pressed state, use the same color as in pressed state. Fixes: QTBUG-120971 Change-Id: I1a7e4aefa4483e8095e59d82be3d0c1c3526b28f Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Widgets: pass widget to QStyle::pixelMetric()Christian Ehrlicher2024-01-161-7/+7
| | | | | | | | | | | | Make sure to pass the widget to QStyle::pixelMetric() as some styles might use this (e.g. the new windows styles) to determine the correct pixel metric. Pick-to: 6.7 6.6 6.5 6.2 Task-number: QTBUG-1857 Change-Id: I5c32f5af8b284749732b610e56b4e3d8c8ed1946 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* Styles/fusion: Adjust QSlider painting with modified paint rectChristian Ehrlicher2024-01-121-2/+6
| | | | | | | | | | | | | | When the painting rect is adjusted within an overloaded QSlider::initStyleOption() there are some glitches when using the fusion style: - the tickmarks are not painted inside the specified rect / it is ignored - the glue groove bar is clipped incorrectly Pick-to: 6.7 6.6 Fixes: QTBUG-111314 Change-Id: If140c5348031d869b527c6c4850b4a8d34b395c1 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QFusionStyle: fix painting handle with tickmarks enabledChristian Ehrlicher2024-01-121-16/+26
| | | | | | | | | | The handle was drawn outside of the widget's rect when tickmarks were enabled (TicksAbove/TicksLeft). Pick-to: 6.7 6.6 6.5 Fixes: QTBUG-83604 Change-Id: Iff3a1a330317576a759e3fd6795d0b4849e2044b Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* CommonStyle/QSlider: use drawLines() instead single drawLine() callsChristian Ehrlicher2024-01-091-8/+10
| | | | | | | | | | Optimize the painting of the tickmarks by collecting all lines to draw in a vector and then passing all to the painter instead calling drawLine() for every single tickmark. Pick-to: 6.7 Change-Id: Ic75e733a02fbf6143d21d4630f6a6d6de913f16c Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* CommonStyle/QSlider: don't modify outline colorChristian Ehrlicher2024-01-091-7/+7
| | | | | | | | | The outline color was modified under some conditions but used afterwards independently from this condition which lead to a wrong tickmark color. Pick-to: 6.7 6.6 6.5 6.2 5.15 Change-Id: I45baf9127aea96bfe84a7410dd592a084f14f13c Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Don't show mnemonics in dockwidget titlesSune Vuorela2024-01-071-1/+1
| | | | | | | | | | | | | | | | | | One might want to add an accellerator to dockwidget titles to be used in contexts that isn't directly the title, but still uses the title. Dockwidget title accelerators doesn't work in dock widgets, so don't show them. They are still available in e.g. a right click menu on a dockwidget to hide/show, and here the accellerator might come handy, and also if a dockwidget is tabbed. Pick-to: 6.6 6.7 Change-Id: I196e1aa92a5c53fed735b598653c267509f788b8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* Fusion style: QGroupBox title vertical alignmentGHENADY2023-12-291-4/+8
| | | | | | | | | Take vertical alignment into account in QFusionStyle::subControlRect(). Pick-to: 6.7 6.6 Fixes: QTBUG-67708 Change-Id: I9da23a4689565c8dba9fed9ef75d3c640ce77e3f Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* Draw all borders for QScrollBar in Fusion styleWladimir Leuschner2023-11-171-20/+5
| | | | | | Fixes: QTBUG-116400 Change-Id: I0409202652032c5662d4e324a157a444272fbb16 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* FusionStyle: use std::array instead QVarLengthArrayChristian Ehrlicher2023-11-041-5/+5
| | | | | | | | Replace QVarLengthArray with std::array since there is no reallocation needed. Change-Id: Ifd53763e230efd61683c08654f0741beae4b6df2 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* FusionStyle: re-add icons for dockwidget titlebarChristian Ehrlicher2023-11-041-0/+45
| | | | | | | | | | | Re-add the icon for dockwidget titlebars as png images in different resolutions to avoid a blurry icon on high-dpi displays. Also add the source svg. Task-number: QTBUG-118122 Task-number: QTBUG-118643 Change-Id: I24f710e3c7390762c7079c0e153f015475347591 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QFusionStyle: don't use xpm files for standardIcon()/Pixmap()Christian Ehrlicher2023-10-211-99/+0
| | | | | | | | | | Don't use pixelated xpm files for SP_TitleBarNormal/Min/CloseButton - use the high-res icons from QCommonStyle instead. Task-number: QTBUG-118122 Change-Id: Ie187eac29b75084abf9151a0f6921b1276be1419 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* QFusionStyle: remove dead code from drawItemText()Christian Ehrlicher2023-10-211-22/+3
| | | | | | | | | The !enabled branch does nothing so it can be safely removed. Also remove the unneeded documentation since it's a simple reimplementation from the base class. Change-Id: Iea6e77ab42b09a30f73ae2f1f671eb4198a31c41 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fusion style/QProgressBar: fix High-DPI issuesChristian Ehrlicher2023-10-131-66/+74
| | | | | | | | | | | | | Fix some issues for QProgressBar with fusion style: - no progress text was shown in vertical mode - the color change for the text was not correct in rtl mode - the two rounded rects were not drawn correctly in some modes Also simplify the code by also using a QTransform for rtl mode and not only for the vertical mode. Fixes: QTBUG-117904 Change-Id: I1dd89daf34e8808417750f2ca714252afdab1416 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fusion style: misc fix painting vertical sliderChristian Ehrlicher2023-10-111-1/+1
| | | | | | | | | The slider handle has a small bug not painting the underlying rectangle with the correct direction which lead to a small visual glitch only visible with a high-dpi screen. Change-Id: Ie75e034b85542228ed7a8372dc7b9a419731630d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix build with latest MSVCVolker Hilsheimer2023-07-121-7/+7
| | | | | | | | | | Amend 813bbc515bdd8af843ef56115711691e926d0bcb. Unclear why this passed CI, but we can't use implicit conversion of string or character literals. Pick-to: 6.6 Change-Id: I1b3515e42b09a5caae1e632320b8251c27177f52 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Refactor QStyle: const'ify some local variablesVolker Hilsheimer2023-07-111-2/+2
| | | | | | | Task-number: QTBUG-114473 Pick-to: 6.6 Change-Id: I49483dc9c000fac024c81a8210515c8dd5e35559 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QStyle: don't use the QPixmapCache when a style sheet is setVolker Hilsheimer2023-07-111-18/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a style sheet is active, then the palette in the QStyleOption might be a generated, short-lived, temporary QPalette instance. As QPalette's cacheKey is based on instance-counters of the private data structures, it will always be unique for such a QPalette, even if the brushes are the same as in a previous instance. (QPalette::cacheKey is just a 64bit integer, we cannot possibly encode the entire QPalette data in it in a collision-free way, and since a brush in the palette might contain a pixmap or a gradient we couldn't even generate an efficient string representation for it. We could at most cache and reuse QPalette instances based on the attributes in the style sheet rule and in the base palette of the widget. However, this seems fragile; it might be an opportunity for future optimization.) Some styles use the QPixmapCache, with a key that includes the palette's cache key. The key will always be unique if the palette is based on style sheet rules, and then we fill pixmap cache with pixmaps that can never be reused, making the cache both useless and wasteful. To solve this, generate an empty key if we detect that it is for a style object that is the target of a style sheet. Return an empty cache key string from QStyleHelper::uniqueName, which will make QPixmapCache return immediatey when trying to insert or find an object. This is not pretty, but it makes the change minimal and low-risk. Refactoring the respective code paths to e.g. consistently use the BEGIN_STYLE_PIXMAPCACHE helper macro requires larger changes that can only be verified visually, and so are out of scope for a bug fix. This requires changes to code that uses QStyleHelper::uniqueName, as we need to avoid that other key elements are appended to the generated (and maybe empty) key. As a side effect, this ends up with code that makes better use of QStringBuilder. Pick-to: 6.6 Fixes: QTBUG-114473 Change-Id: I011aed0885f105cbf1e8c0bc6b94c46df47761a3 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QFusionStyle: rename dock_widget_close_xpm to avoid clash with ↵Marc Mutz2023-07-051-3/+3
| | | | | | | | | | | | | qcommonstylepixmaps_p.h They're different XPMs, so we can't share them. Detected by -unity-build-batch-size 103. Task-number: QTBUG-115031 Pick-to: 6.6 6.5 Change-Id: Ifa5ce59df10883f95582aefe37e413db2e5a13f1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFusionStyle: de-pessimize arrow paintingMarc Mutz2023-06-061-3/+2
| | | | | | | | | | | | Instead of holding three QPointF's in a QPolygonF, which will allocate them on the heap, use QVarLengthArray<>, which will allocate them on the stack instead. Pick-to: 6.6 6.5 Task-numbber: QTBUG-112200 Change-Id: If078e5a9a5cb82fd03b511e28cceb88bd42996f8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFusionStyle: optimize cache-key generation for qt_fusion_draw_button():Marc Mutz2023-06-061-3/+4
| | | | | | | | | | | | | Instead of passing a QLatin1StringView to QStyleHelper::uniqueName(), which takes a QString, allocating, and then using QStringBuilder to append something to the result of uniqueHelper(), allocating again, pull the appends to before the call to uniqueName(), folding these two allocations into one. Pick-to: 6.6 6.5 Task-number: QTBUG-112200 Change-Id: I501dd4a3df4b9f5267ca931b550d521f4dafe493 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFusionStyle: adjust painting of separator in QSpinBoxChristian Ehrlicher2023-03-281-2/+2
| | | | | | | | | When use a very high devicePixelRatio (for testing I used 5.23) one could see that the separator in the QSpinBox was not long enough. Pick-to: 6.5 Change-Id: I3a86c5bb695c95051b8b9294ca8a2749a8c3f9eb Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Revert "Let styles indicate that they support dark mode"Volker Hilsheimer2022-12-081-1/+0
| | | | | | | | | | | This reverts commit 3ee7a9f85c9d4566223f44f7bab04abafdfca82c. Styles that don't support dark mode can overwrite the palette in a QStyle::polish(QPalette &) override instead. Change-Id: I8b84d822d91be5b3f67f76f791a1330bba7ea546 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Let styles indicate that they support dark modeSanthosh Kumar2022-11-261-0/+1
| | | | | | | | | | Add a style hint that allows styles to indicate that they support dark mode. The macOS and Fusion styles support dark mode, the other styles, in particular the Windows Vista style, do not. Task-number: QTBUG-72028 Change-Id: I02cac2e19a21898663f50f09a4ef419a613a73ec Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fusion style: Fix menu item text being elided when mnemonic and && appear in ↵Friedemann Kleint2022-06-131-1/+2
| | | | | | | | | | | | | the text Pass the text flags to fontMetrics.elidedText(). Amends 0c0892a3e20aa1fa79e3561de9b8e1fa8820f062. Pick-to: 6.4 6.3 6.2 Task-number: QTBUG-94481 Fixes: QTBUG-103836 Change-Id: I21a9b96ef69e5a5e612a0bdbdf44e5a20931eb59 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Avoid menu separators disappearing under fractional dpr scalingEirik Aavitsland2022-05-311-2/+3
| | | | | | | | | | | | | | | | | | An aliased line painted directly on top of the top edge of the clip rect will work fine when there is no scaling, since the coordinates will snap downwards. When a fractional scaling is applied however, the main part of the line width will sometimes fall outside the clip rect, and so the coordinates will snap it outside, and hence it will not be painted. Fix by shifting the y coordinate by .5, to place the center coordinate of the line to the center of the intended pixel. Fixes: QTBUG-88934 Task-number: QTBUG-96223 Pick-to: 6.3 6.2 Change-Id: I3ab042bc964eac6ce359d40428c4d79cde9cb78c Reviewed-by: Nodir Temirkhodjaev <nodir.temir@gmail.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtWidgets: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-021-13/+14
| | | | | | Task-number: QTBUG-98434 Change-Id: I310ea8f19d73a79d985ebfb8bfbff7a02c424360 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtWidgets: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-261-2/+2
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I133b80334b66e0a5ab9546dd8e1ff0631e79601e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QFusionStyle: don't draw an invalid outline for up/down buttonsTimur Pocheptsov2022-01-171-20/+24
| | | | | | | | | | When they are disabled ('NoButtons'). Otherwise, we end up with a tiny dot (top left or right corner of a spinbox). Pick-to: 6.2 6.3 5.15 Fixes: QTBUG-99486 Change-Id: Ic99f4bce2abd57c988254296a749b5d5b23cfb39 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fusion: Consistent width calculation and rendering of menu itemsVolker Hilsheimer2021-10-271-39/+45
| | | | | | | | | | | | | | | | | | The width calculation lacked the addition of the windowItemFrame constant, which was added in the rendering code. This resulted in ellision for long items. To make the code easier to follow, const'ify, rename, and reorder some local variables, and use constants from QFusionStylePrivate instead of (now obsolete and removed) constants copied from the Windows style. Break long lines as a drive-by. Fixes: QTBUG-94481 Pick-to: 6.2 Change-Id: I6d3e9d0feebee58fc70beaaf29236b8473242083 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Port to QImage and QPixmap deviceIndependentSize()Morten Sørvig2021-09-011-4/+1
| | | | | | | | | Replace the “size() / devicePixelRatio()” pattern with a call to deviceIndependentSize(). Change-Id: I9d9359e80b9e6643e7395028cd43e3261d449ae7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Modify the internal rectangle drawing of CE_RubberBandTang Haixiang2021-08-231-4/+7
| | | | | | | | | | | | | | | | | adjusted(1, 1, -2, -2) makes the rectangle smaller, but when rect.x1-rect.x2 = 0. Then x1 + 1, x2-2 leads to x1> x2. This will make the rectangle flip in advance. So there is a difference between the updated area and the drawn area. Add a judgment, when the rectangle we get is large enough, draw the inner rectangle. Fixes: QTBUG-95716 Done-with: Oliver Eftevaag <oliver.eftevaag@qt.io> Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io> Pick-to: 6.2 Change-Id: I0d081a4ad7aee4a563acb988c0ef19a646bf1eea Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fusion style: TabBar: Use common style to draw a close buttonNodir Temirkhodjaev2021-07-201-11/+0
| | | | | | | | | | Custom tab bar's close button looks outdated in Fusion style. Common style's close button looks much better. Task-number: QTBUG-94752 Change-Id: I9e9aba4a5cd1ee0d3b7fc230306c5e052b6ba3bd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* Fusion style: don't use large icons in QLineEditVolker Hilsheimer2021-04-071-3/+0
| | | | | | | | | Partly revert 24226bb5f595581a239356c18a338783a85349ca by falling through to the QCommonStyle implementation, which defaults to PM_SmallIconSize. Fixes: QTBUG-92460 Change-Id: I82f99e98640a962577fd94556bef04f4da5789e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add setting the ICON size attribute in lineedit to the style pluginTang Haixiang2021-03-121-0/+3
| | | | | | | | | When the font is large enough, using PM_SmallIconSize will get a large lineedit,but the icon is very small. This is very unsightly, and the style plug-in hopes to be able to define the size of the icon by itself. Change-Id: I0e35b331301472541d3378e748dbcd074d5419a2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Unbreak binary compatibility in QStyleOptionHeaderVolker Hilsheimer2021-02-191-2/+4
| | | | | | | | | | | | | | | | | 4d943846128118e1b9932a17ce6f977a0f4127a5 introduced a new data member to QStyleOptionHeader, and reduced the size of the orientation member. This changed the binary layout of class instances, and breaks ABI. 180c662b0790c6eceffdcb4661681d7df1541a2d added another member within the new bitfield. Introduce a new QStyleOptionHeaderV2 class instead with the new members, and use that in QHeaderView, and the styles using the new members. Fixes: QTBUG-91224 Pick-to: 6.1 Change-Id: I47e6841e6652e4b67f247b7b4514e90be5609156 Reviewed-by: David Faure <david.faure@kdab.com>
* QHeaderView: Mark the drop section during section moveChristian Ehrlicher2021-01-291-2/+6
| | | | | | | | | | | Currently there is no visual feedback where the section move will end up. Therefore mark the drop section to show where the dragged section will be inserted. Fixes: QTBUG-673 Fixes: QTBUG-1114 Change-Id: I3e45a9a9c0604342bb0286fc7cd4c89c757c28cd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>