master
feiyangqingyun 2023-08-16 15:41:00 +08:00
parent 61f835c86e
commit 2062fbc749
13 changed files with 80 additions and 97 deletions

View File

@ -272,6 +272,8 @@ void IconHelper::setStyle1(QWidget *widget, QList<QAbstractButton *> btns, QList
}
QString position = styleColor.position;
quint32 btnWidth = styleColor.btnWidth;
quint32 btnHeight = styleColor.btnHeight;
quint32 iconSize = styleColor.iconSize;
quint32 iconWidth = styleColor.iconWidth;
quint32 iconHeight = styleColor.iconHeight;
@ -324,6 +326,14 @@ void IconHelper::setStyle1(QWidget *widget, QList<QAbstractButton *> btns, QList
qss << QString("QWidget>QAbstractButton:checked{background-color:%1;color:%2;}")
.arg(styleColor.checkedBgColor).arg(styleColor.checkedTextColor);
//按钮宽度高度
if (btnWidth > 0) {
qss << QString("QWidget>QAbstractButton{min-width:%1px;}").arg(btnWidth);
}
if (btnHeight > 0) {
qss << QString("QWidget>QAbstractButton{min-height:%1px;}").arg(btnHeight);
}
//设置样式表
widget->setStyleSheet(qss.join(""));

View File

@ -49,6 +49,9 @@ public:
QString position; //位置 left right top bottom
bool defaultBorder; //默认有边框
quint32 btnWidth; //按钮宽度
quint32 btnHeight; //按钮高度
quint32 iconSize; //图标字体尺寸
quint32 iconWidth; //图标图片宽度
quint32 iconHeight; //图标图片高度
@ -69,6 +72,9 @@ public:
position = "left";
defaultBorder = false;
btnWidth = 0;
btnHeight = 0;
iconSize = 12;
iconWidth = 15;
iconHeight = 15;

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

View File

@ -272,6 +272,8 @@ void IconHelper::setStyle1(QWidget *widget, QList<QAbstractButton *> btns, QList
}
QString position = styleColor.position;
quint32 btnWidth = styleColor.btnWidth;
quint32 btnHeight = styleColor.btnHeight;
quint32 iconSize = styleColor.iconSize;
quint32 iconWidth = styleColor.iconWidth;
quint32 iconHeight = styleColor.iconHeight;
@ -324,6 +326,14 @@ void IconHelper::setStyle1(QWidget *widget, QList<QAbstractButton *> btns, QList
qss << QString("QWidget>QAbstractButton:checked{background-color:%1;color:%2;}")
.arg(styleColor.checkedBgColor).arg(styleColor.checkedTextColor);
//按钮宽度高度
if (btnWidth > 0) {
qss << QString("QWidget>QAbstractButton{min-width:%1px;}").arg(btnWidth);
}
if (btnHeight > 0) {
qss << QString("QWidget>QAbstractButton{min-height:%1px;}").arg(btnHeight);
}
//设置样式表
widget->setStyleSheet(qss.join(""));

View File

@ -49,6 +49,9 @@ public:
QString position; //位置 left right top bottom
bool defaultBorder; //默认有边框
quint32 btnWidth; //按钮宽度
quint32 btnHeight; //按钮高度
quint32 iconSize; //图标字体尺寸
quint32 iconWidth; //图标图片宽度
quint32 iconHeight; //图标图片高度
@ -69,6 +72,9 @@ public:
position = "left";
defaultBorder = false;
btnWidth = 0;
btnHeight = 0;
iconSize = 12;
iconWidth = 15;
iconHeight = 15;

View File

@ -272,6 +272,8 @@ void IconHelper::setStyle1(QWidget *widget, QList<QAbstractButton *> btns, QList
}
QString position = styleColor.position;
quint32 btnWidth = styleColor.btnWidth;
quint32 btnHeight = styleColor.btnHeight;
quint32 iconSize = styleColor.iconSize;
quint32 iconWidth = styleColor.iconWidth;
quint32 iconHeight = styleColor.iconHeight;
@ -324,6 +326,14 @@ void IconHelper::setStyle1(QWidget *widget, QList<QAbstractButton *> btns, QList
qss << QString("QWidget>QAbstractButton:checked{background-color:%1;color:%2;}")
.arg(styleColor.checkedBgColor).arg(styleColor.checkedTextColor);
//按钮宽度高度
if (btnWidth > 0) {
qss << QString("QWidget>QAbstractButton{min-width:%1px;}").arg(btnWidth);
}
if (btnHeight > 0) {
qss << QString("QWidget>QAbstractButton{min-height:%1px;}").arg(btnHeight);
}
//设置样式表
widget->setStyleSheet(qss.join(""));

View File

@ -49,6 +49,9 @@ public:
QString position; //位置 left right top bottom
bool defaultBorder; //默认有边框
quint32 btnWidth; //按钮宽度
quint32 btnHeight; //按钮高度
quint32 iconSize; //图标字体尺寸
quint32 iconWidth; //图标图片宽度
quint32 iconHeight; //图标图片高度
@ -69,6 +72,9 @@ public:
position = "left";
defaultBorder = false;
btnWidth = 0;
btnHeight = 0;
iconSize = 12;
iconWidth = 15;
iconHeight = 15;

View File

@ -272,6 +272,8 @@ void IconHelper::setStyle1(QWidget *widget, QList<QAbstractButton *> btns, QList
}
QString position = styleColor.position;
quint32 btnWidth = styleColor.btnWidth;
quint32 btnHeight = styleColor.btnHeight;
quint32 iconSize = styleColor.iconSize;
quint32 iconWidth = styleColor.iconWidth;
quint32 iconHeight = styleColor.iconHeight;
@ -324,6 +326,14 @@ void IconHelper::setStyle1(QWidget *widget, QList<QAbstractButton *> btns, QList
qss << QString("QWidget>QAbstractButton:checked{background-color:%1;color:%2;}")
.arg(styleColor.checkedBgColor).arg(styleColor.checkedTextColor);
//按钮宽度高度
if (btnWidth > 0) {
qss << QString("QWidget>QAbstractButton{min-width:%1px;}").arg(btnWidth);
}
if (btnHeight > 0) {
qss << QString("QWidget>QAbstractButton{min-height:%1px;}").arg(btnHeight);
}
//设置样式表
widget->setStyleSheet(qss.join(""));

View File

@ -49,6 +49,9 @@ public:
QString position; //位置 left right top bottom
bool defaultBorder; //默认有边框
quint32 btnWidth; //按钮宽度
quint32 btnHeight; //按钮高度
quint32 iconSize; //图标字体尺寸
quint32 iconWidth; //图标图片宽度
quint32 iconHeight; //图标图片高度
@ -69,6 +72,9 @@ public:
position = "left";
defaultBorder = false;
btnWidth = 0;
btnHeight = 0;
iconSize = 12;
iconWidth = 15;
iconHeight = 15;

BIN
ui/ui.zip Normal file

Binary file not shown.

View File

@ -350,9 +350,9 @@ void VideoBox::change_video_1(int index)
//首先隐藏所有通道
hide_video_all();
//添加通道到布局
gridLayout->addWidget(widgets.at(0), 0, 0);
gridLayout->addWidget(widgets.at(index), 0, 0);
//设置可见
widgets.at(0)->setVisible(true);
widgets.at(index)->setVisible(true);
}
void VideoBox::change_video_2(int index)

View File

@ -350,9 +350,9 @@ void VideoBox::change_video_1(int index)
//首先隐藏所有通道
hide_video_all();
//添加通道到布局
gridLayout->addWidget(widgets.at(0), 0, 0);
gridLayout->addWidget(widgets.at(index), 0, 0);
//设置可见
widgets.at(0)->setVisible(true);
widgets.at(index)->setVisible(true);
}
void VideoBox::change_video_2(int index)