deepin20.9启动器修改大圆角为小圆角
获取源代码:
apt source dde-launcher
修改代码:
vim src/windowedframe.cpp
,623行
case TopRight:
path.moveTo(topLeft.x(), topLeft.y());
path.lineTo(topRight.x() - m_radius, topRight.y());
//path.arcTo(topRight.x() - m_radius * 2, topRight.y(), m_radius * 2, m_radius * 2, 90, -90);
path.arcTo(topRight.x() - m_radius * 2, topRight.y(), m_radius * 2, m_radius * 2, 45, -45); //liwl,变成30度
path.lineTo(bottomRight.x(), bottomRight.y());
path.lineTo(bottomLeft.x(), bottomLeft.y());
break;
void WindowedFrame::onWMCompositeChanged()
{
if (m_wmHelper->hasComposite())
m_radius = 8; //liwl,2024/04/06, 18 -> 8
else
m_radius = 0;
initAnchoredCornor();
m_cornerPath = getCornerPath(m_anchoredCornor);
m_windowHandle.setClipPath(m_cornerPath);
}
vim src/delegate/appitemdelegate.cpp
// 绘制选中样式
if (is_current && !(option.features & QStyleOptionViewItem::HasDisplay)) {
//const int radius = 18;
const int radius = 8; //liwl,2024/04/06, 18 -> 8
const QColor brushColor(255, 255, 255, 51);
painter->setPen(Qt::transparent);
painter->setBrush(brushColor);
int drawBlueDotWidth = 0;
if (drawBlueDot)
drawBlueDotWidth = m_blueDotPixmap.width();
if (iconSize.width() > (fm.width(appNameResolved) + drawBlueDotWidth)) {
br.setX(iconRect.x() - ICONTOLETF);
br.setWidth(iconSize.width() + ICONTOLETF * 2);
} else {
int width = fm.width(appNameResolved) + drawBlueDotWidth + TEXTTOLEFT * 2;
if (width < br.width()) {
br.setX(br.x() + (br.width() - width) / 2);
br.setWidth(width);
}
}
painter->drawRoundedRect(br, radius, radius);
}
编译安装
mkdir build
cd build
cmake ..
make ..
sudo make install
pkill -f dde-launcher
pkill -f /usr/bin/dde-launcher
sudo cp /usr/local/bin/dde-launcher /usr/bin/dde-launcher
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· 展开说说关于C#中ORM框架的用法!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?