mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-11 13:18:13 +03:00
settings window improvements
This commit is contained in:
parent
3122103f6c
commit
7dbfb1184b
@ -250,7 +250,7 @@ void Layouts::removeSelected()
|
||||
int row = m_view->currentIndex().row();
|
||||
m_model->removeRow(row);
|
||||
|
||||
row = qMin(qMax(row - 1, 0), m_model->rowCount());
|
||||
row = qMin(row, m_model->rowCount() - 1);
|
||||
m_view->selectRow(row);
|
||||
}
|
||||
|
||||
@ -725,6 +725,8 @@ void Layouts::save()
|
||||
m_corona->layoutsManager()->synchronizer()->loadLayouts();
|
||||
|
||||
|
||||
|
||||
|
||||
//! send to layout manager in which layout to switch
|
||||
/* Latte::Types::LayoutsMemoryUsage inMemoryOption = static_cast<Latte::Types::LayoutsMemoryUsage>(m_inMemoryButtons->checkedId());
|
||||
|
||||
@ -743,6 +745,9 @@ void Layouts::save()
|
||||
m_corona->layoutsManager()->synchronizer()->syncMultipleLayoutsToActivities(orphanedLayout);
|
||||
}
|
||||
}*/
|
||||
|
||||
o_layoutsOriginalData = m_model->currentData();
|
||||
o_originalInMultipleMode = m_model->inMultipleMode();
|
||||
}
|
||||
|
||||
void Layouts::syncActiveShares()
|
||||
|
@ -105,7 +105,7 @@ bool Layout::operator==(const Layout &rhs) const
|
||||
&& (color == rhs.color)
|
||||
&& (background == rhs.background)
|
||||
&& (textColor == rhs.textColor)
|
||||
&& (isActive == rhs.isActive)
|
||||
//&& (isActive == rhs.isActive) /*Disabled but this is not a data but a layout state*/
|
||||
&& (isLocked == rhs.isLocked)
|
||||
&& (isShownInMenu == rhs.isShownInMenu)
|
||||
&& (hasDisabledBorders == rhs.hasDisabledBorders)
|
||||
|
@ -76,7 +76,9 @@ bool LayoutsTable::operator==(const LayoutsTable &rhs) const
|
||||
}
|
||||
|
||||
for(int i=0; i<m_layouts.count(); ++i) {
|
||||
if (m_layouts[i] != rhs.m_layouts[i]){
|
||||
QString id = m_layouts[i].id;
|
||||
|
||||
if (!rhs.containsId(id) || (*this)[id] != rhs[id]){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -164,6 +164,7 @@ SettingsDialog::SettingsDialog(QWidget *parent, Latte::Corona *corona)
|
||||
m_model->setInMultipleMode(m_inMemoryButtons->checkedId() == Latte::Types::MultipleLayouts);
|
||||
|
||||
updateApplyButtonsState();
|
||||
updatePerLayoutButtonsState();
|
||||
updateSharedLayoutsUiElements();
|
||||
});
|
||||
|
||||
@ -755,9 +756,10 @@ void SettingsDialog::updatePerLayoutButtonsState()
|
||||
}
|
||||
|
||||
//! Pause Button
|
||||
if (m_corona->layoutsManager()->memoryUsage() == Types::SingleLayout) {
|
||||
if (!m_layoutsController->inMultipleMode()) {
|
||||
//! Single Layout mode
|
||||
ui->pauseButton->setVisible(false);
|
||||
} else if (m_corona->layoutsManager()->memoryUsage() == Types::MultipleLayouts) {
|
||||
} else {
|
||||
ui->pauseButton->setVisible(true);
|
||||
|
||||
if (selectedLayout.isActive
|
||||
|
@ -95,6 +95,9 @@
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QTableView" name="layoutsView">
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user