mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-02 15:45:21 +00:00
chore: bring back display setting button
Log:
This commit is contained in:
parent
945bb03a27
commit
b5399bd0ec
@ -15,8 +15,16 @@ const int ItemSpacing = 10;
|
|||||||
DisplaySettingWidget::DisplaySettingWidget(BrightnessModel *model, QWidget *parent)
|
DisplaySettingWidget::DisplaySettingWidget(BrightnessModel *model, QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, m_brightnessAdjWidget(new BrightnessAdjWidget(model, this))
|
, m_brightnessAdjWidget(new BrightnessAdjWidget(model, this))
|
||||||
|
, m_settingBtn(new QPushButton(tr("Display Settings"), this))
|
||||||
{
|
{
|
||||||
initUI();
|
initUI();
|
||||||
|
connect(m_settingBtn, &QPushButton::clicked, this, [ this ](){
|
||||||
|
DDBusSender().service("org.deepin.dde.ControlCenter1")
|
||||||
|
.path("/org/deepin/dde/ControlCenter1")
|
||||||
|
.interface("org.deepin.dde.ControlCenter1")
|
||||||
|
.method("ShowPage").arg(QString("display")).call();
|
||||||
|
Q_EMIT requestHide();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplaySettingWidget::initUI()
|
void DisplaySettingWidget::initUI()
|
||||||
@ -27,6 +35,7 @@ void DisplaySettingWidget::initUI()
|
|||||||
mainLayout->setSpacing(ItemSpacing);
|
mainLayout->setSpacing(ItemSpacing);
|
||||||
|
|
||||||
mainLayout->addWidget(m_brightnessAdjWidget);
|
mainLayout->addWidget(m_brightnessAdjWidget);
|
||||||
|
mainLayout->addWidget(m_settingBtn);
|
||||||
mainLayout->addStretch();
|
mainLayout->addStretch();
|
||||||
|
|
||||||
setLayout(mainLayout);
|
setLayout(mainLayout);
|
||||||
@ -39,5 +48,6 @@ void DisplaySettingWidget::initUI()
|
|||||||
void DisplaySettingWidget::resizeWidgetHeight()
|
void DisplaySettingWidget::resizeWidgetHeight()
|
||||||
{
|
{
|
||||||
QMargins margins = this->contentsMargins();
|
QMargins margins = this->contentsMargins();
|
||||||
setFixedHeight(margins.top() + margins.bottom() + m_brightnessAdjWidget->height());
|
setFixedHeight(margins.top() + margins.bottom() + m_brightnessAdjWidget->height() +
|
||||||
|
m_settingBtn->height() + ItemSpacing);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
BrightnessAdjWidget *m_brightnessAdjWidget; // 亮度调整
|
BrightnessAdjWidget *m_brightnessAdjWidget; // 亮度调整
|
||||||
|
QPushButton *m_settingBtn; // 设置按钮
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -151,26 +151,11 @@
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>DateTimeDisplayer</name>
|
<name>DateTimeDisplayer</name>
|
||||||
<message>
|
|
||||||
<source>12-hour time</source>
|
|
||||||
<translation>12-hour time</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>24-hour time</source>
|
|
||||||
<translation>24-hour time</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Time settings</source>
|
<source>Time settings</source>
|
||||||
<translation>Time settings</translation>
|
<translation>Time settings</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>DevCollaborationWidget</name>
|
|
||||||
<message>
|
|
||||||
<source>PC collaboration</source>
|
|
||||||
<translation>PC collaboration</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>DialogManager</name>
|
<name>DialogManager</name>
|
||||||
<message>
|
<message>
|
||||||
@ -200,8 +185,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>DisplaySettingWidget</name>
|
<name>DisplaySettingWidget</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Multi-Screen Collaboration</source>
|
<source>Display Settings</source>
|
||||||
<translation>Multi-Screen Collaboration</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" ?><!DOCTYPE TS><TS version="2.1" language="zh_CN">
|
||||||
<!DOCTYPE TS>
|
|
||||||
<TS version="2.1" language="zh_CN">
|
|
||||||
<context>
|
<context>
|
||||||
<name>AbstractPluginsController</name>
|
<name>AbstractPluginsController</name>
|
||||||
<message>
|
<message>
|
||||||
@ -151,26 +149,11 @@
|
|||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>DateTimeDisplayer</name>
|
<name>DateTimeDisplayer</name>
|
||||||
<message>
|
|
||||||
<source>12-hour time</source>
|
|
||||||
<translation>12小时制</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>24-hour time</source>
|
|
||||||
<translation>24小时制</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Time settings</source>
|
<source>Time settings</source>
|
||||||
<translation>时间设置</translation>
|
<translation>时间设置</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>DevCollaborationWidget</name>
|
|
||||||
<message>
|
|
||||||
<source>PC collaboration</source>
|
|
||||||
<translation>电脑协同</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
<context>
|
||||||
<name>DialogManager</name>
|
<name>DialogManager</name>
|
||||||
<message>
|
<message>
|
||||||
@ -200,15 +183,15 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>DisplaySettingWidget</name>
|
<name>DisplaySettingWidget</name>
|
||||||
<message>
|
<message>
|
||||||
<source>Multi-Screen Collaboration</source>
|
<source>Display Settings</source>
|
||||||
<translation>电脑协同设置</translation>
|
<translation>显示设置</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>DockPluginController</name>
|
<name>DockPluginController</name>
|
||||||
<message>
|
<message>
|
||||||
<source>The plugin %1 is not compatible with the system.</source>
|
<source>The plugin %1 is not compatible with the system.</source>
|
||||||
<translation>The plugin %1 is not compatible with the system.</translation>
|
<translation>插件%1和系统版本不兼容。</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user