mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-01 07:05:48 +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)
|
||||
: QWidget(parent)
|
||||
, m_brightnessAdjWidget(new BrightnessAdjWidget(model, this))
|
||||
, m_settingBtn(new QPushButton(tr("Display Settings"), this))
|
||||
{
|
||||
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()
|
||||
@ -27,6 +35,7 @@ void DisplaySettingWidget::initUI()
|
||||
mainLayout->setSpacing(ItemSpacing);
|
||||
|
||||
mainLayout->addWidget(m_brightnessAdjWidget);
|
||||
mainLayout->addWidget(m_settingBtn);
|
||||
mainLayout->addStretch();
|
||||
|
||||
setLayout(mainLayout);
|
||||
@ -39,5 +48,6 @@ void DisplaySettingWidget::initUI()
|
||||
void DisplaySettingWidget::resizeWidgetHeight()
|
||||
{
|
||||
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:
|
||||
BrightnessAdjWidget *m_brightnessAdjWidget; // 亮度调整
|
||||
QPushButton *m_settingBtn; // 设置按钮
|
||||
};
|
||||
|
||||
|
||||
|
@ -151,26 +151,11 @@
|
||||
</context>
|
||||
<context>
|
||||
<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>
|
||||
<source>Time settings</source>
|
||||
<translation>Time settings</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevCollaborationWidget</name>
|
||||
<message>
|
||||
<source>PC collaboration</source>
|
||||
<translation>PC collaboration</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogManager</name>
|
||||
<message>
|
||||
@ -200,8 +185,8 @@
|
||||
<context>
|
||||
<name>DisplaySettingWidget</name>
|
||||
<message>
|
||||
<source>Multi-Screen Collaboration</source>
|
||||
<translation>Multi-Screen Collaboration</translation>
|
||||
<source>Display Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="zh_CN">
|
||||
<?xml version="1.0" ?><!DOCTYPE TS><TS version="2.1" language="zh_CN">
|
||||
<context>
|
||||
<name>AbstractPluginsController</name>
|
||||
<message>
|
||||
@ -151,26 +149,11 @@
|
||||
</context>
|
||||
<context>
|
||||
<name>DateTimeDisplayer</name>
|
||||
<message>
|
||||
<source>12-hour time</source>
|
||||
<translation>12小时制</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>24-hour time</source>
|
||||
<translation>24小时制</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Time settings</source>
|
||||
<translation>时间设置</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DevCollaborationWidget</name>
|
||||
<message>
|
||||
<source>PC collaboration</source>
|
||||
<translation>电脑协同</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogManager</name>
|
||||
<message>
|
||||
@ -200,15 +183,15 @@
|
||||
<context>
|
||||
<name>DisplaySettingWidget</name>
|
||||
<message>
|
||||
<source>Multi-Screen Collaboration</source>
|
||||
<translation>电脑协同设置</translation>
|
||||
<source>Display Settings</source>
|
||||
<translation>显示设置</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DockPluginController</name>
|
||||
<message>
|
||||
<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>
|
||||
</context>
|
||||
<context>
|
||||
|
Loading…
x
Reference in New Issue
Block a user