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.
main
Alex Huszagh 2022-05-03 00:21:24 -05:00
parent e655104334
commit ceb1d7c3f4
6 changed files with 5434 additions and 5357 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1089,18 +1089,21 @@ QCalendarWidget QAbstractItemView:enabled
} }
/* Won't take hover events. */ /* Won't take hover events. */
QPrevNextCalButton
{
min-width: 0.8em;
min-height: 1.2em;
qproperty-iconSize: 0px 0px;
}
QPrevNextCalButton#qt_calendar_nextmonth QPrevNextCalButton#qt_calendar_nextmonth
{ {
image: none; image: url(dark:right_arrow.svg);
subcontrol-origin: content;
subcontrol-position: right;
} }
QPrevNextCalButton#qt_calendar_prevmonth QPrevNextCalButton#qt_calendar_prevmonth
{ {
image: none; image: url(dark:left_arrow.svg);
subcontrol-origin: content;
subcontrol-position: left;
} }
/** /**

View File

@ -1089,18 +1089,21 @@ QCalendarWidget QAbstractItemView:enabled
} }
/* Won't take hover events. */ /* Won't take hover events. */
QPrevNextCalButton
{
min-width: 0.8em;
min-height: 1.2em;
qproperty-iconSize: 0px 0px;
}
QPrevNextCalButton#qt_calendar_nextmonth QPrevNextCalButton#qt_calendar_nextmonth
{ {
image: none; image: url(light:right_arrow.svg);
subcontrol-origin: content;
subcontrol-position: right;
} }
QPrevNextCalButton#qt_calendar_prevmonth QPrevNextCalButton#qt_calendar_prevmonth
{ {
image: none; image: url(light:left_arrow.svg);
subcontrol-origin: content;
subcontrol-position: left;
} }
/** /**

View File

@ -1089,18 +1089,21 @@ QCalendarWidget QAbstractItemView:enabled
} }
/* Won't take hover events. */ /* Won't take hover events. */
QPrevNextCalButton
{
min-width: 0.8em;
min-height: 1.2em;
qproperty-iconSize: 0px 0px;
}
QPrevNextCalButton#qt_calendar_nextmonth QPrevNextCalButton#qt_calendar_nextmonth
{ {
image: none; image: url(:/dark/right_arrow.svg);
subcontrol-origin: content;
subcontrol-position: right;
} }
QPrevNextCalButton#qt_calendar_prevmonth QPrevNextCalButton#qt_calendar_prevmonth
{ {
image: none; image: url(:/dark/left_arrow.svg);
subcontrol-origin: content;
subcontrol-position: left;
} }
/** /**

View File

@ -1089,18 +1089,21 @@ QCalendarWidget QAbstractItemView:enabled
} }
/* Won't take hover events. */ /* Won't take hover events. */
QPrevNextCalButton
{
min-width: 0.8em;
min-height: 1.2em;
qproperty-iconSize: 0px 0px;
}
QPrevNextCalButton#qt_calendar_nextmonth QPrevNextCalButton#qt_calendar_nextmonth
{ {
image: none; image: url(:/light/right_arrow.svg);
subcontrol-origin: content;
subcontrol-position: right;
} }
QPrevNextCalButton#qt_calendar_prevmonth QPrevNextCalButton#qt_calendar_prevmonth
{ {
image: none; image: url(:/light/left_arrow.svg);
subcontrol-origin: content;
subcontrol-position: left;
} }
/** /**

View File

@ -1089,18 +1089,21 @@ QCalendarWidget QAbstractItemView:enabled
} }
/* Won't take hover events. */ /* Won't take hover events. */
QPrevNextCalButton
{
min-width: 0.8em;
min-height: 1.2em;
qproperty-iconSize: 0px 0px;
}
QPrevNextCalButton#qt_calendar_nextmonth QPrevNextCalButton#qt_calendar_nextmonth
{ {
image: none; image: url(^style^right_arrow.svg);
subcontrol-origin: content;
subcontrol-position: right;
} }
QPrevNextCalButton#qt_calendar_prevmonth QPrevNextCalButton#qt_calendar_prevmonth
{ {
image: none; image: url(^style^left_arrow.svg);
subcontrol-origin: content;
subcontrol-position: left;
} }
/** /**