| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rework the painting code to not use floating point numbers and make sure
the tip of the arrow is painted with one or two points (depending on the
size is odd or even) so the arrow is always symmetric. Therefore also no
anti-aliasing is needed. Sadly the dpr scaling and also
QPainter::drawPolygon() screw things up a little bit with such small
sizes, therefore do the dpr handling by ourself to get nice results.
Pick-to: 6.7
Fixes: QTBUG-124554
Task-number: QTBUG-114539
Change-Id: I8ab8c2ce3ceb90af5d7c3a0dfeec7f7445e92a4d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QWindows11Style inherits from QWindowsVistaStyle for which StyleSheet
theming is deactivated. QWindows11Style draws most elements with
QPainter and should therefore be able to use overrides by StyleSheets.
This patch checks, whether QWindows11Style is used and enables the
theming by declaring it not to be a QPixmap based style. Further drawing
routines for QComboBox, QPushButton and QLineEdit are now drawing always
the base background and when they are hovered a alpha mask is used to
overdraw the elemens to create a highlight effect.
Fixes: QTBUG-124286
Pick-to: 6.7 6.7.1
Change-Id: I65436493bc2b1572c0d9423a066caea3ba9e1459
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 74e8f673b827c57ebf2bf802840c19e4a1ac848b.
Reason for revert: the change as is makes the rendering of arrows in the
styles unpleasantly blurry.
Pick-to: 6.7
Change-Id: I59ccd7373631a550276465caffb7d3074ff5893c
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Using a QImage as a paintDevice is not needed - directly paint on a
QPixmap. Also use styleCachePixmap() which avoids the need for
multiplying the size with the dpr.
Change-Id: I114f78c20d2b92b4fd135c8f64b452fb81a02baf
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
The member layoutSpacingIndex is not used anywhere so it can be removed.
Change-Id: I0d8bc3b0ce8cf7ab26c3fd11977cfc9bffc42106
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The high-dpi painting fix for the arrow painting was missing
QPainter::AntiAliasing flag so the rectangle had some artifacts with
certain (small) sizes.
Also there is no reason to move the center by 1 pixel to the top left
anymore now that we're using decimal values.
This amends 3936d254ca0e7259cd97238c31df8413d03fd475.
Pick-to: 6.7
Fixes: QTBUG-124554
Task-number: QTBUG-114539
Change-Id: I8a34d7ed937db261ce652bd66234783fb3338cbb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
QStyleSheetStyle::loadPixmap() might be called with an empty filename
but then it should not try to load a file with an empty filename.
Pick-to: 6.7 6.5
Fixes: QTBUG-123839
Change-Id: Ie01e9f75f025650b0802736bb589ebdc48e93696
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit f39f2bfe0b216252980c082b1771540dd00e6bd6.
Reason for revert: Breaks styling of treeview indicators.
Pick-to: 6.7 6.6 6.5
Task-number: QTBUG-123632
Change-Id: I7922f58a9a1ace40ba788571a297443c1900baf2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QCommonStyle sets the font for a selected header section to bold.
This overrides the font weight a calling style might already have set,
e.g. when a style sheet is applied to explicitly set a weight for a
checked header section:
QHeaderView::section:checked {
font-size: 20px
font-weight: normal
}
Since setting the weight on a font sets the respective resolve-mask
bit, we can avoid overwriting a weight that is already set explicitly.
Add baseline test coverage using a QTableWidget.
Fixes: QTBUG-122180
Pick-to: 6.7 6.5
Change-Id: I8c6279ad2fd8c5718ebea26e27c64ae823625748
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the drawing of CE_ItemViewItem is propagated to QWindowsStyle,
which leads to ignoring alternating rows in ItemViews. Propagating the
drawing to baseStyle honors the set base style.
Fixes: QTBUG-123632
Pick-to: 6.7 6.6 6.5
Change-Id: I656ee1c44029abf7233551303d469d38b6c848e3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
|
|
|
|
|
|
| |
Use string views in QFontDialog, QColorDialog and QCommonStyle
Change-Id: I22f4b4694e2d18b784aaa85aebff8d92b8f0b871
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.7
Change-Id: Ic9562a20bce59c265c539a1378f5f8fd8e9e9a17
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dockwidget title accelerators doesn't work in dock widgets, so don't
show them.
This amends cc67b25579c1bb5ea9f5c1ca4c9b7997e66f19b9.
Fixes: QTBUG-86407
Pick-to: 6.7 6.6
Change-Id: I83fb2da1304d1e2b5eedfc127e5db3d322756d06
Reviewed-by: Sune Vuorela <sune@vuorela.dk>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the styled check indicator is smaller than the one from the base
style, then the clip region was to small and the check indicator from
the base style was also drawn. Therefore add both check rects to the
clipRegion.
Pick-to: 6.7 6.6 6.5
Task-number: QTBUG-102820
Fixes: QTBUG-122821
Fixes: QTBUG-122825
Change-Id: I1b5b8d70d66475bbfa4a40652dc3fdd4cc670c32
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
The fusion svg icons had some unneeded transparent objects which lead to
artifacts during png export/pngcrush optimization. Fix it by removing
the unused objects and re-export the pngs again.
Pick-to: 6.7
Fixes: QTBUG-122272
Change-Id: I13c670a90e88dd31cb7a066c3565cf30c42e83b5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The code in QWindowsStyle::standardPixmap() is reimplemented in
QCommonStylePrivate::iconFromWindowsTheme() in a better way (as it
honors the dpr) so no need to leave it here.
Change-Id: Icc418d2bd0cff06a8a8e5bc6c14a99bfb34cfc68
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the two unused functions devicePixelRatio() and
appDevicePixelRatio() from QWindowsStylePrivate. Also remove an uneeded
forward declaration and the member menuBarTimer.
Change-Id: I18347744054fe9c904b0ee48e45788dc4d2a8233
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The media svg icons had some unneeded transparent objects which lead to
artifacts during png export/pngcrush optimization. Fix it by removing
the unused objects and re-export the pngs again.
Pick-to: 6.7
Fixes: QTBUG-122272
Change-Id: I7e63ef53e5a78ce3a06c0053dea98e13c6ba264b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I92fddb36cd136fd1bd627955f15d0559b9942d7e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
This amends 8eaf01ef818c1b980e2bbce1e8ddd2de638f5028
Pick-to: 6.7
Change-Id: I8e30f232b732b0acb0b6c7070ecfa216fabd64da
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Don't export both, the one is just calling the other, so make it inline.
Give parameters descriptive names that match the documentation.
Found in header review.
Pick-to: 6.7
Change-Id: I48b221a4fcc476483fee2842ec0a5cadd628b803
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: Iebb5794a166899c986e1c408a254184b22bc276e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
Sync iconFromWindowsTheme() to use themeHint(IconPixmapSizes) similar to
iconFromMacTheme().
Pick-to: 6.7 6.6
Task-number: QTBUG-52622
Change-Id: Id06454b010b1946ee0565190672ee8624cffe2de
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The devicePixelRatio was not taken into account when a standard icon was
requested from the windows qpa which resulted in blurry icons for a
dpr != 1.
Therefore pass the dpr-corrected size to QWindowsTheme::standardPixmap()
and pass this size to SHDefExtractIcon() to get a correctly scaled icon.
Pick-to: 6.7 6.6
Fixes: QTBUG-52622
Change-Id: Ia771dd2f93fa133cf2c4429ef59a9c5cb05ad047
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QDoc generates missing full stops for briefs in certain situations.
Due to how the `\brief` command works, this fails if the brief ends
with a link target. As this is a corner case, add the missing full stop
to the offending briefs.
Task-number: QTBUG-117636
Task-number: QTBUG-117470
Change-Id: I6d9538f517cd39943ab817f45183fadd3b3a9c92
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
tst_qstylesheetstyle revealed an unbalanced call to save/restore within
drawPrimitive(PE_IndicatorSpinUp/Down) due to an early exit. Therefore
add a RAII-helper class to make sure QPainter::restore() is always
called after a QPainter::save().
Pick-to: 6.7
Change-Id: I1b3851836b36d75357ed8c4532f7d2e44136159e
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Pass the correct device pixel ratio to QIcon::pixmap() to make sure the
correct pixmap is returned on high-dpi displays.
Pick-to: 6.7
Fixes: QTBUG-92016
Fixes: QTBUG-94203
Change-Id: I6809ae63b2c99bb60c705f6d78caa2b48f2c7473
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
| |
Avoid some calls to detach() and use std::array instead raw c arrays.
Pick-to: 6.7
Change-Id: I95cbfb130b6fe2509e5d87184c6612718b90dd63
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
|
|
|
|
|
|
|
|
| |
Regression in the previous commit, 5ef5f2f1b9
Pick-to: 6.6
Change-Id: I03786264d064b7d0cf2b88a5d06aa63ffb19ae8b
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
|
|
|
|
| |
Change-Id: Ifc7b8fe1d7dda10d29b5c50ebd7bc5c352c9c0c2
Reviewed-by: David Faure <david.faure@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A non-aliased drawRect(r.adjusted(0, 0, -1, -1)) no longer does the job
in Qt6: hi-dpi is now enabled automatically, which scales the painter
and leads to horrible (non symmetric) rendering.
I doubt any actual widget style calls into this code (which draws
a focus rect with a plain line) but it's still a useful example
and fallback when writing a widget style.
Pick-to: 6.6
Change-Id: Ib407a7355033258be568b4826fe01c110f02c018
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
| |
PE_IndicatorArrowUp/Down/Left/Right was drawn using integer coordinates
for the three edges which lead to artifacts in high-dpi mode. Fix it by
using QPointF instead.
Pick-to: 6.6
Fixes: QTBUG-114539
Change-Id: I03cbff2ef789e8cee0f3a0d84138d94516340669
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|