修改OpenKylin下UI问题,增加最近收藏页焦点打开方式
This commit is contained in:
parent
beb6f0dd85
commit
f9322dfeb1
|
@ -1,142 +0,0 @@
|
|||
ukui-menu (3.1.1-ok4~1124) v101; urgency=medium
|
||||
|
||||
* close-cd #I5RF2N 开始菜单展开后没有置顶,也没有全屏
|
||||
* 增加了列表应用拖拽固定到任务栏功能(需要任务栏同步更新)
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Thu, 24 Nov 2022 09:29:48 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~1104) yangtze; urgency=medium
|
||||
|
||||
*close-cd I5XN4B 【开始菜单】重启后点击开始菜单电源按钮,会话管理器界面自动弹出开始菜单,关闭开始菜单后不再自动弹出
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Fri, 04 Nov 2022 16:45:18 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~1101) yangtze; urgency=medium
|
||||
|
||||
* close-cd #146246 【开始菜单】开始菜单icon模糊
|
||||
|
||||
-- zhangtianze <zhangtianze@kylinos.cn> Tue, 01 Nov 2022 15:27:05 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~1024) yangtze; urgency=medium
|
||||
|
||||
* close-cd #I5SPVS 移动面板后使用win键打开菜单栏位置不对
|
||||
* close-cd #I5RF2N 开始菜单展开后没有置顶,也没有全屏
|
||||
* close-cd #I5R2AO 开始菜单放大后应用图标缺失、电源按钮被任务栏挡住,且有小概率未正确全屏
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Mon, 24 Oct 2022 17:10:56 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~1020) yangtze; urgency=medium
|
||||
|
||||
* close-cd #129225【开始菜单】【PC】在列表顶部或底部继续触摸拖动概率性出现图标缺失情况,再次滑动显示正常(1/10)
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Thu, 20 Oct 2022 09:11:06 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~1012) yangtze; urgency=medium
|
||||
|
||||
* close-cd #116176 【设计】【开始菜单】【浅色模式】底板缺少描边及阴影
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Wed, 12 Oct 2022 11:14:50 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0920) yangtze; urgency=medium
|
||||
|
||||
* 任务:开始菜单工具提示内容优化(收藏&最近 区域),增加路径提示
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Tue, 20 Sep 2022 09:04:27 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0913) yangtze; urgency=medium
|
||||
|
||||
* close-cd #125158 【开始菜单】切换全屏时动画显示不太流畅
|
||||
* close-cd #133399 【开始菜单】【PC】只有一个用户,开始菜单右键电源按钮存在切换用户选项
|
||||
* 添加版权信息
|
||||
* 修改规范性问题
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Tue, 13 Sep 2022 08:40:10 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0907) yangtze; urgency=medium
|
||||
|
||||
* close-cd #125158 【开始菜单】切换全屏时动画显示不太流畅
|
||||
* close-cd #133399 【开始菜单】【PC】只有一个用户,开始菜单右键电源按钮存在切换用户选项
|
||||
* 添加版权信息
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Wed, 07 Sep 2022 14:12:53 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0831) yangtze; urgency=medium
|
||||
|
||||
* close-cd # 131373 【wayland】【软件更新器】点击打开软件更新器后,开始菜单过6s左右才退出;
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Wed, 31 Aug 2022 00:52:08 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0818) yangtze; urgency=medium
|
||||
|
||||
* close-cd #125159 修改全屏下固定到收藏不生效问题
|
||||
* close-cd #130911 【开始菜单】【PC】最大化后无法上下滑动翻页
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Thu, 18 Aug 2022 11:19:35 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0727) yangtze; urgency=medium
|
||||
|
||||
* 增加开始菜单藏文翻译
|
||||
* 调整点击应用时窗口隐藏时机
|
||||
* 修改分类下拉选择框宽度
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Wed, 27 Jul 2022 20:32:11 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0725) yangtze; urgency=medium
|
||||
|
||||
* 解决平板模式下win键可以打开开始菜单问题
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Mon, 25 Jul 2022 09:15:22 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0721.1) yangtze; urgency=medium
|
||||
|
||||
* 解决了强调色修改后,搜索框未及时刷新问题
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Thu, 21 Jul 2022 15:34:09 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0721) yangtze; urgency=medium
|
||||
|
||||
* close-cd #130526 修改搜索框和收藏最近按钮高亮色
|
||||
* close-cd #130514 全屏菜单的滑块透明度修改
|
||||
* close-cd #130485 修改字母集导航页禁用按钮样式
|
||||
* close-cd #130477 修改功能集导航页禁用按钮样式
|
||||
|
||||
-- kylin <kylin@kylin-tianyi510pro-14imb> Thu, 21 Jul 2022 13:51:42 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0718) yangtze; urgency=medium
|
||||
|
||||
* close-cd #127740 修复wayland下默认全屏切换动画位置异常,不显示动画
|
||||
* close-cd #129213 解决开始菜单点击屏幕键盘后延迟退出问题
|
||||
* close-cd #128764 增加搜索按下键切换焦点至搜索结果页;全屏增加字符输入直接切换搜索框
|
||||
* close-cd #128492,解决字母和功能分类固定到所有软件未置顶问题
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Mon, 18 Jul 2022 15:09:23 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0712) yangtze; urgency=medium
|
||||
|
||||
* close-cd #128498
|
||||
修复【wayland】【开始菜单】多次点击tab键和回车键后,开始菜单点不开问题
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Tue, 12 Jul 2022 16:11:49 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0708) yangtze; urgency=medium
|
||||
|
||||
* 调整全屏窗口初始化代码结构
|
||||
* 增加全屏开始菜单分类选择下拉按钮动画效果
|
||||
* 增加全屏开始菜单点击空白区域退出功能
|
||||
* 固定全屏电源右键菜单位置
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Fri, 08 Jul 2022 11:25:23 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok4~0623) yangtze; urgency=medium
|
||||
|
||||
* 调整QGuiApplication::platformName()调用时机
|
||||
* 增加全屏窗口显示时位置设定
|
||||
* 合入app-manager接口
|
||||
|
||||
-- lixueman <lixueman@kylinos.cn> Wed, 22 Jun 2022 11:22:58 +0800
|
||||
|
||||
ukui-menu (3.1.1-ok1) yangtze; urgency=medium
|
||||
|
||||
* 版本号规范化
|
||||
|
||||
-- Xie Wei <xiewei@kylinos.cn> Fri, 06 May 2022 17:54:45 +0800:
|
|
@ -1,44 +0,0 @@
|
|||
Source: ukui-menu
|
||||
Section: x11
|
||||
Priority: optional
|
||||
Maintainer: Kylin Team <team+kylin@tracker.debian.org>
|
||||
Uploaders: Aron Xu <aron@debian.org>,
|
||||
handsome_feng <jianfengli@ubuntukylin.com>
|
||||
Build-Depends: debhelper-compat (=12),
|
||||
qtbase5-dev,
|
||||
libqt5svg5-dev,
|
||||
libqt5x11extras5-dev,
|
||||
libglib2.0-dev (>= 2.36),
|
||||
libgsettings-qt-dev,
|
||||
qttools5-dev-tools,
|
||||
libbamf3-dev,
|
||||
libkf5windowsystem-dev,
|
||||
libuchardet-dev,
|
||||
libukui-log4qt-dev,
|
||||
libxtst-dev,
|
||||
libx11-dev,
|
||||
libukui-common0,
|
||||
libukui-common-dev,
|
||||
libpeony-dev,
|
||||
libkysdk-waylandhelper-dev
|
||||
Standards-Version: 4.5.0
|
||||
Rules-Requires-Root: no
|
||||
Homepage: https://github.com/ukui/ukui-menu
|
||||
Vcs-Git: https://github.com/ukui/ukui-menu
|
||||
Vcs-Browser: https://github.com/ukui/ukui-menu
|
||||
|
||||
Package: ukui-menu
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
accountsservice,
|
||||
libgsettings-qt1,
|
||||
libqt5x11extras5,
|
||||
bamfdaemon,
|
||||
libkysdk-waylandhelper
|
||||
Suggests:kylin-status-manager
|
||||
Description: Advanced ukui menu
|
||||
UKUI menu provides start menu development library and advanced
|
||||
graphical user interface.
|
||||
.
|
||||
The package contains executable file.
|
|
@ -1,29 +0,0 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: ukui-menu
|
||||
Upstream-Contact: liuhao <liuhao@kylinos.cn>
|
||||
Source: https://github.com/ukui/ukui-menu
|
||||
|
||||
Files: *
|
||||
Copyright: 2019 Tianjin KYLIN Information Technology Co., Ltd.
|
||||
License: GPL-3.0+
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2019 liuhao <liuhao@kylinos.cn>
|
||||
License: GPL-3.0+
|
||||
|
||||
License: GPL-3.0+
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This package is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
|
@ -1,7 +0,0 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
export QT_SELECT := qt5
|
||||
|
||||
%:
|
||||
dh $@
|
|
@ -1 +0,0 @@
|
|||
3.0 (native)
|
|
@ -1,2 +0,0 @@
|
|||
version=4
|
||||
https://github.com/ukui/ukui-menu/releases .*/ukui-menu_(\d\S+)\.orig\.tar\.gz
|
|
@ -0,0 +1,104 @@
|
|||
#include "push_button.h"
|
||||
|
||||
PushButton::PushButton(QWidget *parent) : QPushButton(parent)
|
||||
{
|
||||
m_btnLayout = new QHBoxLayout(this);
|
||||
this->setLayout(m_btnLayout);
|
||||
m_label = new IconLabel(this);
|
||||
m_btnLayout->addWidget(m_label);
|
||||
|
||||
m_label->setAlignment(Qt::AlignCenter);
|
||||
m_btnLayout->setAlignment(Qt::AlignCenter);
|
||||
}
|
||||
|
||||
void PushButton::setLabel(QPixmap pixmap, int size)
|
||||
{
|
||||
m_label->setFixedSize(size, size);
|
||||
m_label->setIcon(pixmap);
|
||||
}
|
||||
|
||||
PushButton::~PushButton()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void PushButton::paintEvent(QPaintEvent *e)
|
||||
{
|
||||
Q_UNUSED(e);
|
||||
QStylePainter painter(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
QStyleOptionButton option;
|
||||
initStyleOption(&option);
|
||||
|
||||
if (option.state & QStyle::State_Sunken) {
|
||||
painter.save();
|
||||
painter.setPen(Qt::NoPen);
|
||||
painter.setBrush(Qt::white);
|
||||
if (g_curStyle == "ukui-dark" || g_isFullScreen) {
|
||||
painter.setOpacity(0.25);
|
||||
} else {
|
||||
painter.setOpacity(0.65);
|
||||
}
|
||||
|
||||
painter.drawRoundedRect(option.rect.adjusted(1, 1, -1, -1), 6, 6);
|
||||
painter.restore();
|
||||
}
|
||||
|
||||
if (option.state & QStyle::State_MouseOver) {
|
||||
painter.save();
|
||||
painter.setPen(Qt::NoPen);
|
||||
painter.setBrush(Qt::white);
|
||||
if (g_curStyle == "ukui-dark" || g_isFullScreen) {
|
||||
painter.setOpacity(0.1);
|
||||
} else {
|
||||
painter.setOpacity(0.35);
|
||||
}
|
||||
|
||||
painter.drawRoundedRect(option.rect.adjusted(1, 1, -1, -1), 6, 6);
|
||||
painter.restore();
|
||||
}
|
||||
|
||||
if (option.state & QStyle::State_On) {
|
||||
painter.save();
|
||||
painter.setPen(Qt::NoPen);
|
||||
painter.setBrush(Qt::white);
|
||||
if (g_curStyle == "ukui-dark" || g_isFullScreen) {
|
||||
painter.setOpacity(0.2);
|
||||
} else {
|
||||
painter.setOpacity(0.5);
|
||||
}
|
||||
|
||||
painter.drawRoundedRect(option.rect.adjusted(1, 1, -1, -1), 6, 6);
|
||||
painter.restore();
|
||||
}
|
||||
|
||||
if (option.state & QStyle::State_HasFocus) {
|
||||
painter.save();
|
||||
QStyleOption opt;
|
||||
QColor color = opt.palette.color(QPalette::Highlight);
|
||||
painter.setPen(QPen(color, 2));
|
||||
painter.drawRoundedRect(option.rect.adjusted(1, 1, -1, -1), 6, 6);
|
||||
painter.restore();
|
||||
}
|
||||
}
|
||||
|
||||
IconLabel::IconLabel(QWidget *parent)
|
||||
: QLabel(parent)
|
||||
{
|
||||
this->setContentsMargins(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
void IconLabel::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
painter.setRenderHints(QPainter::SmoothPixmapTransform, true);
|
||||
painter.drawPixmap(0, 0, m_pixmap);
|
||||
return QLabel::paintEvent(event);
|
||||
}
|
||||
|
||||
void IconLabel::setIcon(const QPixmap &pixmap)
|
||||
{
|
||||
m_pixmap = pixmap;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef PUSHBUTTON_H
|
||||
#define PUSHBUTTON_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QStylePainter>
|
||||
#include <QStyleOption>
|
||||
#include <QHBoxLayout>
|
||||
#include "utility.h"
|
||||
|
||||
class IconLabel : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
IconLabel(QWidget *parent = nullptr);
|
||||
void setIcon(const QPixmap &pixmap);
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
private:
|
||||
QPixmap m_pixmap;
|
||||
};
|
||||
|
||||
class PushButton : public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit PushButton(QWidget *parent = nullptr);
|
||||
~PushButton();
|
||||
|
||||
void setLabel(QPixmap pixmap, int size);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
|
||||
private:
|
||||
QHBoxLayout *m_btnLayout = nullptr;
|
||||
IconLabel *m_label = nullptr;
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
};
|
||||
#endif // PUSHBUTTON_H
|
|
@ -0,0 +1,34 @@
|
|||
#include "textlabel.h"
|
||||
#include <QDebug>
|
||||
|
||||
TextLabel::TextLabel(QWidget *parent) : QLabel(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void TextLabel::checkState(bool isChecked)
|
||||
{
|
||||
m_isChecked = isChecked;
|
||||
}
|
||||
|
||||
void TextLabel::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
if (m_isChecked) {
|
||||
return QLabel::paintEvent(event);
|
||||
}
|
||||
|
||||
QStylePainter painter(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
QStyleOptionFrame option;
|
||||
initStyleOption(&option);
|
||||
|
||||
if (option.state & QStyle::State_HasFocus) {
|
||||
painter.save();
|
||||
QStyleOption opt;
|
||||
QColor color = opt.palette.color(QPalette::Highlight);
|
||||
painter.setPen(QPen(color, 2));
|
||||
painter.drawRoundedRect(option.rect.adjusted(1, 1, -1, -1), 6, 6);
|
||||
painter.restore();
|
||||
}
|
||||
QLabel::paintEvent(event);
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef TEXTLABEL_H
|
||||
#define TEXTLABEL_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QLabel>
|
||||
#include <QPaintEvent>
|
||||
#include <QStylePainter>
|
||||
#include <QStyleOption>
|
||||
|
||||
class TextLabel : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TextLabel(QWidget *parent = nullptr);
|
||||
|
||||
void checkState(bool isChecked);
|
||||
|
||||
private:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
bool m_isChecked = false;
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
};
|
||||
|
||||
#endif // TEXTLABEL_H
|
|
@ -74,9 +74,9 @@ FunctionWidget::FunctionWidget(QWidget *parent): QWidget(parent)
|
|||
|
||||
FunctionWidget::~FunctionWidget()
|
||||
{
|
||||
if (themeSetting) {
|
||||
delete themeSetting;
|
||||
}
|
||||
// if (themeSetting) {
|
||||
// delete themeSetting;
|
||||
// }
|
||||
|
||||
if (myTimer) {
|
||||
delete myTimer;
|
||||
|
@ -146,7 +146,7 @@ FunctionWidget::~FunctionWidget()
|
|||
delete effect;
|
||||
}
|
||||
|
||||
themeSetting = nullptr;
|
||||
// themeSetting = nullptr;
|
||||
myTimer = nullptr;
|
||||
upWidget = nullptr;
|
||||
upLayout = nullptr;
|
||||
|
|
|
@ -47,7 +47,7 @@ protected:
|
|||
|
||||
private:
|
||||
CurrentTimeInterface *Time = nullptr;
|
||||
QGSettings *themeSetting = nullptr;
|
||||
// QGSettings *themeSetting = nullptr;
|
||||
QGSettings *timeSetting = nullptr;
|
||||
QString themeName;
|
||||
QObject *plugin = nullptr;
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PUSHBUTTON_H
|
||||
#define PUSHBUTTON_H
|
||||
#ifndef SPLITBARFRAME_H
|
||||
#define SPLITBARFRAME_H
|
||||
#include <QPushButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
|
@ -51,4 +51,4 @@ protected:
|
|||
void paintEvent(QPaintEvent *event);
|
||||
};
|
||||
|
||||
#endif // PUSHBUTTON_H
|
||||
#endif // SPLITBARFRAME
|
||||
|
|
|
@ -82,11 +82,11 @@ void FullMainWindow::initButtonUI()
|
|||
m_fullSelectMenuButton->setFixedSize(QSize(16, 34));
|
||||
m_fullSelectMenuButton->setAcceptDrops(true);
|
||||
m_fullSelectMenuButton->setFocusPolicy(Qt::StrongFocus);
|
||||
m_fullSelectMenuButton->setIcon(QPixmap(":/data/img/mainviewwidget/DM-arrow-2x.png"));
|
||||
m_fullSelectMenuButton->setIcon(getCurPixmap(":/data/img/mainviewwidget/DM-arrow-2x.png", false, 16));
|
||||
QPalette palete;
|
||||
palete.setColor(QPalette::NoRole, Qt::white);
|
||||
m_fullSelectMenuButton->setPalette(palete);
|
||||
m_minPushButton = new QPushButton(centralwidget);
|
||||
m_minPushButton = new PushButton(centralwidget);
|
||||
m_minPushButton->setObjectName(QString::fromUtf8("minPushButton"));
|
||||
m_minPushButton->setFixedSize(QSize(48, 48));
|
||||
m_minPushButton->setFlat(true);
|
||||
|
@ -288,9 +288,10 @@ void FullMainWindow::changeStyle()
|
|||
"%1:hover {border-radius:24px; background:" + buttonColorHover + ";}"
|
||||
"%1:pressed {border-radius:24px; background:" + buttonColorPress + ";}");
|
||||
m_fullSelectToolButton->setStyleSheet(m_buttonStyle.arg("QPushButton"));
|
||||
m_fullSelectMenuButton->setIcon(QPixmap(":/data/img/mainviewwidget/DM-arrow-2x.png"));
|
||||
m_minPushButton->setIcon(getCurIcon(":/data/img/mainviewwidget/full-min.svg", false));
|
||||
m_minPushButton->setProperty("useIconHighlightEffect", 0x0);
|
||||
|
||||
QPixmap pixmap = loadSvg(QString(":/data/img/mainviewwidget/full-min.svg"), 25);
|
||||
m_minPushButton->setLabel(pixmap, 25);
|
||||
// m_minPushButton->setProperty("useIconHighlightEffect", 0x0);
|
||||
}
|
||||
|
||||
void FullMainWindow::on_minPushButton_clicked()
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "searchappthread.h"
|
||||
#include "full_searchresult_widget.h"
|
||||
#include "rotationlabel.h"
|
||||
#include "push_button.h"
|
||||
|
||||
class FullMainWindow : public QMainWindow
|
||||
{
|
||||
|
@ -99,7 +100,7 @@ private:
|
|||
QSpacerItem *horizontalSpacer_2;
|
||||
QPushButton *m_fullSelectToolButton;
|
||||
RotationLabel *m_fullSelectMenuButton;
|
||||
QPushButton *m_minPushButton;
|
||||
PushButton *m_minPushButton;
|
||||
QStackedWidget *m_fullStackedWidget;
|
||||
|
||||
FullCommonUseWidget *m_fullCommonPage;
|
||||
|
|
|
@ -165,16 +165,16 @@ void MainWindow::registDbusServer()
|
|||
m_topStackedWidget->setCurrentIndex(0);
|
||||
m_lineEdit->clear();
|
||||
this->clearFocus();
|
||||
m_isFullScreen = false;
|
||||
g_isFullScreen = false;
|
||||
} else if (m_fullWindow->isVisible())
|
||||
{
|
||||
m_fullWindow->hide();
|
||||
m_fullWindow->clearFocus();
|
||||
m_fullWindow->resetEditline();
|
||||
m_isFullScreen = true;
|
||||
g_isFullScreen = true;
|
||||
} else
|
||||
{
|
||||
if (!m_isFullScreen) {
|
||||
if (!g_isFullScreen) {
|
||||
this->show();
|
||||
setMinWindowPos();
|
||||
this->raise();
|
||||
|
@ -384,24 +384,25 @@ void MainWindow::initRightWidgetButton()
|
|||
m_mainRightVerticalLayout_1 = new QVBoxLayout();
|
||||
m_rightTopHorizontalLayout = new QHBoxLayout();
|
||||
m_rightTopHorizontalLayout->setSpacing(30);
|
||||
m_rightTopHorizontalLayout->setContentsMargins(8, 0, 10, 0);
|
||||
m_rightTopHorizontalLayout->setContentsMargins(8, 0, 6, 0);
|
||||
//收藏按键
|
||||
m_collectPushButton = new QLabel(m_centralwidget);
|
||||
m_collectPushButton = new TextLabel(m_centralwidget);
|
||||
m_collectPushButton->setFocusPolicy(Qt::StrongFocus);
|
||||
m_collectPushButton->setFixedHeight(34);
|
||||
// m_collectPushButton->setFlat(true);
|
||||
m_collectPushButton->installEventFilter(this);
|
||||
//最近按键
|
||||
m_recentPushButton = new QLabel(m_centralwidget);
|
||||
m_recentPushButton = new TextLabel(m_centralwidget);
|
||||
m_recentPushButton->setFixedHeight(34);
|
||||
m_recentPushButton->setFocusPolicy(Qt::StrongFocus);
|
||||
// m_recentPushButton->setFlat(true);
|
||||
m_recentPushButton->installEventFilter(this);
|
||||
m_horizontalSpacer_3 = new QSpacerItem(332, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
//放大缩小按键
|
||||
m_minMaxChangeButton = new QPushButton(m_centralwidget);
|
||||
m_minMaxChangeButton->setFixedSize(QSize(24, 24));
|
||||
m_minMaxChangeButton->setIcon(getCurIcon(":/data/img/mainviewwidget/DM-max.svg", true));
|
||||
m_minMaxChangeButton = new PushButton(m_centralwidget);
|
||||
m_minMaxChangeButton->setFixedSize(QSize(34, 34));
|
||||
QPixmap pixmap = getCurPixmap(":/data/img/mainviewwidget/DM-max.svg",true, 16);
|
||||
m_minMaxChangeButton->setLabel(pixmap, 16);
|
||||
m_minMaxChangeButton->setFlat(true);
|
||||
m_rightTopHorizontalLayout->addWidget(m_collectPushButton);
|
||||
m_rightTopHorizontalLayout->addWidget(m_recentPushButton);
|
||||
|
@ -638,6 +639,9 @@ void MainWindow::changeStyle()
|
|||
}
|
||||
}
|
||||
|
||||
QPixmap pixmap = getCurPixmap(":/data/img/mainviewwidget/DM-max.svg",true, 16);
|
||||
m_minMaxChangeButton->setLabel(pixmap, 16);
|
||||
|
||||
m_buttonStyle = QString("%1{border-radius:13px; background:" + buttonColorDefault + ";}"
|
||||
"%1:hover {border-radius:13px; background:" + buttonColorHover + ";}"
|
||||
"%1:pressed {border-radius:13px; background:" + buttonColorPress + ";}");
|
||||
|
@ -745,6 +749,14 @@ bool MainWindow::event(QEvent *event)
|
|||
QApplication::postEvent(m_selectMenuButton, new QEvent(QEvent::MouseButtonPress));
|
||||
}
|
||||
|
||||
if (m_collectPushButton->hasFocus()) {
|
||||
on_collectPushButton_clicked();
|
||||
}
|
||||
|
||||
if (m_recentPushButton->hasFocus()) {
|
||||
on_recentPushButton_clicked();
|
||||
}
|
||||
|
||||
if (m_lineEdit->hasFocus()) {
|
||||
m_minSearchResultListView->setFocus();
|
||||
} else {
|
||||
|
@ -1231,6 +1243,8 @@ void MainWindow::databaseThreadCloseSlot()
|
|||
|
||||
void MainWindow::on_collectPushButton_clicked()
|
||||
{
|
||||
m_recentPushButton->checkState(false);
|
||||
m_collectPushButton->checkState(true);
|
||||
m_rightStackedWidget->setCurrentIndex(0);
|
||||
|
||||
QString textColorHightLight = QString::number(this->palette().color(QPalette::Highlight).rgba(), 16).mid(2, 6);
|
||||
|
@ -1245,6 +1259,8 @@ void MainWindow::on_collectPushButton_clicked()
|
|||
|
||||
void MainWindow::on_recentPushButton_clicked()
|
||||
{
|
||||
m_collectPushButton->checkState(false);
|
||||
m_recentPushButton->checkState(true);
|
||||
m_rightStackedWidget->setCurrentIndex(1);
|
||||
QString textColorDefault = QString::number(this->palette().color(QPalette::Text).rgba(), 16).mid(2, 6);
|
||||
m_collectPushButton->setStyleSheet(QString("color:#%1").arg(textColorDefault));
|
||||
|
@ -1270,7 +1286,7 @@ void MainWindow::on_searchPushButton_clicked()
|
|||
void MainWindow::on_minMaxChangeButton_clicked()
|
||||
{
|
||||
m_canHide = true;
|
||||
m_isFullScreen = true;
|
||||
g_isFullScreen = true;
|
||||
QPropertyAnimation *m_maxAnimation = new QPropertyAnimation(m_animationPage, "geometry", this);
|
||||
connect(m_maxAnimation, &QPropertyAnimation::finished, this, &MainWindow::maxAnimationFinished);
|
||||
|
||||
|
@ -1300,7 +1316,7 @@ void MainWindow::showWindow()
|
|||
{
|
||||
Style::initWidStyle();
|
||||
myDebug() << "调用开始菜单显示";
|
||||
if (m_isFullScreen) {
|
||||
if (g_isFullScreen) {
|
||||
m_fullWindow->show();
|
||||
setMaxWindowPos();
|
||||
m_fullWindow->raise();
|
||||
|
@ -1322,13 +1338,13 @@ void MainWindow::hideWindow()
|
|||
m_fullWindow->hide();
|
||||
m_fullWindow->resetEditline();
|
||||
this->clearFocus();
|
||||
m_isFullScreen = true;
|
||||
g_isFullScreen = true;
|
||||
} else {
|
||||
this->hide();
|
||||
m_topStackedWidget->setCurrentIndex(0);
|
||||
m_lineEdit->clear();
|
||||
this->clearFocus();
|
||||
m_isFullScreen = false;
|
||||
g_isFullScreen = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1415,7 +1431,7 @@ void MainWindow::showNormalWindowSlot()
|
|||
QEventLoop loop;
|
||||
QTimer::singleShot(100, &loop, SLOT(quit()));
|
||||
loop.exec();
|
||||
m_isFullScreen = false;
|
||||
g_isFullScreen = false;
|
||||
m_minAnimation->setEasingCurve(QEasingCurve::OutExpo);
|
||||
m_minAnimation->setStartValue(QRect(0, 0, Style::m_availableScreenWidth, Style::m_availableScreenHeight));
|
||||
m_minAnimation->setEndValue(QRect(this->x() + 5, this->y() + 5, Style::m_minw - 10, Style::m_minh - 10));
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
#include "animationpage.h"
|
||||
#include "rotationlabel.h"
|
||||
#include "rightlistview.h"
|
||||
#include "push_button.h"
|
||||
#include "textlabel.h"
|
||||
#include "ukuistylehelper/ukuistylehelper.h"
|
||||
#include "windowmanager/windowmanager.h"
|
||||
|
||||
|
@ -200,10 +202,10 @@ private:
|
|||
QHBoxLayout *m_rightTopHorizontalLayout = nullptr;
|
||||
QVBoxLayout *m_rightCollectLayout = nullptr;
|
||||
QVBoxLayout *m_rightRecentLayout = nullptr;
|
||||
QLabel *m_collectPushButton = nullptr;
|
||||
QLabel *m_recentPushButton = nullptr;
|
||||
TextLabel *m_collectPushButton = nullptr;
|
||||
TextLabel *m_recentPushButton = nullptr;
|
||||
QSpacerItem *m_horizontalSpacer_3 = nullptr;
|
||||
QPushButton *m_minMaxChangeButton = nullptr;
|
||||
PushButton *m_minMaxChangeButton = nullptr;
|
||||
QSpacerItem *m_verticalSpacer = nullptr;
|
||||
QStackedWidget *m_rightStackedWidget = nullptr;
|
||||
QWidget *m_collectPage = nullptr;
|
||||
|
@ -220,7 +222,6 @@ private:
|
|||
MenuBox *m_dropDownMenu = nullptr;
|
||||
|
||||
bool m_canHide = true;
|
||||
bool m_isFullScreen = false;
|
||||
QString m_buttonStyle;
|
||||
UkuiMenuInterface *m_ukuiMenuInterface = nullptr;
|
||||
QPropertyAnimation *m_animation = nullptr;
|
||||
|
|
|
@ -11,6 +11,8 @@ HEADERS += \
|
|||
$$PWD/Button/function_classify_button.h \
|
||||
$$PWD/Button/letter_classify_button.h \
|
||||
$$PWD/Button/tool_button.h \
|
||||
$$PWD/Button/push_button.h \
|
||||
$$PWD/Button/textlabel.h\
|
||||
$$PWD/ListView/fulllistview.h \
|
||||
$$PWD/ListView/klistview.h \
|
||||
$$PWD/ListView/listview.h \
|
||||
|
@ -48,6 +50,8 @@ SOURCES += \
|
|||
$$PWD/Button/function_classify_button.cpp \
|
||||
$$PWD/Button/letter_classify_button.cpp \
|
||||
$$PWD/Button/tool_button.cpp \
|
||||
$$PWD/Button/push_button.cpp \
|
||||
$$PWD/Button/textlabel.cpp\
|
||||
$$PWD/ListView/fulllistview.cpp \
|
||||
$$PWD/ListView/klistview.cpp \
|
||||
$$PWD/ListView/listview.cpp \
|
||||
|
|
|
@ -40,16 +40,16 @@
|
|||
#define RightClickMenuOpacity 0.95
|
||||
#define ToolTipBackground "rgba(26, 26, 26, 0.7)"
|
||||
#define DefaultBackground "rgba(19, 19, 20, 0.7)" //默认态背景色
|
||||
#define LineBackground "rgba(255,255,255)" //分割线背景色
|
||||
#define LineBackground "rgba(255, 255, 255)" //分割线背景色
|
||||
#define SBClassifyBtnSelectedBackground "#3D6BE5" //侧边栏上部分类按钮选择背景
|
||||
#define SBFunBtnHoverBackground "rgba(255, 255, 255, 0.14)" //侧边栏目下部功能按钮悬浮背景
|
||||
#define ClassifyBtnHoverBackground "rgba(255, 255, 255, 0.14)" //分类按钮悬浮背景
|
||||
#define MMBtnHoverBackground "rgba(255, 255, 255, 0.14)" //最大化最小化按钮悬浮背景
|
||||
#define QueryLineEditDefaultBackground "rgba(0, 0, 0,0.04)" //搜索框默认态背景
|
||||
#define QueryLineEditBackground "rgba(255, 255, 255,0.06)" //搜索框背景
|
||||
#define QueryLineEditClickedDefaultBackground "rgba(0, 0, 0,0.04)" //搜索框默认态背景选中
|
||||
#define QueryLineEditClickedBackground "rgba(255, 255, 255,0.06)" //搜索框背景选中
|
||||
#define QueryLineEditClickedBorderDefault "rgba(0, 0, 0,0.1)" //搜索框默认态背景选中边框
|
||||
#define QueryLineEditDefaultBackground "rgba(0, 0, 0, 0.04)" //搜索框默认态背景
|
||||
#define QueryLineEditBackground "rgba(255, 255, 255, 0.06)" //搜索框背景
|
||||
#define QueryLineEditClickedDefaultBackground "rgba(0, 0, 0, 0.04)" //搜索框默认态背景选中
|
||||
#define QueryLineEditClickedBackground "rgba(255, 255, 255, 0.06)" //搜索框背景选中
|
||||
#define QueryLineEditClickedBorderDefault "rgba(255, 255, 255, 0.25)" //搜索框默认态背景选中边框
|
||||
#define QueryLineEditClickedBorder "rgba(5, 151, 255, 1)" //搜索框背景选中边框
|
||||
#define AppBtnHover "#ffffff" //按钮悬浮
|
||||
|
||||
|
|
|
@ -34,8 +34,9 @@
|
|||
QString g_projectCodeName = "V10SP1";
|
||||
QString g_subProjectCodeName = "";
|
||||
QString g_platform = "";
|
||||
bool g_menuStatus = false;
|
||||
QString g_curStyle = "";
|
||||
bool g_menuStatus = false;
|
||||
bool g_isFullScreen = false;
|
||||
|
||||
const QPixmap loadSvg(const QString &fileName, const int size)
|
||||
{
|
||||
|
@ -132,6 +133,35 @@ QIcon getCurIcon(const QString &iconPath, bool autoSet)
|
|||
return QIcon(pixmap);
|
||||
}
|
||||
|
||||
QPixmap getCurPixmap(const QString &iconPath, bool autoSet, int size)
|
||||
{
|
||||
QPixmap pixmap;
|
||||
|
||||
if (iconPath.endsWith("png")) {
|
||||
pixmap = QPixmap(iconPath);
|
||||
} else {
|
||||
pixmap = loadSvg(iconPath, size);
|
||||
}
|
||||
|
||||
if (!autoSet) {
|
||||
return drawSymbolicColoredPixmap(pixmap);
|
||||
}
|
||||
|
||||
if (QGSettings::isSchemaInstalled(QString("org.ukui.style").toLocal8Bit())) {
|
||||
QGSettings gsetting(QString("org.ukui.style").toLocal8Bit());
|
||||
|
||||
if (gsetting.keys().contains(QString("styleName"))) {
|
||||
if (gsetting.get("style-name").toString() == "ukui-light"
|
||||
|| gsetting.get("style-name").toString() == "ukui-default") {
|
||||
pixmap = drawSymbolicBlackColoredPixmap(pixmap);
|
||||
} else {
|
||||
pixmap = drawSymbolicColoredPixmap(pixmap);
|
||||
}
|
||||
}
|
||||
}
|
||||
return pixmap;
|
||||
}
|
||||
|
||||
//不通过任务栏获取屏幕可用区域数据
|
||||
QVariantList getScreenGeometryList()
|
||||
{
|
||||
|
|
|
@ -71,6 +71,7 @@ bool checkOsRelease();//区分社区办与商业版
|
|||
|
||||
void centerToScreen(QWidget *widget);
|
||||
QIcon getCurIcon(const QString &iconPath, bool autoSet);
|
||||
QPixmap getCurPixmap(const QString &iconPath, bool autoSet, int size);
|
||||
|
||||
//获取用户图像
|
||||
QString getUserIcon();
|
||||
|
@ -87,8 +88,9 @@ enum PanelPositon {
|
|||
extern QString g_projectCodeName;
|
||||
extern QString g_subProjectCodeName;
|
||||
extern QString g_platform;
|
||||
extern bool g_menuStatus;
|
||||
extern QString g_curStyle;
|
||||
extern bool g_menuStatus;
|
||||
extern bool g_isFullScreen;
|
||||
|
||||
|
||||
#endif // UTILITY_H
|
||||
|
|
Loading…
Reference in New Issue