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:
parent
05161a1ab8
commit
971d207d86
@ -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()
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user