summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-01-073-0/+35
|\ | | | | | | Change-Id: Ia2ce994c42adc010c453edaeea57f672556958f6
| * Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-01-061-0/+1
| |\
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-061-0/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qvariant.h Change-Id: I8f3873e74b9795ac889e7c7ec5de2619bca92160
| | | * QSS/QComboBox: set correct palette when drawing SC_ComboBoxArrowChristian Ehrlicher2020-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the dropdown button of a combobox is drawn with QStyleSheetStyle, not only the background color is used for drawing but also QPalette::Light/Dark/Shadow. Since the palette was not properly set up in some cases, the shaded frame around the button was drawn with the default colors instead the ones derived from the given background. Therefore we have to properly set up the palette before drawing the drop down button by calling QRenderRule::configurePalette() Fixes: QTBUG-80950 Change-Id: Ibf98fa28612b5c7527ef9dd6ae06c417315f2632 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | | Stylesheet: Handle tabs with elide mode set correctlyAndy Shaw2020-01-063-0/+34
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order for SE_TabBarTabText to correctly calculate the space available for the text it needs to get the rectangle of the tab directly instead of relying on the option's rectangle as this may have been modified before this point. Therefore we introduce QStyleOptionTabV4 to be able to store the index as part of the option so it can be queried directly. [ChangeLog][QtWidgets] Added QStyleOptionTabV4 as a subclass of QStyleOptionTab so that the tab's index information can be obtained. Fixes: QTBUG-50637 Change-Id: If705f5069fdd14eeccf06bc63dba4e8d2e704359 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-043-12/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-021-6/+6
| |\| | | | | | | | | | Change-Id: I7b6e6c687d8d60b4a54e6b9dada025ef66c53d96
| | * QCommonStyle: make sure to pass the widget to pixelMetric()Christian Ehrlicher2019-12-281-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QStyle::pixelMetric() expects the affected QWidget as third parameter. Some (external) styles rely on this to return the correct value. Therefore add the widget to the function calls where possible. Fixes: QTBUG-80971 Task-number: QTBUG-1857 Change-Id: I768ebb61a914cdba6e0549f841d46cf3edb0a2a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Fix QSpinbox default widthChristian Ehrlicher2019-12-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After aa8d3f90a440575deef914916299b792105d7209 the default width of the spinbox buttons is calculated from the spinbox width. This is wrong because the initial width (e.g. when the spinbox is not yet shown) is 640 pixels which results in a too long width. Therefore fall back to the old hard-coded value version but instead using 20 pixels, use 16 to be in sync with the stylesheet style value and honor the dpi of the screen by using QStyleHelper::dpiScaled(). Fixes: QTBUG-79806 Fixes: QTBUG-80814 Change-Id: I45786684575273f940e498df3b7639e626f00a7e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-161-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket.cpp src/widgets/kernel/qapplication.cpp Change-Id: Ib7421cc2df59d0969f89b3fbd65a17ea76ffef3b
| | * Doc: Fix qdoc compilation errors qtbaseNico Vertriest2019-12-121-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-79824 Change-Id: I6557de598de1931fc30556951d35783d02b83abe Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Replace usages of QVariant::value by qvariant_castOlivier Goffart2019-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | This is done automatically with a clazy check Change-Id: I3b59511d3d36d416c8eda74858ead611d327b116 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Support checkable QComboBox items with styles using a popup dropdownVolker Hilsheimer2019-12-111-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dropdown of a combobox is rendered using menu items when the style request it to do so via the SH_ComboBox_Popup style hint. In that case, checkable items were not supported; the QComboBox didn't pass the checked state correctly to the style, and the delegate used for rendering the items into the list view did not implement modifying the checked state of the item. However, the QStyleOptionMenuItem's checked state and checkType members were set anyway, as on e.g. macOS style we use a checkmark to show which item is currently selected in the combobox. The QStyle::State enum defines State_On and State_Off for toggleable things, so in addition to setting QStyleOptionMenuItem::checked, we are now also adding State_On or State_Off if the model provides a valid checked/unchecked state. Otherwise, we only set the checked state if the item is currently selected. In addition, we implement the delegate to support toggling of checkable model data with mouse and keyboard, using a simplified version of the QItemDelegate implementation. To avoid spurious item toggles when the popup is opened, we only handle mouse releases when the press was on the same row. In the fusion style, we ignore the workaround to let QtQuickControls render comboboxes if State_On or State_Off are set. [ChangeLog][QtWidgets][QComboBox] Support checkable items in styles that use a popup for the dropdown. Change-Id: Ia01519694b0419d777dc66b1ef683482fb01754c Fixes: QTBUG-60310 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | Fix QPalette::isBrushSetVitaly Fanaskov2020-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation did not take into account different color groups in resolve mask. It led to some issues when resolving a palette or checking whether a brush is set or not. Task-number: QTBUG-78544 Change-Id: I9b67b2c444eb62c022643022a874dc400005e6ee Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-113-67/+22
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp Change-Id: I6b82507bf9a80a374c40393e72f4843f1557de89
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-103-67/+22
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/kernel/qnetworkinterface/BLACKLIST Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
| | * Fix QPushButton style sheet style for overlay (content) imageEirik Aavitsland2019-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike comparable widgets like QLabel or QFrame, QPushButton would not render a content image specified in the stylesheet, unless a border style was also specified. Fix by explicitly rendering the content image, if set, in the native-border codepath also. Although the doc warns about the QPushButton border style having to be set in order for the background styling to take effect (since the native border painting otherwise hides it), the previous behavior does seem unexpected. Fixes: QTBUG-72029 Change-Id: I8b979b010515dab4dcf2f00344a187c87eeec096 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| | * QPushButton: fix icon + text layouting in RTL modeChristian Ehrlicher2019-12-092-64/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fusion style did not properly handle the text layouting for a QPushButton in RTL mode. Also the menu indicator was not adjusted in this case. Fix it by calling the base class implementation as QCommonStyle does it mostly right. Since Fusion does not handle State_On or State_Sunken but QCommonStyle does, explicitly mask them out. Fixes: QTBUG-80083 Change-Id: Ide7bf997b4f4a5b61fcb8ea4a1a152122daef1e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * QStyleSheetStyle: properly honor checkmark size when drawing a QMenuChristian Ehrlicher2019-12-051-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When drawing a QMenu which is checkable but does not have an icon somewhere, the width of the (possible) checkmark was not considered during drawing and the text was drawn over the checkmark. Also the wrong state was checked for drawing the checked icon (if one was given). Fixes: QTBUG-80506 Task-number: QTBUG-78238 Change-Id: Icf8aa37aab424564054d3549defee93eb0d7c1a4 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-096-76/+76
|\| | | | | | | | | | | Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
| * | Tidy nullptr usageAllan Sandfeld Jensen2019-12-066-76/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-042-4/+7
|\| | | | | | | | | | | Change-Id: I4134c0c6b6c9911950f58b3b5c86e789d28a185b
| * | QMdiArea: on macOS using tabs, render document icons next to the textVolker Hilsheimer2019-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is closer to what titles of documents look like in macOS apps, even though MDI is not a well-defined concept on this platform. To implement this, the QCommonStylePrivate::tabLayout method had to be made virtual, as it is called by the QCommonStyle class. It was already reimplemented in QMacStylePrivate, but didn't get called in all cases. Now that it is called as an override, adjust the icon placement to include the padding so that we get identical results to 5.13 for normal tab widgets. Change-Id: I7a63f6d76891146ca713259096a7737a86584d81 Fixes: QTBUG-63445 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Ulf Hermann2019-12-031-3/+6
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborvalue.cpp Change-Id: I675a3029955c96e81a33ed9d98b72b55b6784b52
| | * QDial: use correct button colorChristian Ehrlicher2019-11-261-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the pixmap for the QDial was cached, the button color for the knob was not properly set Fixes: QTBUG-19855 Change-Id: Ib09ac12f0b11c47a0d05f01759fc6eeadbeab06c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-255-27/+46
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qhash.h src/gui/kernel/qevent.h src/widgets/kernel/qshortcut.cpp src/widgets/kernel/qshortcut.h Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
| * | Avoid initializing QFlags with 0 or nullptr in further casesFriedemann Kleint2019-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Amends qtbase/af2daafde72db02454d24b7d691aa6861525ab99. Where applicable, port over to member initialization, thus also fixing nullptr warnings. Change-Id: Iaaf2dbbbcf2952253390b8839fd15a1b17be32c0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | QStyleSheetStyle: add new property to QPushButton: iconRichard Moe Gustavsen2019-11-141-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is currently no proper way to change the icon of a pushbutton from css. But there is a need for doing so (QTBUG-2982), and the typical work-around is to instead use the css property 'qproperty-icon'. But setting qproperties from the style is not a good idea in the first place, since it modifies the state of the widget it draws. Moreover, such properties are only set once (in QStyle::polish()), and will not have any effect on pseudo states, like hover. To close this gap, this patch will add a css property 'icon' that can be set on a QPushButton. This property will follow normal css cascading, and respect pseudo states, equal to any other css property. [ChangeLog][QtWidgets][QStyle] You can now set the CSS property 'icon' on a QPushButton to override which icon to draw. Fixes: QTBUG-79137 Change-Id: Ie7e0b0fa4f19471f51108cd4ca931356219d562e Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * | Honor alpha for SH_Table_GridLineColorChristian Ehrlicher2019-11-143-3/+3
| |/ | | | | | | | | | | | | | | | | Make sure to honor the alpha channel for the color returned by SH_Table_GridLineColor. Fixes: QTBUG-74909 Change-Id: If9688329e5e2ab41833dfeb7e6292fdfcbf63aa1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Extract QGuiAction(Group) from QAction(Group) into QtGuiFriedemann Kleint2019-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simply moving QAction to QtGui was not deemed possible since it operates on a set of controls of some kind. The approach to extract a base class was taken instead, named QGuiAction following the QGuiApplication scheme. QAction remains in widgets, but changes base class. For QActionGroup, the functions addAction(text/icon), which create an action, cannot be implemented in QtGui, hence a base class is needed, too (unless they are deprecated and removed). - Extract base classes providing functionality not based on QtWidgets, using virtuals in QGuiActionPrivate to provide customization points - Change QActionEvent to take QGuiAction, removing the need to forward declare QAction in QtGui [ChangeLog][QtGui] Added QGuiAction(Group) and made the equivalent existing classes in Qt Widgets derive from them. This provides basic functionality for implementing actions in QML. Task-number: QTBUG-69478 Change-Id: Ic490a5e3470939ee8af612d46ff41d4c8c91fbdf Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-171-0/+8
|\| | | | | | | Change-Id: Ica69de99be9c8af4d28a52e4b69e6af748ed983c
| * Fix the size calculation of QHeaderView when stylesheet is usedSona Kurazyan2019-10-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When calculating the header section size based on its contents when a stylesheet is used, the size hints from the stylesheet are used. In case if the stylesheet specifies only one of the sizes, the other is set to -1. Because of this the actual content size is ignored. The solution is to calculate the size based on the application style, in case if it's not specified in the stylesheet. Fixes: QTBUG-75615 Change-Id: I3453fa623d75b6b32832edf753de6e3e4e7f5a22 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-141-5/+11
|\| | | | | | | Change-Id: I129dd579f92cb2592a38ca043472b45cb926ae12
| * Fusion Style: Use high-dpi pixmapsMorten Johan Sørvig2019-10-111-5/+11
| | | | | | | | | | | | | | | | | | Pass the QWindow as context to QIcon::pixmap(), which enables it to return high-dpi pixmaps when needed. Fixes: QTBUG-74100 Change-Id: I4556f0a98df8b6ba65376778379a03eb8c470d00 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Remove deprecated PE_IndicatorViewItemCheck and PE_FrameStatusBarVolker Hilsheimer2019-10-092-7/+0
| | | | | | | | | | | | | | | | They have been marked as deprecated since 5.13, and can be removed from Qt 6 codebase, which silences the respective compiler warnings. Change-Id: I3443c7bfa8db148b0b48957e2adc5eb131197faf Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-021-0/+1
|\| | | | | | | Change-Id: Ideaa64d583746f1ce8265997131fb1ce3a9acbcf
| * QCommonStyle: Add SP_DialogNoButton case in standardIconKai Uwe Broulik2019-09-281-0/+1
| | | | | | | | | | | | | | | | It is present in standardPixmap but missing from standardIcon resulting in QMessageBox using the fallback PNG provided by Qt for the "No" button. Change-Id: If4f14c7de26eb32277cd19a7be75360dba4f4e29 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-09-241-0/+5
|\| | | | | | | Change-Id: Ic0dbddfa711905bc8e01aa6cbbdabf056a19587f
| * Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-231-0/+5
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/styles/qstylesheetstyle.cpp Change-Id: If11da7799075cc2d5768da5603c5fc46773c4eae
| | * Ensure all children of a widget get updated when a stylesheet changesAndy Shaw2019-09-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before, only the direct children would get an update when the stylesheet changed, any children below that would be unchanged. Fixes: QTBUG-77006 Change-Id: Id668eaae74a8289d78d66644f077e6a3302960cd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * | QStyleSheet: Resolve the rule font before it is usedThorbjørn Lund Martsum2019-09-181-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The styleSheet font cannot know about e.g dpi or other settings (e.g from the current screen) so we should resolve font settings from the original font. This patch ensures that the stylesheet font is resolved with a relevant font before it is used. This likely fixes many dual/triple screen issues. [ChangeLog][QtWidgets][QStyle] Style sheets now only use the part of the stylesheet font that it knows about. The remaining will be resolved/inherited from the context. Fixes: QTBUG-77502 Change-Id: I3b1f821e1be9707506a6c1d1e93f76eeac4007e0 Reviewed-by: Morten Kristensen <me@mortens.dev> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit b68ade8282274c2d4ee1e4f861d34ea0655c1eab) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2019-09-173-20/+16
|\| | | | | | | | | | | Change-Id: Ic1fd51143f903b7e9086fc19ca960dfd9654ee00
| * | Windows style: Fix size of controls in multimonitor-setups with scaling disabledFriedemann Kleint2019-09-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function calculating a correction for the size of windows metrics depending on screen would bail out when high DPI scaling was disabled. This is wrong since the correction is also needed in that case, delete the clause. Task-number: QTBUG-64890 Change-Id: Idef22e18fc616a211ccac48400490fc52393a338 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | Brush up the Windows stylesFriedemann Kleint2019-09-162-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - use range-based for loops where possible - use nullptr - use member initialization - remove a lot of C-style casts - use override - fix some signedness warnings - add some missing break statements Task-number: QTBUG-76493 Change-Id: Ica6ed65ec29e958406e54d816b8a679ed81bd177 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | Fix qdoc warningsFriedemann Kleint2019-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/global/qnamespace.qdoc:3279: (qdoc) warning: Can't link to 'QGuiApplication::setHighDdpiScaleFactorRoundingPolicy()' src/corelib/time/qislamiccivilcalendar.cpp:49: (qdoc) warning: Can't link to 'QJijriCalendar' src/network/ssl/qsslsocket.cpp:1510: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()' src/network/access/qhttp2configuration.cpp:49: (qdoc) warning: '\brief' statement does not end with a full stop. src/gui/text/qtextformat.cpp:532: (qdoc) warning: Undocumented enum item 'TableBorderCollapse' in QTextFormat::Property src/gui/text/qtextdocument.cpp:2066: (qdoc) warning: Undocumented enum item 'UnknownResource' in QTextDocument::ResourceType src/gui/kernel/qguiapplication.cpp:3500: (qdoc) warning: Undocumented parameter 'policy' in QGuiApplication::setHighDpiScaleFactorRoundingPolicy() Change-Id: I3573ef98cf9b58d16525c356270fe009fdffcf45 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fusion: reduce width of menu itemsAlberto Mardegan2019-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The extra spacing for menu items was being computed twice: once in QCommonStyle and once in QFusionStyle, resulting in excessive width. Task-number: QTBUG-78093 Change-Id: Id5f3568cf469e57d18ce8548ab480753e7244952 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | | QStyleSheet: Resolve the rule font before it is usedThorbjørn Lund Martsum2019-09-131-8/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The styleSheet font cannot know about e.g dpi or other settings (e.g from the current screen) so we should resolve font settings from the original font. This patch ensures that the stylesheet font is resolved with a relevant font before it is used. This likely fixes many dual/triple screen issues. [ChangeLog][QtWidgets][QStyle] Style sheets now only use the part of the stylesheet font that it knows about. The remaining will be resolved/inherited from the context. Fixes: QTBUG-77502 Change-Id: I3b1f821e1be9707506a6c1d1e93f76eeac4007e0 Reviewed-by: Morten Kristensen <me@mortens.dev> Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Widget style: Use per-screen DPI in QStyleHelper::dpiScaled()Friedemann Kleint2019-08-235-90/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the style option to dpiScaled() in order to get the correct screen DPI. The style option contains the font, which again contains the current DPI value. Add QFontMetrics::fontDpi() accessors to get the DPI from the QFont. This DPI will/should be updated on screen change. Replace hardcoded Q_OS_MAC DPI with hardcoded base DPI. This makes per-screen DPI testable on macOS, too. Task-number: QTBUG-45055 Change-Id: I75f8b37d45eb50c3334b46b8469a546d29712f1b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Remove dead code from Qt 4 timesTor Arne Vestbø2019-08-203-20/+0
| | | | | | | | | | | | | | | | | | | | The benefit of keeping this code around was to inspire or inform changes in the areas to take into account possibly missing features in Qt 5, but at this point that benefit is questionable. We can always use the history to learn about missing pieces if needed. Change-Id: I87a02dc451e9027be9b97554427bf8a1c6b2c025 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>