1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-22 14:50:31 +03:00

update Shared button state

This commit is contained in:
Michail Vourlakos 2019-05-05 18:12:33 +03:00
parent 05161a1ab8
commit 971d207d86
2 changed files with 16 additions and 3 deletions

View File

@ -1300,6 +1300,7 @@ void SettingsDialog::updatePerLayoutButtonsState()
QString nameInModel = m_model->data(m_model->index(currentRow, NAMECOLUMN), Qt::DisplayRole).toString();
QString originalName = m_layouts.contains(id) ? m_layouts[id]->name() : "";
bool lockedInModel = m_model->data(m_model->index(currentRow, NAMECOLUMN), Qt::UserRole).toBool();
bool sharedInModel = !m_model->data(m_model->index(currentRow, SHAREDCOLUMN), Qt::UserRole).toStringList().isEmpty();
//! Switch Button
if (id.startsWith("/tmp/") || originalName != nameInModel) {
@ -1335,11 +1336,19 @@ void SettingsDialog::updatePerLayoutButtonsState()
ui->removeButton->setEnabled(true);
}
//! Layout Locked Button
if (lockedInModel) {
ui->lockedButton->setChecked(true);
} else {
ui->lockedButton->setChecked(false);
}
//! Layout Shared Button
if (sharedInModel) {
ui->sharedButton->setChecked(true);
} else {
ui->sharedButton->setChecked(false);
}
}
void SettingsDialog::updateSharedLayoutsStates()

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>850</width>
<height>636</height>
<height>663</height>
</rect>
</property>
<property name="windowTitle">
@ -293,7 +293,11 @@
<string>Shared</string>
</property>
<property name="icon">
<iconset theme="document-share"/>
<iconset theme="document-share">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
@ -460,7 +464,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>799</width>
<width>496</width>
<height>575</height>
</rect>
</property>