Commit Graph

189 Commits (df76f681ba293b2d3e070abcf90baa86b548924d)

Author SHA1 Message Date
Alex Huszagh df76f681ba
Fix styling of flat QGroupBox. 2022-12-08 17:01:23 -06:00
Alex Huszagh 6b721c5036
Fix styling of flat QPushButtons. 2022-12-08 16:51:53 -06:00
Alexander Huszagh 5f45edebed
Merge pull request #78 from Alexhuszagh/menubar_hover
Fix hover styling on QMenuBar.
2022-12-08 16:14:13 -06:00
Alex Huszagh 58b9b90c18
Fix hover styling on QMenuBar.
Previously, hovering would keep the menu bar item border active as long
as the menu bar was focused, meaning individual items weren't properly
respecting when the mouse was hovered and not hovered over them.
2022-12-08 16:11:52 -06:00
Alexander Huszagh abe01b30ac
Merge pull request #77 from Alexhuszagh/url_palette
Add example using QPalette for links.
2022-12-08 15:45:46 -06:00
Alex Huszagh a71eb9fb5e
Add example using QPalette for links. 2022-12-08 15:43:31 -06:00
Alexander Huszagh 6a8c25edd6
Merge pull request #72 from Alexhuszagh/editable_view
Fix editable QAbstractView items.
2022-11-18 17:43:03 -06:00
Alex Huszagh 8d8fc68f63
Fix editable QAbstractView items.
Removes the padding on QLineEdit in QAbstractView items to prevent padding from concealing item text. Closes #69.
2022-11-18 17:41:30 -06:00
Alex Huszagh 39949cbdff
Minor documentation fixes for branchless indicators. 2022-11-18 16:55:58 -06:00
Alexander Huszagh 2e5f323209
Merge pull request #71 from Alexhuszagh/branchless
Add example of branchless indicators.
2022-11-18 16:50:50 -06:00
Alex Huszagh 934fc17623
Add example of branchless indicators. 2022-11-18 16:50:07 -06:00
Alex Huszagh 0bd11fbba2
Add code of conduct. 2022-09-02 07:49:33 -05:00
Alex Huszagh 9ade91d4da Update issues on Windows. 2022-05-09 19:15:10 -05:00
Alex Huszagh 79988d236c Added numerous bug fixes for the title bar.
Noted numerous bugs for Wayland, and added a few wworkarounds.
Documented how even X11 mode in Wayland does not fully work.
2022-05-09 12:59:45 -05:00
Alex Huszagh 4733652dd5 Updated titlebar options and top-level titlebar.
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.
2022-05-07 22:39:19 -05:00
Alex Huszagh 63416c47f7 Update gallery.
Updated the linux light and dark theme images to make the gallery
reflect the current widget styles.
2022-05-07 12:43:40 -05:00
Alex Huszagh 3c7306469e Bug fixes for Qt6. 2022-05-07 12:34:49 -05:00
Alex Huszagh 53be089f6a Added workaround for QLCDNumber.
Added example workaround for QLCDNumber, along with an explanation of
the issues styling the LCD number by default with stylesheets.
2022-05-07 12:15:49 -05:00
Alex Huszagh 8f3e87f08e Update LCD display in examples. 2022-05-07 11:40:39 -05:00
Alex Huszagh 9b5d4ce1e9 Update gallery.
Updated the linux light and dark theme images to make the gallery
reflect the current widget styles.
2022-05-07 11:19:29 -05:00
Alex Huszagh 228f515285 Add standard icon override image to ISSUES.md 2022-05-07 10:53:42 -05:00
Alex Huszagh 6e08777b50 Move QWidget icon overrides to start of stylesheet.
Move the QWidget icon overrides to the beginning of the stylesheet, so
they do not override the QDockWidget icon overrides.

