forked from openkylin/ukui-search
Merge branch '0408ukss' into 'ukss-dev'
Bug#114388:Modify the icon of show more label. See merge request kylin-desktop/ukui-search!287
This commit is contained in:
commit
1931b835fe
|
@ -30,13 +30,13 @@ ShowMoreLabel::ShowMoreLabel(QWidget *parent) : QWidget(parent) {
|
|||
|
||||
void ShowMoreLabel::resetLabel() {
|
||||
m_isOpen = false;
|
||||
m_iconLabel->setPixmap(QIcon::fromTheme("pan-down-symbolic", QIcon(":/res/icons/pan-down-symbolic.svg")).pixmap(QSize(16, 16)));
|
||||
m_iconLabel->setPixmap(QIcon::fromTheme("ukui-down-symbolic", QIcon(":/res/icons/ukui-down-symbolic.svg")).pixmap(QSize(16, 16)));
|
||||
}
|
||||
|
||||
void ShowMoreLabel::setLabel()
|
||||
{
|
||||
m_isOpen = true;
|
||||
m_iconLabel->setPixmap(QIcon::fromTheme("pan-up-symbolic", QIcon(":/res/icons/pan-up-symbolic.svg")).pixmap(QSize(16, 16)));
|
||||
m_iconLabel->setPixmap(QIcon::fromTheme("ukui-up-symbolic", QIcon(":/res/icons/ukui-up-symbolic.svg")).pixmap(QSize(16, 16)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,7 +53,7 @@ void ShowMoreLabel::initUi() {
|
|||
m_layout = new QHBoxLayout(this);
|
||||
m_layout->setContentsMargins(0, 0, 0, 6);
|
||||
m_iconLabel = new QLabel(this);
|
||||
m_iconLabel->setPixmap(QIcon::fromTheme("pan-down-symbolic", QIcon(":/res/icons/pan-down-symbolic.svg")).pixmap(QSize(16, 16)));
|
||||
m_iconLabel->setPixmap(QIcon::fromTheme("ukui-down-symbolic", QIcon(":/res/icons/ukui-down-symbolic.svg")).pixmap(QSize(16, 16)));
|
||||
m_iconLabel->setCursor(QCursor(Qt::PointingHandCursor));
|
||||
m_iconLabel->installEventFilter(this);
|
||||
// m_loadingIconLabel = new QLabel(this); //使用图片显示加载状态时,取消此label的注释
|
||||
|
@ -72,11 +72,11 @@ bool ShowMoreLabel::eventFilter(QObject *watched, QEvent *event) {
|
|||
if(event->type() == QEvent::MouseButtonPress) {
|
||||
if(! m_timer->isActive()) {
|
||||
if(!m_isOpen) {
|
||||
m_iconLabel->setPixmap(QIcon::fromTheme("pan-up-symbolic", QIcon(":/res/icons/pan-up-symbolic.svg")).pixmap(QSize(16, 16)));
|
||||
m_iconLabel->setPixmap(QIcon::fromTheme("ukui-up-symbolic", QIcon(":/res/icons/ukui-up-symbolic.svg")).pixmap(QSize(16, 16)));
|
||||
m_isOpen = true;
|
||||
Q_EMIT this->showMoreClicked();
|
||||
} else {
|
||||
m_iconLabel->setPixmap(QIcon::fromTheme("pan-down-symbolic", QIcon(":/res/icons/pan-down-symbolic.svg")).pixmap(QSize(16, 16)));
|
||||
m_iconLabel->setPixmap(QIcon::fromTheme("ukui-down-symbolic", QIcon(":/res/icons/ukui-down-symbolic.svg")).pixmap(QSize(16, 16)));
|
||||
m_isOpen = false;
|
||||
Q_EMIT this->retractClicked();
|
||||
}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m13 6-5 5-5-5z" fill="#2e3436"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 153 B |
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m13 10-5-5-5 5z" fill="#2e3436"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 154 B |
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="图层_2_1_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
||||
y="0px" viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{opacity:0.75;fill:#1F2022;}
|
||||
</style>
|
||||
<path class="st0" d="M8,11c-0.1,0-0.3,0-0.4-0.1l-4-4c-0.2-0.2-0.2-0.5,0-0.7s0.5-0.2,0.7,0L8,9.8l3.6-3.6c0.2-0.2,0.5-0.2,0.7,0
|
||||
s0.2,0.5,0,0.7l-4,4C8.3,11,8.1,11,8,11z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 603 B |
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="图层_15" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{display:none;opacity:0.75;fill:#1F2022;enable-background:new ;}
|
||||
.st1{opacity:0.75;fill:#1F2022;}
|
||||
</style>
|
||||
<path class="st0" d="M13.5,11.5c-0.1,0-0.3-0.1-0.4-0.2L8,5.3l-5.1,6c-0.2,0.2-0.5,0.2-0.7,0.1C2,11.2,2,10.9,2.1,10.7l5.5-6.5
|
||||
C7.8,4,8.2,4,8.4,4.2l5.5,6.5c0.2,0.2,0.2,0.5-0.1,0.7C13.7,11.5,13.6,11.5,13.5,11.5z"/>
|
||||
<path class="st1" d="M12,10c-0.1,0-0.3,0-0.4-0.1L8,6.2L4.4,9.9C4.2,10,3.8,10,3.6,9.9s-0.2-0.5,0-0.7l4-4C7.8,5,8.2,5,8.4,5.1l4,4
|
||||
c0.2,0.2,0.2,0.5,0,0.7C12.3,10,12.1,10,12,10z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 897 B |
|
@ -6,7 +6,7 @@
|
|||
<file>res/qt-translations/qt_zh_CN.qm</file>
|
||||
<file>res/icons/net-disconnected.svg</file>
|
||||
<file>res/icons/system-search.symbolic.png</file>
|
||||
<file>res/icons/pan-up-symbolic.svg</file>
|
||||
<file>res/icons/pan-down-symbolic.svg</file>
|
||||
<file>res/icons/ukui-up-symbolic.svg</file>
|
||||
<file>res/icons/ukui-down-symbolic.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Loading…
Reference in New Issue