Skip to content

Commit

Permalink
更新qss样式
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Dec 23, 2021
1 parent 63f4bcb commit b5d7506
Show file tree
Hide file tree
Showing 2 changed files with 348 additions and 0 deletions.
75 changes: 75 additions & 0 deletions Examples/CatWidgetExamples/Resource/qss/CatGray/InputTools.css
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,34 @@ QComboBox::down-arrow:on {
image: url(:/Images/CatGray/PullUp.png);
}

/*下拉项样式 背景蓝色*/
QAbstractItemView {
border: 1px solid #313131;
background-color: #484848;
outline:0px;
font-family: "Ubuntu";
}
QAbstractItemView::item {
color: #C1C1C1;
border: transparent;
min-height: 25px;
background-color: #484848;
}

/*下拉项选中样式*/
QAbstractItemView::item:selected {
color: #C1C1C1;
border: transparent;
background-color: rgba(223,74,22,100%);
}

/*下拉项鼠标悬浮样式*/
QAbstractItemView::item:hover {
color: #C1C1C1;
border: transparent;
background:#656565;
}


QSpinBox {
color: white;
Expand All @@ -196,3 +224,50 @@ QSpinBox::down-button
image: url(:/Images/CatGray/PullDown.png);
}



QDoubleSpinBox {
color: white;
border: 1px solid #959595;
background-color: #757575;
border-radius: 2px; /* 圆角 */
font-family: "Ubuntu";
}

QDoubleSpinBox:focus {
border: 1px solid rgba(223,74,22,100%);
}

/*spinbox 抬起样式*/
QDoubleSpinBox::up-button
{
image: url(:/Images/CatGray/PullUp.png);
}

QDoubleSpinBox::down-button
{
image: url(:/Images/CatGray/PullDown.png);
}

QDateTimeEdit {
color: white;
border: 1px solid #959595;
background-color: #757575;
border-radius: 2px; /* 圆角 */
font-family: "Ubuntu";
}

QDateTimeEdit:focus {
border: 1px solid rgba(223,74,22,100%);
}

/*spinbox 抬起样式*/
QDateTimeEdit::up-button
{
image: url(:/Images/CatGray/PullUp.png);
}

QDateTimeEdit::down-button
{
image: url(:/Images/CatGray/PullDown.png);
}
273 changes: 273 additions & 0 deletions Examples/CatWidgetExamples/Resource/qss/CatWhite/InputTools.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,273 @@
QScrollArea {
border: none;
background-color: transparent;
}

/* 滚动条 */
QScrollBar:vertical
{
width:8px;
background-color: transparent;
margin:0px,0px,0px,0px;
padding-top:0px;
padding-bottom:0px;
}

QScrollBar::handle:vertical
{
width:8px;
background:rgba(130,130,130,50%);
border-radius:4px;
min-height:20;
}

QScrollBar::handle:vertical:hover
{
width:8px;
background:rgba(130,130,130,75%);
border-radius:4px;
min-height:20;
}

QScrollBar::handle:vertical:pressed
{
width:8px;
background:rgba(223,74,22,100%);
border-radius:4px;
min-height:20;
}

/* 上下箭头的边框 */
QScrollBar::add-line:vertical,QScrollBar::sub-line:vertical
{
background: transparent;
border: none;
}

/* 滚动条背景 */
QScrollBar::add-page:vertical,QScrollBar::sub-page:vertical
{
width: 0px;
background: transparent;
border: none;
}

QScrollBar:horizontal
{
height:8px;
background-color: transparent;
margin:0px,0px,0px,0px;
padding-top:0px;
padding-bottom:0px;
}

QScrollBar::handle:horizontal
{
height:8px;
background:rgba(130,130,130,50%);
border-radius:4px;
min-width:20;
}

QScrollBar::handle:horizontal:hover
{
height:8px;
background:rgba(130,130,130,75%);
border-radius:4px;
min-width:20;
}

QScrollBar::handle:horizontal:pressed
{
height:8px;
background:rgba(223,74,22,100%);
border-radius:4px;
min-width:20;
}


/* 左右箭头的边框 */
QScrollBar::add-line:horizontal,QScrollBar::sub-line:horizontal
{
background: transparent;
border: none;
}

