Commit Graph

44 Commits (8d8fc68f63e1a40041b6cf76f0c8ab8aec9d4574)

Author SHA1 Message Date
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 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 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 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 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 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 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 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
Alex Huszagh 2a90ca995a Fix scrollbar + sizegrip issue causing view expansion.
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.
2022-05-02 15:40:05 -05:00
Alex Huszagh 8ad730cd70 Fix QColumnView with stylesheet.
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.
2022-05-02 14:25:28 -05:00
Alex Huszagh ae42e0d6f9 Revert QAbstractSlider to QSlider.
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.
2022-05-02 13:46:11 -05:00
Alex Huszagh b37e73bd36 Change QSlider to QAbstractSlider. 2022-05-01 15:55:16 -05:00
Alex Huszagh 49d44916ed Fix drop-down icon for QDateEdit with the calendar popup.
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.
2022-05-01 14:26:54 -05:00
Alex Huszagh fb3a789dc3 Bug fix for QCalendarWidget in QDateTimeEdit.
Fixes the year drop-down menu to properly be styled, via the
`qt_datetimedit_calendar` object name.
2022-05-01 12:43:57 -05:00
Alex Huszagh 9655e7da32 Fix styles for triangular QTabBars.
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.
2022-05-01 12:07:07 -05:00
Alex Huszagh 48b7d6d75d Fix QCalendarWidget.
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.
2022-04-29 15:55:37 -05:00
Alex Huszagh 0377357dc0 Added unittests for auto-raised QToolButtons.
Added unittests for different arrow types both auto-raised and not.
2022-04-29 12:38:17 -05:00
Alex Huszagh 1ea115e266 Fix table sort indicator and padding.
Ensures table sort indicator is present on the right, is always visible by clipping just the right amount of content, and fixes the padding issues with the tables before. If the sort indicator is not present, there is no clipping.

Closes #35.
2022-04-29 09:32:33 -05:00
Alex Huszagh c29d290eb8 Fix padding in QHeaderView sections.
Also patches the workaround for #31, by avoiding any hacks to get the desired behavior. Sets the `subcontrol-origin` to `margin` and `subcontrol-position` to `right`, and uses `::up-arrow` and `::down-arrow` subcontrols only when `showSortIndicator="true"`.

Closes #37.
2022-04-29 09:22:09 -05:00
Alex Huszagh 9ad5917cb5 Fix min-height in QToolButton affecting QFileDialog.
Removed the `min-height` styles from `QToolButton[autoRaise="false"]` and `QToolButton[autoRaise="false"]:checked, QToolButton[autoRaise="false"]:pressed` to fix the issues with the clear text icon in #28. This does not affect the UI anyway, so has no downsides.

Fixes #28.
2022-04-28 15:29:44 -05:00
Alex Huszagh 90f679d600 Fix arrow placement on QToolButton.
Fixes issues between the arrow placement in the `menu-arrow` and `menu-indicator` of a QToolButton, which was inconsistent between Qt5 and Qt6. Using `subcontrol-origin: content;` and then adjusting `padding-right: -1.11em;` fixes the issue.

Fixes #36.
2022-04-28 15:18:43 -05:00
Alex Huszagh 836febe922 Fix hover/pressed/checked events for auto-raised QToolButtons.
Fixes #34.
2022-04-28 13:51:05 -05:00
Alex Huszagh db1019ddd8 Bug fixes for QToolButton
Fixed styles for auto-raised QToolButtons. Also added fixes for standard icons in test suites, to ensure they work in Qt5 and Qt6. Added auto-raised icons to `example/widgets.py`.

Closes #22.
2022-04-28 10:56:39 -05:00
Alex Huszagh e54c825b90 Fix QHeaderView column margins with arrows.
Fixes #31. Sets `-5em` left and right margins as a hack to ensure that
the headers are properly spaced.
2022-04-27 18:18:58 -05:00
Alex Huszagh 102976f25f Fix bottom margin in QHeaderView rows with arrows.
Partially addresses #31. Only fixes the row header margins, and not the
margins for the QHeaderView columns.
2022-04-27 18:17:19 -05:00
Alex Huszagh 2298fcd8bb Add full support for the Advanced Docking System
closes #20
2021-07-20 18:15:07 -05:00
Alex Huszagh 37e1e0c063 Added initial support for extensions and UI fixes.
- Renamed icons with `-` to `_`.
- Added initial support for the Advanced Docking System.
- Added extension for QDockWidget tooltips.
- Bug fixes for QTabWidget.
- Bug fixes for the separator in the QDockWidget.
2021-07-20 13:48:42 -05:00
Alex Huszagh 846254032c Add support for the extensions syntax in configurations. 2021-07-19 21:51:24 -05:00
Alex Huszagh 3bf2427ce2 Added support for PyQt6. 2021-07-18 10:11:09 -05:00
Alex Huszagh d620f2226b Bug fixes for #11 2021-07-17 00:09:44 -05:00
Alex Huszagh 735d6486ee Bug fix for #15. 2021-07-16 23:24:48 -05:00
Alex Huszagh ce29da0ba7 Added support for better dialog widgets, useful for custom themes. 2021-07-16 22:07:12 -05:00
Alex Huszagh 038a9d2a65 Updated tests, minor bug fixes, and merge lightv2 into light. 2021-07-16 17:03:26 -05:00
Alex Huszagh 4279cb7c52 Added documentation for designing custom themes. 2021-07-16 15:16:35 -05:00
Alex Huszagh 6b30b5d89c Major overhaul of the UI and themes.
- Fixed nearly every platform-specific bug on Linux.
- Added numerous more widgets to the example view.
- Fixed a the background colors for dark widgets.
- Made theming configurable via JSON files.
- Added sample, custom themes to the `configure` directory.
- Fixed QSlider handle being highlighted when not having focus.
- Fixed unwanted underlining in the tabs of QTabBar.
- Made the view have more depth with more complex color schemes.
- Fixed the background of the drop menu for QComboBox.
- Made the background darker if the QComboBox is editable.
- Improved border widths.
- Fixed the radio button size.
- Fixed SVG icons with opacity.
2021-07-16 14:30:46 -05:00
Alex Huszagh e4d4e54ef5 Moved everything to templates.
- Fixed bug with QTreeView with checkable items.
- Added JSON configurations for configurations.
- Added tests for QTreeView.
- Created a limited set of data.
2021-07-15 21:09:27 -05:00
Alex Huszagh 491e693237 Move to template-driven resource generation. 2021-07-15 20:28:48 -05:00