提交 18d76fd6 编写于 作者: 之一Yo's avatar 之一Yo

修复列表视图右击菜单边距过大的问题

上级 8134996f
...@@ -12,7 +12,7 @@ Examples are available at https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/ma ...@@ -12,7 +12,7 @@ Examples are available at https://github.com/zhiyiYo/PyQt-Fluent-Widgets/tree/ma
:license: GPLv3, see LICENSE for more details. :license: GPLv3, see LICENSE for more details.
""" """
__version__ = "0.8.5" __version__ = "0.8.6"
from .components import * from .components import *
from .common import * from .common import *
......
QListView { ListView,
ListWidget {
background: transparent; background: transparent;
outline: none; outline: none;
border: none; border: none;
...@@ -9,7 +10,8 @@ QListView { ...@@ -9,7 +10,8 @@ QListView {
padding-right: 4px; padding-right: 4px;
} }
QListView::item { ListView::item,
ListWidget::item {
background: transparent; background: transparent;
border: 0px; border: 0px;
padding-left: 11px; padding-left: 11px;
...@@ -17,7 +19,8 @@ QListView::item { ...@@ -17,7 +19,8 @@ QListView::item {
height: 35px; height: 35px;
} }
QListView::indicator { ListView::indicator,
ListWidget::indicator {
width: 18px; width: 18px;
height: 18px; height: 18px;
border-radius: 5px; border-radius: 5px;
...@@ -26,49 +29,62 @@ QListView::indicator { ...@@ -26,49 +29,62 @@ QListView::indicator {
margin-right: 4px; margin-right: 4px;
} }
QListView::indicator:hover { ListView::indicator:hover,
ListWidget::indicator:hover {
border: 1px solid rgba(255, 255, 255, 0.5547); border: 1px solid rgba(255, 255, 255, 0.5547);
background-color: rgba(255, 255, 255, 0.0419); background-color: rgba(255, 255, 255, 0.0419);
} }
QListView::indicator:pressed { ListView::indicator:pressed,
ListWidget::indicator:pressed {
border: 1px solid rgba(255, 255, 255, 0.1581); border: 1px solid rgba(255, 255, 255, 0.1581);
background-color: rgba(255, 255, 255, 0.0698); background-color: rgba(255, 255, 255, 0.0698);
} }
QListView::indicator:checked, ListView::indicator:checke,
QListView::indicator:indeterminate { ListWidget::indicator:checked,
ListView::indicator:indeterminate,
ListWidget::indicator:indeterminate {
border: 1px solid --ThemeColorPrimary; border: 1px solid --ThemeColorPrimary;
background-color: --ThemeColorPrimary; background-color: --ThemeColorPrimary;
} }
QListView::indicator:checked { ListView::indicator:checked,
ListWidget::indicator:checked {
image: url(:/qfluentwidgets/images/check_box/Accept_black.svg); image: url(:/qfluentwidgets/images/check_box/Accept_black.svg);
} }
QListView::indicator:indeterminate { ListView::indicator:indeterminate,
ListWidget::indicator:indeterminate {
image: url(:/qfluentwidgets/images/check_box/PartialAccept_black.svg); image: url(:/qfluentwidgets/images/check_box/PartialAccept_black.svg);
} }
QListView::indicator:checked:hover, ListView::indicator:checked:hove,
QListView::indicator:indeterminate:hover { ListWidget::indicator:checked:hover,
ListView::indicator:indeterminate:hover,
ListWidget::indicator:indeterminate:hover {
border: 1px solid --ThemeColorLight1; border: 1px solid --ThemeColorLight1;
background-color: --ThemeColorLight1; background-color: --ThemeColorLight1;
} }
QListView::indicator:checked:pressed, ListView::indicator:checked:presse,
QListView::indicator:indeterminate:pressed { ListWidget::indicator:checked:pressed,
ListView::indicator:indeterminate:pressed,
ListWidget::indicator:indeterminate:pressed {
border: 1px solid --ThemeColorLight3; border: 1px solid --ThemeColorLight3;
background-color: --ThemeColorLight3; background-color: --ThemeColorLight3;
} }
QListView::indicator:disabled { ListView::indicator:disabled,
ListWidget::indicator:disabled {
border: 1px solid rgba(255, 255, 255, 0.1581); border: 1px solid rgba(255, 255, 255, 0.1581);
background-color: transparent background-color: transparent
} }
QListView::indicator:checked:disabled, ListView::indicator:checked:disable,
QListView::indicator:indeterminate:disabled { ListWidget::indicator:checked:disabled,
ListView::indicator:indeterminate:disabled,
ListWidget::indicator:indeterminate:disabled {
border: 1px solid rgb(82, 82, 82); border: 1px solid rgb(82, 82, 82);
background-color: rgb(82, 82, 82); background-color: rgb(82, 82, 82);
} }
\ No newline at end of file
QListView { ListView,
ListWidget {
background: transparent; background: transparent;
outline: none; outline: none;
border: none; border: none;
...@@ -9,7 +10,8 @@ QListView { ...@@ -9,7 +10,8 @@ QListView {
padding-right: 4px; padding-right: 4px;
} }
QListView::item { ListView::item,
ListWidget::item {
background: transparent; background: transparent;
border: 0px; border: 0px;
padding-left: 11px; padding-left: 11px;
...@@ -18,7 +20,8 @@ QListView::item { ...@@ -18,7 +20,8 @@ QListView::item {
} }
QListView::indicator { ListView::indicator,
ListWidget::indicator {
width: 18px; width: 18px;
height: 18px; height: 18px;
border-radius: 5px; border-radius: 5px;
...@@ -27,49 +30,62 @@ QListView::indicator { ...@@ -27,49 +30,62 @@ QListView::indicator {
margin-right: 4px; margin-right: 4px;
} }
QListView::indicator:hover { ListView::indicator:hover,
ListWidget::indicator:hover {
border: 1px solid rgba(0, 0, 0, 0.56); border: 1px solid rgba(0, 0, 0, 0.56);
background-color: rgba(0, 0, 0, 0.05); background-color: rgba(0, 0, 0, 0.05);
} }
QListView::indicator:pressed { ListView::indicator:pressed,
ListWidget::indicator:pressed {
border: 1px solid rgba(0, 0, 0, 0.27); border: 1px solid rgba(0, 0, 0, 0.27);
background-color: rgba(0, 0, 0, 0.12); background-color: rgba(0, 0, 0, 0.12);
} }
QListView::indicator:checked, ListView::indicator:checke,
QListView::indicator:indeterminate { ListWidget::indicator:checked,
ListView::indicator:indeterminate,
ListWidget::indicator:indeterminate {
border: 1px solid --ThemeColorPrimary; border: 1px solid --ThemeColorPrimary;
background-color: --ThemeColorPrimary; background-color: --ThemeColorPrimary;
} }
QListView::indicator:checked { ListView::indicator:checked,
ListWidget::indicator:checked {
image: url(:/qfluentwidgets/images/check_box/Accept_white.svg); image: url(:/qfluentwidgets/images/check_box/Accept_white.svg);
} }
QListView::indicator:indeterminate { ListView::indicator:indeterminate,
ListWidget::indicator:indeterminate {
image: url(:/qfluentwidgets/images/check_box/PartialAccept_white.svg); image: url(:/qfluentwidgets/images/check_box/PartialAccept_white.svg);
} }
QListView::indicator:checked:hover, ListView::indicator:checked:hove,
QListView::indicator:indeterminate:hover { ListWidget::indicator:checked:hover,
ListView::indicator:indeterminate:hover,
ListWidget::indicator:indeterminate:hover {
border: 1px solid --ThemeColorLight1; border: 1px solid --ThemeColorLight1;
background-color: --ThemeColorLight1; background-color: --ThemeColorLight1;
} }
QListView::indicator:checked:pressed, ListView::indicator:checked:presse,
QListView::indicator:indeterminate:pressed { ListWidget::indicator:checked:pressed,
ListView::indicator:indeterminate:pressed,
ListWidget::indicator:indeterminate:pressed {
border: 1px solid --ThemeColorLight3; border: 1px solid --ThemeColorLight3;
background-color: --ThemeColorLight3; background-color: --ThemeColorLight3;
} }
QListView::indicator:disabled { ListView::indicator:disabled,
ListWidget::indicator:disabled {
border: 1px solid rgba(0, 0, 0, 0.27); border: 1px solid rgba(0, 0, 0, 0.27);
background-color: transparent; background-color: transparent;
} }
QListView::indicator:checked:disabled, ListView::indicator:checked:disable,
QListView::indicator:indeterminate:disabled { ListWidget::indicator:checked:disabled,
ListView::indicator:indeterminate:disabled,
ListWidget::indicator:indeterminate:disabled {
border: 1px solid rgb(199, 199, 199); border: 1px solid rgb(199, 199, 199);
background-color: rgb(199, 199, 199); background-color: rgb(199, 199, 199);
} }
\ No newline at end of file
因为 它太大了无法显示 source diff 。你可以改为 查看blob
...@@ -6,7 +6,7 @@ with open('README.md', encoding='utf-8') as f: ...@@ -6,7 +6,7 @@ with open('README.md', encoding='utf-8') as f:
setuptools.setup( setuptools.setup(
name="PyQt-Fluent-Widgets", name="PyQt-Fluent-Widgets",
version="0.8.5", version="0.8.6",
keywords="pyqt fluent widgets", keywords="pyqt fluent widgets",
author="zhiyiYo", author="zhiyiYo",
author_email="shokokawaii@outlook.com", author_email="shokokawaii@outlook.com",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册