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.
main
Alex Huszagh 2022-05-02 21:40:10 -05:00
parent 267d6544cd
commit e67fc2044a
6 changed files with 4482 additions and 4520 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1472,34 +1472,6 @@ QTabBar::tab:right:!selected:first:hover
border-bottom-left-radius: 0em; border-bottom-left-radius: 0em;
} }
QTabBar QToolButton::right-arrow:enabled
{
border-image: url(dark:right_arrow.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::left-arrow:enabled
{
border-image: url(dark:left_arrow.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::right-arrow:disabled
{
border-image: url(dark:right_arrow_disabled.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::left-arrow:disabled
{
border-image: url(dark:left_arrow_disabled.svg);
width: 0.5em;
height: 0.8em;
}
/** /**
* Special styles for triangular QTabWidgets. * Special styles for triangular QTabWidgets.
* These ignore the border attributes, and the border and * These ignore the border attributes, and the border and
@ -1925,14 +1897,14 @@ QDialog QToolBar QToolButton[hasMenu="false"][popupMode="2"]
QToolButton[autoRaise="false"] QToolButton[autoRaise="false"]
{ {
background-color: transparent; background-color: #31363b;
border: 0.04em solid #76797c; border: 0.04em solid #76797c;
border-radius: 0.09em; border-radius: 0.09em;
} }
QToolButton[autoRaise="true"] QToolButton[autoRaise="true"]
{ {
background-color: transparent; background-color: #31363b;
border: 0.04em solid transparent; border: 0.04em solid transparent;
} }
@ -1977,26 +1949,46 @@ QToolButton::down-arrow
padding: 0em; padding: 0em;
} }
QToolButton::right-arrow QToolButton::right-arrow:enabled
{ {
image: url(dark:right_arrow.svg); image: url(dark:right_arrow.svg);
} }
QToolButton::left-arrow QToolButton::left-arrow:enabled
{ {
image: url(dark:left_arrow.svg); image: url(dark:left_arrow.svg);
} }
QToolButton::up-arrow QToolButton::up-arrow:enabled
{ {
image: url(dark:up_arrow.svg); image: url(dark:up_arrow.svg);
} }
QToolButton::down-arrow QToolButton::down-arrow:enabled
{ {
image: url(dark:down_arrow.svg); image: url(dark:down_arrow.svg);
} }
QToolButton::right-arrow:disabled
{
image: url(dark:right_arrow_disabled.svg);
}
QToolButton::left-arrow:disabled
{
image: url(dark:left_arrow_disabled.svg);
}
QToolButton::up-arrow:disabled
{
image: url(dark:up_arrow_disabled.svg);
}
QToolButton::down-arrow:disabled
{
image: url(dark:down_arrow_disabled.svg);
}
QToolButton::menu-indicator QToolButton::menu-indicator
{ {
border-image: none; border-image: none;

View File

@ -1472,34 +1472,6 @@ QTabBar::tab:right:!selected:first:hover
border-bottom-left-radius: 0em; border-bottom-left-radius: 0em;
} }
QTabBar QToolButton::right-arrow:enabled
{
border-image: url(light:right_arrow.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::left-arrow:enabled
{
border-image: url(light:left_arrow.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::right-arrow:disabled
{
border-image: url(light:right_arrow_disabled.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::left-arrow:disabled
{
border-image: url(light:left_arrow_disabled.svg);
width: 0.5em;
height: 0.8em;
}
/** /**
* Special styles for triangular QTabWidgets. * Special styles for triangular QTabWidgets.
* These ignore the border attributes, and the border and * These ignore the border attributes, and the border and
@ -1925,14 +1897,14 @@ QDialog QToolBar QToolButton[hasMenu="false"][popupMode="2"]
QToolButton[autoRaise="false"] QToolButton[autoRaise="false"]
{ {
background-color: transparent; background-color: #eff0f1;
border: 0.04em solid #bab9b8; border: 0.04em solid #bab9b8;
border-radius: 0.09em; border-radius: 0.09em;
} }
QToolButton[autoRaise="true"] QToolButton[autoRaise="true"]
{ {
background-color: transparent; background-color: #eff0f1;
border: 0.04em solid transparent; border: 0.04em solid transparent;
} }
@ -1977,26 +1949,46 @@ QToolButton::down-arrow
padding: 0em; padding: 0em;
} }
QToolButton::right-arrow QToolButton::right-arrow:enabled
{ {
image: url(light:right_arrow.svg); image: url(light:right_arrow.svg);
} }
QToolButton::left-arrow QToolButton::left-arrow:enabled
{ {
image: url(light:left_arrow.svg); image: url(light:left_arrow.svg);
} }
QToolButton::up-arrow QToolButton::up-arrow:enabled
{ {
image: url(light:up_arrow.svg); image: url(light:up_arrow.svg);
} }
QToolButton::down-arrow QToolButton::down-arrow:enabled
{ {
image: url(light:down_arrow.svg); image: url(light:down_arrow.svg);
} }
QToolButton::right-arrow:disabled
{
image: url(light:right_arrow_disabled.svg);
}
QToolButton::left-arrow:disabled
{
image: url(light:left_arrow_disabled.svg);
}
QToolButton::up-arrow:disabled
{
image: url(light:up_arrow_disabled.svg);
}
QToolButton::down-arrow:disabled
{
image: url(light:down_arrow_disabled.svg);
}
QToolButton::menu-indicator QToolButton::menu-indicator
{ {
border-image: none; border-image: none;

View File

@ -1472,34 +1472,6 @@ QTabBar::tab:right:!selected:first:hover
border-bottom-left-radius: 0em; border-bottom-left-radius: 0em;
} }
QTabBar QToolButton::right-arrow:enabled
{
border-image: url(:/dark/right_arrow.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::left-arrow:enabled
{
border-image: url(:/dark/left_arrow.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::right-arrow:disabled
{
border-image: url(:/dark/right_arrow_disabled.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::left-arrow:disabled
{
border-image: url(:/dark/left_arrow_disabled.svg);
width: 0.5em;
height: 0.8em;
}
/** /**
* Special styles for triangular QTabWidgets. * Special styles for triangular QTabWidgets.
* These ignore the border attributes, and the border and * These ignore the border attributes, and the border and
@ -1925,14 +1897,14 @@ QDialog QToolBar QToolButton[hasMenu="false"][popupMode="2"]
QToolButton[autoRaise="false"] QToolButton[autoRaise="false"]
{ {
background-color: transparent; background-color: #31363b;
border: 0.04em solid #76797c; border: 0.04em solid #76797c;
border-radius: 0.09em; border-radius: 0.09em;
} }
QToolButton[autoRaise="true"] QToolButton[autoRaise="true"]
{ {
background-color: transparent; background-color: #31363b;
border: 0.04em solid transparent; border: 0.04em solid transparent;
} }
@ -1977,26 +1949,46 @@ QToolButton::down-arrow
padding: 0em; padding: 0em;
} }
QToolButton::right-arrow QToolButton::right-arrow:enabled
{ {
image: url(:/dark/right_arrow.svg); image: url(:/dark/right_arrow.svg);
} }
QToolButton::left-arrow QToolButton::left-arrow:enabled
{ {
image: url(:/dark/left_arrow.svg); image: url(:/dark/left_arrow.svg);
} }
QToolButton::up-arrow QToolButton::up-arrow:enabled
{ {
image: url(:/dark/up_arrow.svg); image: url(:/dark/up_arrow.svg);
} }
QToolButton::down-arrow QToolButton::down-arrow:enabled
{ {
image: url(:/dark/down_arrow.svg); image: url(:/dark/down_arrow.svg);
} }
QToolButton::right-arrow:disabled
{
image: url(:/dark/right_arrow_disabled.svg);
}
QToolButton::left-arrow:disabled
{
image: url(:/dark/left_arrow_disabled.svg);
}
QToolButton::up-arrow:disabled
{
image: url(:/dark/up_arrow_disabled.svg);
}
QToolButton::down-arrow:disabled
{
image: url(:/dark/down_arrow_disabled.svg);
}
QToolButton::menu-indicator QToolButton::menu-indicator
{ {
border-image: none; border-image: none;

View File

@ -1472,34 +1472,6 @@ QTabBar::tab:right:!selected:first:hover
border-bottom-left-radius: 0em; border-bottom-left-radius: 0em;
} }
QTabBar QToolButton::right-arrow:enabled
{
border-image: url(:/light/right_arrow.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::left-arrow:enabled
{
border-image: url(:/light/left_arrow.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::right-arrow:disabled
{
border-image: url(:/light/right_arrow_disabled.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::left-arrow:disabled
{
border-image: url(:/light/left_arrow_disabled.svg);
width: 0.5em;
height: 0.8em;
}
/** /**
* Special styles for triangular QTabWidgets. * Special styles for triangular QTabWidgets.
* These ignore the border attributes, and the border and * These ignore the border attributes, and the border and
@ -1925,14 +1897,14 @@ QDialog QToolBar QToolButton[hasMenu="false"][popupMode="2"]
QToolButton[autoRaise="false"] QToolButton[autoRaise="false"]
{ {
background-color: transparent; background-color: #eff0f1;
border: 0.04em solid #bab9b8; border: 0.04em solid #bab9b8;
border-radius: 0.09em; border-radius: 0.09em;
} }
QToolButton[autoRaise="true"] QToolButton[autoRaise="true"]
{ {
background-color: transparent; background-color: #eff0f1;
border: 0.04em solid transparent; border: 0.04em solid transparent;
} }
@ -1977,26 +1949,46 @@ QToolButton::down-arrow
padding: 0em; padding: 0em;
} }
QToolButton::right-arrow QToolButton::right-arrow:enabled
{ {
image: url(:/light/right_arrow.svg); image: url(:/light/right_arrow.svg);
} }
QToolButton::left-arrow QToolButton::left-arrow:enabled
{ {
image: url(:/light/left_arrow.svg); image: url(:/light/left_arrow.svg);
} }
QToolButton::up-arrow QToolButton::up-arrow:enabled
{ {
image: url(:/light/up_arrow.svg); image: url(:/light/up_arrow.svg);
} }
QToolButton::down-arrow QToolButton::down-arrow:enabled
{ {
image: url(:/light/down_arrow.svg); image: url(:/light/down_arrow.svg);
} }
QToolButton::right-arrow:disabled
{
image: url(:/light/right_arrow_disabled.svg);
}
QToolButton::left-arrow:disabled
{
image: url(:/light/left_arrow_disabled.svg);
}
QToolButton::up-arrow:disabled
{
image: url(:/light/up_arrow_disabled.svg);
}
QToolButton::down-arrow:disabled
{
image: url(:/light/down_arrow_disabled.svg);
}
QToolButton::menu-indicator QToolButton::menu-indicator
{ {
border-image: none; border-image: none;

View File

@ -1472,34 +1472,6 @@ QTabBar::tab:right:!selected:first:hover
border-bottom-left-radius: 0em; border-bottom-left-radius: 0em;
} }
QTabBar QToolButton::right-arrow:enabled
{
border-image: url(^style^right_arrow.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::left-arrow:enabled
{
border-image: url(^style^left_arrow.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::right-arrow:disabled
{
border-image: url(^style^right_arrow_disabled.svg);
width: 0.5em;
height: 0.8em;
}
QTabBar QToolButton::left-arrow:disabled
{
border-image: url(^style^left_arrow_disabled.svg);
width: 0.5em;
height: 0.8em;
}
/** /**
* Special styles for triangular QTabWidgets. * Special styles for triangular QTabWidgets.
* These ignore the border attributes, and the border and * These ignore the border attributes, and the border and
@ -1925,14 +1897,14 @@ QDialog QToolBar QToolButton[hasMenu="false"][popupMode="2"]
QToolButton[autoRaise="false"] QToolButton[autoRaise="false"]
{ {
background-color: transparent; background-color: ^background^;
border: 0.04em solid ^midtone^; border: 0.04em solid ^midtone^;
border-radius: 0.09em; border-radius: 0.09em;
} }
QToolButton[autoRaise="true"] QToolButton[autoRaise="true"]
{ {
background-color: transparent; background-color: ^background^;
border: 0.04em solid transparent; border: 0.04em solid transparent;
} }
@ -1977,26 +1949,46 @@ QToolButton::down-arrow
padding: 0em; padding: 0em;
} }
QToolButton::right-arrow QToolButton::right-arrow:enabled
{ {
image: url(^style^right_arrow.svg); image: url(^style^right_arrow.svg);
} }
QToolButton::left-arrow QToolButton::left-arrow:enabled
{ {
image: url(^style^left_arrow.svg); image: url(^style^left_arrow.svg);
} }
QToolButton::up-arrow QToolButton::up-arrow:enabled
{ {
image: url(^style^up_arrow.svg); image: url(^style^up_arrow.svg);
} }
QToolButton::down-arrow QToolButton::down-arrow:enabled
{ {
image: url(^style^down_arrow.svg); image: url(^style^down_arrow.svg);
} }
QToolButton::right-arrow:disabled
{
image: url(^style^right_arrow_disabled.svg);
}
QToolButton::left-arrow:disabled
{
image: url(^style^left_arrow_disabled.svg);
}
QToolButton::up-arrow:disabled
{
image: url(^style^up_arrow_disabled.svg);
}
QToolButton::down-arrow:disabled
{
image: url(^style^down_arrow_disabled.svg);
}
QToolButton::menu-indicator QToolButton::menu-indicator
{ {
border-image: none; border-image: none;