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.
Update the overview description to simplify and better describe the
stylesheet overview. Update the testing documentation. Add a section for
plugins with links to the plugin code.
Provides pixmaps for all Qt standard icons, as an extension, with
descriptions on how to use QCommonStyle to override the default standard
icons. This provides a consistent look and feel on all apps.
Added an example PyQt6 application with a workaround to attempt to fix
the placeholder text color issues, which further supports the idea that
it is a Qt bug, and not a stylesheet issue.
Using `QtGui.QPalette.ColorRole.PlaceholderText`, we are able to modify
the placeholder text color in Qt5, but not in Qt6.
Closes#41.
Closes#44.
Fixes the QToolButton views for the QCalendarWidget, displaying the
desired behavior for both the month and year select. Also fixes the
icons for the QPrevNextCalButton (a subclass of QToolButton) to fix the
next and previous icons. Also, Qt6 now has the menu-arrow correctly
displayed.
Fixes#39.
Added `example/standard_icons.py` which subclasses `QCommonStyle` to
override standard icons, while keeping the default style. This respects
the stylesheet, while allowing custom standard icons. Added this example
to the documentation.
Closes#33.