dde-dock/plugins/bluetooth/bluetoothmainwidget.h
donghualin 9b6d09ffab fix: 修复图标异常问题
1、修复拖动过程中组合图标尺寸显示异常的问题
2、修复从控制中心设置插件显示隐藏引起的异常问题
3、修复高缩放率下的组合图标显示异常问题
4、修复蓝牙面板在不同的主题下颜色的显示的问题
5、社区版键盘布局默认在任务栏显示

Log: 修复图标显示的问题
Influence: 高缩放率下,观察组合图标显示是否正常
Bug: https://pms.uniontech.com/bug-view-181723.html
Change-Id: Id351063095a2290731876ce896c2cd05a32d4ec0
2023-01-14 16:41:51 +08:00

66 lines
1.6 KiB
C++

/*
* Copyright (C) 2022 ~ 2022 Deepin Technology Co., Ltd.
*
* Author: donghualin <donghualin@uniontech.com>
*
* Maintainer: donghualin <donghualin@uniontech.com>
*
* 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
* any later version.
*
* This program 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 <http://www.gnu.org/licenses/>.
*/
#ifndef BLUETOOTHMAINWIDGET_H
#define BLUETOOTHMAINWIDGET_H
#include <QWidget>
class AdaptersManager;
class QLabel;
class Adapter;
class BluetoothMainWidget : public QWidget
{
Q_OBJECT
public:
explicit BluetoothMainWidget(AdaptersManager *adapterManager, QWidget *parent = nullptr);
~BluetoothMainWidget();
Q_SIGNALS:
void requestExpand();
protected:
bool eventFilter(QObject *watcher, QEvent *event) override;
private:
void initUi();
void initConnection();
void updateExpandIcon();
bool isOpen() const;
QString bluetoothIcon(bool isOpen) const;
private Q_SLOTS:
void onAdapterChanged();
private:
AdaptersManager *m_adapterManager;
QWidget *m_iconWidget;
QLabel *m_nameLabel;
QLabel *m_stateLabel;
QLabel *m_expandLabel;
bool m_mouseEnter;
};
#endif // BLUETOOTHMAINWIDGET_H