mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00

1、高缩放率下计算图标任务栏尺寸需要乘以缩放率的数值 2、加载声音图标带上具体的后缀名,否则会出现图标显示异常 3、自定义图标的尺寸的显示,需要重新计算图标的宽度 Log: 修复高分屏下图标显示异常 Influence: 高分屏,高缩放率,观察任务栏插件区域的图标 Bug: https://pms.uniontech.com/bug-view-183543.html Bug: https://pms.uniontech.com/bug-view-184089.html Change-Id: Iaa8833b20608129e5c10c8614702a9e5afeae2d9
82 lines
2.4 KiB
C++
82 lines
2.4 KiB
C++
/*
|
||
* Copyright (C) 2011 ~ 2018 Deepin Technology Co., Ltd.
|
||
*
|
||
* Author: sbw <sbw@sbw.so>
|
||
*
|
||
* Maintainer: sbw <sbw@sbw.so>
|
||
* zhaolong <zhaolong@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 MAINWINDOW_H
|
||
#define MAINWINDOW_H
|
||
|
||
#include "xcb_misc.h"
|
||
#include "multiscreenworker.h"
|
||
#include "touchsignalmanager.h"
|
||
#include "imageutil.h"
|
||
#include "utils.h"
|
||
#include "mainwindowbase.h"
|
||
|
||
#include <DPlatformWindowHandle>
|
||
|
||
#include <QWidget>
|
||
|
||
DWIDGET_USE_NAMESPACE
|
||
|
||
class MainPanelControl;
|
||
class QTimer;
|
||
class MenuWorker;
|
||
class QScreen;
|
||
|
||
class MainWindow : public MainWindowBase
|
||
{
|
||
Q_OBJECT
|
||
|
||
public:
|
||
explicit MainWindow(MultiScreenWorker *multiScreenWorker, QWidget *parent = nullptr);
|
||
void setGeometry(const QRect &rect);
|
||
|
||
friend class MainPanelControl;
|
||
|
||
// 以下接口是实现基类的接口
|
||
// 用来更新子区域的位置,一般用于在执行动画的过程中,根据当前的位置来更新里面panel的大小
|
||
DockWindowType windowType() const override;
|
||
void setPosition(const Dock::Position &position) override;
|
||
void setDisplayMode(const Dock::DisplayMode &displayMode) override;
|
||
void updateParentGeometry(const Dock::Position &pos, const QRect &rect) override;
|
||
QSize suitableSize(const Dock::Position &pos, const int &screenSize, const double &deviceRatio) const override;
|
||
void resetPanelGeometry() override;
|
||
void serviceRestart() override;
|
||
void animationFinished(bool showOrHide) override;
|
||
|
||
private:
|
||
using QWidget::show;
|
||
void initConnections();
|
||
void resizeDockIcon();
|
||
|
||
private:
|
||
MainPanelControl *m_mainPanel; // 任务栏
|
||
MultiScreenWorker *m_multiScreenWorker; // 多屏幕管理
|
||
|
||
QString m_sniHostService;
|
||
|
||
QString m_registerKey;
|
||
QStringList m_registerKeys;
|
||
bool m_needUpdateUi;
|
||
};
|
||
|
||
#endif // MAINWINDOW_H
|