Fixed bugs with SizeFrame. Ensure that the resize does not go past screen/area boundaries. Also ensure that the widget does not jump, by ensuring we have a local and not global rect. We also fixed that if the resize goes below the minimum size values of the widget, we don't drag the widget.
Added top-level titlebar. This has been tested to work on X11 (with numerous workarounds), and has various tricks to set window flags without hiding and re-showing the window.
Fixed bugs with the menu size event. Properly keep the override cursor outside the application boundaries, and handle clicks outside as well. It also limits the resizing to the current MDI area's bounds.
Still need to provide fixes for moving/resizing windows on Wayland.
Add QMdiSubWindow titlebar customization issues, including title bar
icons, to ISSUES.md, and add a working example of a custom title bar.
This is a full-featured, drop-in replacement that could also be modified
for use in a QMainWindow or QDialog settings.
Closes#63.
Align the icon size and positioning of `QMenu::icon` (the icon for custom elements) and `QMenu::indicator` (the checkbox for selected/unselected items). This renders the two visually consistent.
Closes#64.
Created sample workaround in `example/whatsthis.py`, showing how to
style the `QWhatsThis` widget using `QPalette`, and added a workaround
description to `ISSUES.md`.
Closes#59.
Only supported in Qt6 or maybe version recent versions of Qt5 (not
available in Qt5.15.2), and this causes distortion in the clear text
icon when it's rendered.
Closes#62.
You cannot modify the default link color in a stylesheet, so document
the 2 ways to modify the link color via either the `style` atttibute of
the `a` tag, or using the `QPalette:Link` color role.
Closes#58.
Import shared definitions from `/example`, and remove numerous forms of redundant code, including compatibility definitions. Also, fix a few minor issues with dialogs being too small in the test suites.
Add shared code between the examples, to reduce the amount of
boilerplate used in each example. Includes shared colors, Qt5/Qt6 compat
definitions, argparsers, and app startup/exec code.
Move the standard icons that can be used in a stylesheet from a plugin
to the main template directory. This allows us to overwrite more icons,
increasing visual consistency between platforms.
Document the inability to theme the QCommandLinkButton default icon.
Although the icon can be hard-coded via `qproperty-icon` and the size
via `qproperty-iconSize`, it can no longer be customized, defeating the
purpose.
Closes#60.
Used `qproperty-iconSize` to force the icon sizes to 0, and then used the `image` property to ensure the correct icons are set. There is no good way to ensure both are the same size on Qt5 and Qt6, but they are close enough. Any approach of forcing them to be the same size results in massive pixelation in Qt6.
Closes#57.
Remove the `QTabBar QToolButton::*-arrow` rules, since they use
`border-image` which conflicts with the `image` on
`QToolButton::*-arrow` rules, causing 2 arrows to be drawn. The
`border-image` also tends to be incorrectly stretched, so we use `image`
instead. Also changed `QToolButton` background from `transparent` to
`^background^`, so the arrow indicators rise above the QTabBar.
Fixes#56.
Added `hasMenu` property so the user can manually override the padding on QToolButtons.
Updated the `QToolBar` to remove `min-height` and `min-width` so the icons can pack closer to together, and specified custom padding rules for the regular icons and those with the drop-down menus. These are narrowly selected via `QDialog QToolBar QToolButton`, and can be manually overridden via `hasMenu`, so they're unlikely to affect anything other than `QFileDialog`.
Likewise, updated the rules for `QToolButton` padding to ensure the button is padded only if it is not auto-raised and it has text. Likewise, this can be manually overridden via the `hasMenu` property. These rules are extensively described in the stylesheet comments.
Further improves the patches to #22, #28, and #47.
Fix the padding on non-auto-raised QToolButtons, since the icon-only QToolButtons had the padding of the text ones. Unfortunately, `ToolButtonStyle` is set by the user, and is only adjusted in `QStyleOptionToolButton::toolButtonStyle`, and not in `QToolButton`. This means we have no way of removing the extra padding on text-only items, but it's a small price to pay.
Fixes#47.
Fix the QTreeView indicators (checkboxes) that were using the style
defaults except if they had a hover/focus/selected psuedostate. This
only affected Qt6. Setting `QTreeView::item`'s `background-color`
weirdly fixes this stylesheet bug.
Closes#51.
Used the `QAbstractItemView::item` subcontrol `max-height` and
`QAbstractItemView::*-arrow` subcontrol `margin` to ensure size
consistency between Qt5 and Qt6, otherwise, Qt6 has a much larger arrow
size which creates visual inconsistency.
Removed the style for `QWidget:disabled:hover`, which causes the issue, and seemingly has no negative consequences since the default background color is still `^background^` without it.
Closes#54.
Removes the border on QColumnView when not focused, and uses the correct
arrows through the QAbstractItemView::left-arrow and
QAbastractItemView::right-arrow subcontrols to style the arrows.
Closes#45.
Closes#46.
Only 3 widgets subclass QAbstractSlider: QSlider, QScrollBar, and QDial.
We cannot style QDial, and QSlider is the only one we want styled, with
our separate customizations for QScrollbar.
Closes#53.
Added `QDial` styling to known issues, and added a drop-in replacement for `QDial` (subclassing it) that consistently styles over all platforms and application styles.
Closes#42.
Weirdly, this is controlled via QAbstractSpinBox and the arrow
indicators, which is fixed by setting a `width` and `height` for those
subcontrols. This makes little sense, since the calendar popup is styled
using QStyle.CC_ComboBox, but it works reliable for Qt5 and Qt6.
Closes#40.
Added padding to properly pad text on the tab bar. Added negative
padding to avoid clipping the close button, without it overlapping with
the border. Added highlighting for the selected tav. Added
documentation for known bugs with padding south tabs, and color/outline
for selected tabs.
Closes#48.
Closes#50.