Skip to content

Commit

Permalink
fix: adjust ui
Browse files Browse the repository at this point in the history
adjust ui to adapt to new dock

Issue: linuxdeepin/developer-center#8029
  • Loading branch information
wangfei committed Apr 19, 2024
1 parent b29973c commit 542a792
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 36 deletions.
2 changes: 2 additions & 0 deletions dde-introduction.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
<file>resources/[email protected]</file>
<file>resources/[email protected]</file>
<file>resources/[email protected]</file>
<file>resources/[email protected]</file>
<file>resources/[email protected]</file>
<file>resources/[email protected]</file>
<file>resources/[email protected]</file>
<file>resources/community_Moment.png</file>
<file>resources/close_normal_dark.svg</file>
Expand Down
Binary file added resources/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ BaseModuleWidget *MainWindow::initDesktopModeModule()
DesktopModeModule *module = new DesktopModeModule;
module->updateBigIcon();
BaseModuleWidget *w = new BaseModuleWidget(module, m_fakerWidget);
w->setTitle(tr("Choose a desktop mode"));
w->setTitle(tr("Choose a alignment mode"));
w->setDescribe(tr("You can switch modes by right clicking on the dock"));
w->setFixedSize(WINDOW_SIZE);
return w;
Expand Down
12 changes: 6 additions & 6 deletions src/modules/desktopmodemodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ DesktopModeModule::DesktopModeModule(QWidget *parent)
, m_fashionWidget(new BaseWidget(this))
{
isfirst = true;
m_efficientWidget->setTitle(tr("Efficient Mode"));
m_fashionWidget->setTitle(tr("Fashion Mode"));
m_efficientWidget->setTitle(tr("Align left"));
m_fashionWidget->setTitle(tr("Align center"));

connect(m_model, &Model::desktopModeChanged, this, &DesktopModeModule::onDesktopTypeChanged);
//时尚模式点击响应
Expand Down Expand Up @@ -58,17 +58,17 @@ void DesktopModeModule::onDesktopTypeChanged(Model::DesktopMode mode)
//首次启动初始化图片
void DesktopModeModule::updateBigIcon()
{
m_efficientWidget->setBigPixmap(":/resources/effective_mode_big@3x.png");
m_fashionWidget->setBigPixmap(":/resources/fashion_mode_big@3x.png");
m_efficientWidget->setBigPixmap(":/resources/effective_mode_big@3x.jpg");
m_fashionWidget->setBigPixmap(":/resources/fashion_mode_big@3x.jpeg");
m_layout->setContentsMargins(10, 70, 10, 35);
m_size = QSize(330, 210);
}

//日常启动初始化图片
void DesktopModeModule::updateSmallIcon()
{
QPixmap pixmapeff(":/resources/effective_mode_small@3x.png");
QPixmap pixmapfash(":/resources/fashion_mode_small@3x.png");
QPixmap pixmapeff(":/resources/effective_mode_big@3x.jpg");
QPixmap pixmapfash(":/resources/fashion_mode_big@3x.jpeg");
m_efficientWidget->setSmallPixmap(pixmapeff);
m_fashionWidget->setSmallPixmap(pixmapfash);
m_size = QSize(250, 160);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/normalmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ NormalModule::NormalModule(DWidget *parent)
NavigationButton *desktopBtn = new NavigationButton(tr("Desktop Mode"));
desktopBtn->setToolTip(tr("Desktop Mode"));
m_buttonMap[desktopBtn] = ++moduleCount;
m_titleMap[desktopBtn] = tr("Choose a desktop mode");
m_titleMap[desktopBtn] = tr("Choose a alignment mode");
m_describeMap[desktopBtn] = tr("You can switch modes by right clicking on the dock");
m_buttonGrp->addButton(desktopBtn);
DesktopModeModule *desktopModeModule = new DesktopModeModule(this);
Expand Down
30 changes: 16 additions & 14 deletions translations/dde-introduction.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="en" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="en">
<context>
<name>BottomNavigation</name>
<message>
Expand All @@ -21,12 +23,12 @@
<context>
<name>DesktopModeModule</name>
<message>
<source>Efficient Mode</source>
<translation>Efficient Mode</translation>
<source>Align left</source>
<translation>Align left</translation>
</message>
<message>
<source>Fashion Mode</source>
<translation>Fashion Mode</translation>
<source>Align center</source>
<translation>Align center</translation>
</message>
</context>
<context>
Expand All @@ -39,10 +41,6 @@
<source>Done</source>
<translation>Done</translation>
</message>
<message>
<source>Choose a desktop mode</source>
<translation>Choose a desktop mode</translation>
</message>
<message>
<source>You can switch modes by right clicking on the dock</source>
<translation>You can switch modes by right clicking on the dock</translation>
Expand All @@ -63,6 +61,10 @@
<source>Change it in Control Center &gt; Personalization &gt; Icon Theme</source>
<translation>Change it in Control Center &gt; Personalization &gt; Icon Theme</translation>
</message>
<message>
<source>Choose a alignment mode</source>
<translation>Choose a alignment mode</translation>
</message>
</context>
<context>
<name>NormalModule</name>
Expand All @@ -78,10 +80,6 @@
<source>Desktop Mode</source>
<translation>Desktop Mode</translation>
</message>
<message>
<source>Choose a desktop mode</source>
<translation>Choose a desktop mode</translation>
</message>
<message>
<source>You can switch modes by right clicking on the dock</source>
<translation>You can switch modes by right clicking on the dock</translation>
Expand Down Expand Up @@ -110,6 +108,10 @@
<source>Change it in Control Center &gt; Personalization &gt; Icon Theme</source>
<translation>Change it in Control Center &gt; Personalization &gt; Icon Theme</translation>
</message>
<message>
<source>Choose a alignment mode</source>
<translation>Choose a alignment mode</translation>
</message>
</context>
<context>
<name>QObject</name>
Expand All @@ -129,4 +131,4 @@
<translation>Effect Mode</translation>
</message>
</context>
</TS>
</TS>
30 changes: 16 additions & 14 deletions translations/dde-introduction_zh_CN.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_CN" version="2.1">
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>BottomNavigation</name>
<message>
Expand All @@ -21,12 +23,12 @@
<context>
<name>DesktopModeModule</name>
<message>
<source>Efficient Mode</source>
<translation>高效模式</translation>
<source>Align left</source>
<translation>靠左</translation>
</message>
<message>
<source>Fashion Mode</source>
<translation>时尚模式</translation>
<source>Align center</source>
<translation>居中</translation>
</message>
</context>
<context>
Expand All @@ -39,10 +41,6 @@
<source>Done</source>
<translation>完成</translation>
</message>
<message>
<source>Choose a desktop mode</source>
<translation>请选择桌面样式</translation>
</message>
<message>
<source>You can switch modes by right clicking on the dock</source>
<translation>您可以在任务栏右键菜单—“模式”中进行调节</translation>
Expand All @@ -63,6 +61,10 @@
<source>Change it in Control Center &gt; Personalization &gt; Icon Theme</source>
<translation>您可以在控制中心个性化模块—图标主题中进行调节</translation>
</message>
<message>
<source>Choose a alignment mode</source>
<translation>选择一个布局模式</translation>
</message>
</context>
<context>
<name>NormalModule</name>
Expand All @@ -78,10 +80,6 @@
<source>Desktop Mode</source>
<translation>桌面样式</translation>
</message>
<message>
<source>Choose a desktop mode</source>
<translation>请选择桌面样式</translation>
</message>
<message>
<source>You can switch modes by right clicking on the dock</source>
<translation>您可以在任务栏右键菜单—“模式”中进行调节</translation>
Expand Down Expand Up @@ -110,6 +108,10 @@
<source>Change it in Control Center &gt; Personalization &gt; Icon Theme</source>
<translation>您可以在控制中心个性化模块—图标主题中进行调节</translation>
</message>
<message>
<source>Choose a alignment mode</source>
<translation>选择一个布局模式</translation>
</message>
</context>
<context>
<name>QObject</name>
Expand All @@ -129,4 +131,4 @@
<translation>特效模式</translation>
</message>
</context>
</TS>
</TS>

0 comments on commit 542a792

Please sign in to comment.