Closes #65.
2022-05-07 10:50:48 -05:00
Alex Huszagh c5e548df98 Add screenshots to issue workarounds.
Added screenshots to demonstrate custom dials, whats this, and title
bars.
2022-05-07 10:36:58 -05:00
Alex Huszagh 34af77c192 Use smaller border width for sample image. 2022-05-07 02:05:29 -05:00
Alex Huszagh 4698e92df3 Add titlebar customization issues and workarounds.
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.
2022-05-07 01:59:55 -05:00
Alex Huszagh aa6a420bdc Align QMenu icon and indicator.
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.
2022-05-05 08:29:10 -05:00
Alex Huszagh f46df07615 Rename all instances of plugins to extensions. 2022-05-03 17:33:08 -05:00
Alex Huszagh 8ca51f434a Remove redundant folder usage. 2022-05-03 17:31:33 -05:00
Alex Huszagh 7d28a38927 Document inability to modify QWizard::AeroStyle colors.
Add `QWizard::AeroStyle` to known issues, and document how the values
are hard-coded and the solution: just don't use `AeroStyle`.

Closes #61.
2022-05-03 17:19:27 -05:00
Alex Huszagh 652f4a46bf Fix links in ISSUES.md 2022-05-03 17:02:13 -05:00
Alex Huszagh d006be8949 Added QWhatsThis to known issues.
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.
2022-05-03 16:59:41 -05:00
Alex Huszagh 8f17872d47 Remove lineedit-clear-button-icon.
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.
2022-05-03 16:18:01 -05:00
Alex Huszagh 0ce688bf40 Document workarounds for link colors.
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.
2022-05-03 16:01:17 -05:00
Alex Huszagh 78b65c217d Refactor test suite to use shared definitions.
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.
2022-05-03 15:46:42 -05:00
Alex Huszagh 48bd6fb47d Refactor examples.
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.
2022-05-03 12:43:49 -05:00
Alex Huszagh 7117f45ef8 Added standalone issues documentation.
Create a standalone file documenting limitations and issues with
stylesheets, and providing code samples and workarounds for these
issues.
2022-05-03 10:44:26 -05:00
Alex Huszagh ebdba38c44 Move clear_text icon to template. 2022-05-03 10:44:12 -05:00
Alex Huszagh 027f56d830 Move applicable standard icons to template.
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.
2022-05-03 02:41:07 -05:00
Alex Huszagh a999f985a1 Update calendar next and previous icons. 2022-05-03 02:04:02 -05:00
Alex Huszagh 71eaba28c7 Update documentation for QCommandLinkButton.
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.
2022-05-03 01:42:58 -05:00
Alex Huszagh ceb1d7c3f4 Fix next/back icons in QCalendarWidget on Windows.
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.
2022-05-03 00:21:24 -05:00
Alex Huszagh e655104334 Fix missing comma after selector. 2022-05-02 22:17:20 -05:00
Alex Huszagh a91550bad1 Added more widgets to sample UI. 2022-05-02 22:15:56 -05:00
Alex Huszagh e67fc2044a Fix the arrow indicators on QTabBar scrolling.
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.
2022-05-02 21:40:10 -05:00
Alex Huszagh 267d6544cd Further fixes to QToolButton padding.
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.
2022-05-02 21:30:46 -05:00
Alex Huszagh acc1beba4a Fix padding on QToolButtons.
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.
2022-05-02 19:09:17 -05:00
Alex Huszagh babdabb092 Fix QTreeView indicators in Qt6.
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.
2022-05-02 17:50:39 -05:00
Alex Huszagh f5a6a9fb77 Fix highlighting of QGroupBox checkbox.
Fix the highlighting of an unchecked QGroupBox when it is not hovered or the active widget.

Closes #55.
2022-05-02 17:26:31 -05:00
Alex Huszagh e96a0049f0 Document QCompleter bug with Qt5.
Closes #52.
2022-05-02 17:08:04 -05:00
Alex Huszagh 35eae0c67c Made arrow size in QColumnView consistent.
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.
2022-05-02 16:21:37 -05:00