按设计稿修改有线无线图标为16*16
This commit is contained in:
parent
3cd17fdb5a
commit
f351c0fe8e
|
@ -48,6 +48,7 @@ const QByteArray GSETTINGS_SCHEMA = "org.ukui.kylin-nm.switch";
|
|||
#define TOP_MARGINS 0,8,0,0
|
||||
#define MAIN_LAYOUT_MARGINS 0,0,0,8
|
||||
#define SPACING 8
|
||||
#define ICON_SIZE 16,16
|
||||
|
||||
bool sortByVal(const QPair<QString, int> &l, const QPair<QString, int> &r) {
|
||||
return (l.second < r.second);
|
||||
|
@ -431,7 +432,7 @@ void NetConnect::addLanItem(ItemFrame *frame, QString devName, QStringList infoL
|
|||
// if (iconPath != KLanSymbolic && iconPath != NoNetSymbolic) {
|
||||
// lanItem->iconLabel->setProperty("useIconHighlightEffect", 0x10);
|
||||
// }
|
||||
lanItem->iconLabel->setPixmap(searchIcon.pixmap(searchIcon.actualSize(QSize(24, 24))));
|
||||
lanItem->iconLabel->setPixmap(searchIcon.pixmap(searchIcon.actualSize(QSize(ICON_SIZE))));
|
||||
lanItem->titileLabel->setText(infoList.at(0));
|
||||
|
||||
lanItem->uuid = infoList.at(1);
|
||||
|
@ -700,7 +701,7 @@ void NetConnect::addOneLanFrame(ItemFrame *frame, QString deviceName, QStringLis
|
|||
// if (iconPath != KLanSymbolic && iconPath != NoNetSymbolic) {
|
||||
// lanItem->iconLabel->setProperty("useIconHighlightEffect", 0x10);
|
||||
// }
|
||||
lanItem->iconLabel->setPixmap(searchIcon.pixmap(searchIcon.actualSize(QSize(24, 24))));
|
||||
lanItem->iconLabel->setPixmap(searchIcon.pixmap(searchIcon.actualSize(QSize(ICON_SIZE))));
|
||||
lanItem->titileLabel->setText(connName);
|
||||
|
||||
lanItem->uuid = connUuid;
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#define SIGNAL_OK 3
|
||||
#define SIGNAL_LOW 4
|
||||
#define SIGNAL_NONE 5
|
||||
#define ICON_SIZE 16,16
|
||||
|
||||
const QString WIRELESS_SWITCH = "wirelessswitch";
|
||||
const QByteArray GSETTINGS_SCHEMA = "org.ukui.kylin-nm.switch";
|
||||
|
@ -440,7 +441,7 @@ void WlanConnect::updateIcon(WlanItem *item, QString signalStrength, QString sec
|
|||
if (iconamePath != KLanSymbolic && iconamePath != NoNetSymbolic) {
|
||||
item->iconLabel->setProperty("useIconHighlightEffect", 0x10);
|
||||
}
|
||||
item->iconLabel->setPixmap(searchIcon.pixmap(searchIcon.actualSize(QSize(24, 24))));
|
||||
item->iconLabel->setPixmap(searchIcon.pixmap(searchIcon.actualSize(QSize(ICON_SIZE))));
|
||||
qDebug() << "updateIcon" << item->titileLabel->text() << " finish";
|
||||
}
|
||||
|
||||
|
@ -1006,7 +1007,7 @@ void WlanConnect::addOneWlanFrame(ItemFrame *frame, QString deviceName, QString
|
|||
wlanItem->iconLabel->setProperty("useIconHighlightEffect", 0x10);
|
||||
}
|
||||
QIcon searchIcon = QIcon::fromTheme(iconamePath);
|
||||
wlanItem->iconLabel->setPixmap(searchIcon.pixmap(searchIcon.actualSize(QSize(24, 24))));
|
||||
wlanItem->iconLabel->setPixmap(searchIcon.pixmap(searchIcon.actualSize(QSize(ICON_SIZE))));
|
||||
wlanItem->titileLabel->setText(name);
|
||||
if (status) {
|
||||
wlanItem->statusLabel->setText(tr("connected"));
|
||||
|
|
|
@ -166,7 +166,8 @@ void MainWindow::initWindowProperties()
|
|||
|
||||
QPainterPath path;
|
||||
auto rect = this->rect();
|
||||
path.addRoundedRect(rect, 12, 12);
|
||||
// path.addRoundedRect(rect, 12, 12);
|
||||
path.addRect(rect);
|
||||
KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); //背景模糊
|
||||
}
|
||||
|
||||
|
@ -175,8 +176,8 @@ void MainWindow::paintEvent(QPaintEvent *event)
|
|||
QPainter painter(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing); // 反锯齿;
|
||||
painter.setPen(Qt::transparent);
|
||||
auto rect = this->rect();
|
||||
painter.drawRoundedRect(rect, 12, 12); //窗口圆角
|
||||
// auto rect = this->rect();
|
||||
// painter.drawRoundedRect(rect, 12, 12); //窗口圆角
|
||||
}
|
||||
|
||||
void MainWindow::initTransparency()
|
||||
|
|
Loading…
Reference in New Issue