/* 滚动条背景 */
QScrollBar::add-page:horizontal,QScrollBar::sub-page:horizontal
{
height: 0px;
background: transparent;
border: none;
}

QLineEdit {
font-family: "Ubuntu";
font-size: 15px;
border: 1px solid #959595;
border-radius: 3px;
color: #4b4642;
background-color: #fdfdfd;
}

QLineEdit:focus {
color: #4b4642;
border: 1px solid rgba(223,74,22,100%);
}

QLineEdit:!enabled {
color: #4b4642;
background-color: #fdfdfd;
border: 1px solid #EFF1F6;
}


QComboBox {
font-family: "Ubuntu";
border: 1px solid #d2d2d2;
color: #4b4642;
background-color: #fdfdfd;
border-radius: 3px;
padding: 1px 18px 1px 3px;
min-width: 150px;
min-height: 30px;
}


QComboBox:editable {
color: #4b4642;
background-color: #fdfdfd;
}

QComboBox:!editable, QComboBox::drop-down:editable {
border: 1px solid #d2d2d2;
background-color: #fdfdfd;
}

/* 当弹出窗口打开时,QComboBox将处于“on”状态 */
QComboBox:!editable:on, QComboBox::drop-down:editable:on {
border: 1px solid rgba(223,74,22,100%);
background-color: #fdfdfd;
}

QComboBox:on { /* 当弹出窗口打开时,移动文本 */
padding-top: 3px;
padding-left: 4px;
}

QComboBox::drop-down {
subcontrol-origin: padding;
subcontrol-position: top right;
width: 15px;
border-top-right-radius: 3px; /* 半径与QComboBox相同 */
border-bottom-right-radius: 3px;
}

QComboBox::down-arrow {
padding-right: 6px;
image: url(:/Images/CatWhite/PullDown.png);
}

QComboBox::down-arrow:on {
padding-right: 6px;
image: url(:/Images/CatWhite/PullUp.png);
}

/*下拉项样式 背景蓝色*/
QAbstractItemView {
border: 1px solid #c9c9c9;
background-color: #fafafa;
outline:0px;
font-family: "Ubuntu";
}
QAbstractItemView::item {
color: #4b4642;
border: transparent;
min-height: 25px;
background-color: #fafafa;
}

/*下拉项选中样式*/
QAbstractItemView::item:selected {
color: #C1C1C1;
border: transparent;
background-color: rgba(223,74,22,100%);
}

/*下拉项鼠标悬浮样式*/
QAbstractItemView::item:hover {
color: #4b4642;
border: transparent;
background:#dedede;
}


QSpinBox {
border: 1px solid #959595;
color: #4b4642;
background-color: #fdfdfd;
border-radius: 2px; /* 圆角 */
font-family: "Ubuntu";
}

QSpinBox:focus {
border: 1px solid rgba(223,74,22,100%);
}

/*spinbox 抬起样式*/
QSpinBox::up-button
{
image: url(:/Images/CatWhite/PullUp.png);
}
QSpinBox::down-button
{
image: url(:/Images/CatWhite/PullDown.png);
}



QDoubleSpinBox {
border: 1px solid #959595;
color: #4b4642;
background-color: #fdfdfd;
border-radius: 2px; /* 圆角 */
font-family: "Ubuntu";
}

QDoubleSpinBox:focus {
border: 1px solid rgba(223,74,22,100%);
}

/*spinbox 抬起样式*/
QDoubleSpinBox::up-button
{
image: url(:/Images/CatWhite/PullUp.png);
}

QDoubleSpinBox::down-button
{
image: url(:/Images/CatWhite/PullDown.png);
}

QDateTimeEdit {
border: 1px solid #959595;
color: #4b4642;
background-color: #fdfdfd;
border-radius: 2px; /* 圆角 */
font-family: "Ubuntu";
}

QDateTimeEdit:focus {
border: 1px solid rgba(223,74,22,100%);
}

/*spinbox 抬起样式*/
QDateTimeEdit::up-button
{
image: url(:/Images/CatWhite/PullUp.png);
}

QDateTimeEdit::down-button
{
image: url(:/Images/CatWhite/PullDown.png);
}

0 comments on commit b5d7506

Please sign in to comment.