From 3f88f79f862a570b68fe64781955cf7d14124127 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 23 Mar 2012 22:26:17 +0100 Subject: Details view: Optionally remember user changed column-widths If the user changed a column-width in the details-view, up to now the width got reset when changing a directory or when restarting Dolphin. Now the column-widths automatically get remembered for each directory in case if the user has modified the width. The automatic resizing is still turn on per default. The storing of the custom column-width can easily be reset by right clicking on the header and selecting "Automatic Column Widths" from the context-menu. Some finetuning is still necessary (e.g. the "Adjust View Properties" dialog currently is not aware about this setting) but this will be fixed during the next weeks. BUG: 264434 FIXED-IN: 4.9.0 --- src/views/viewproperties.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/views/viewproperties.cpp') diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp index 8588bb238..83958ad00 100644 --- a/src/views/viewproperties.cpp +++ b/src/views/viewproperties.cpp @@ -292,6 +292,19 @@ QList ViewProperties::visibleRoles() const return roles; } +void ViewProperties::setHeaderColumnWidths(const QList& widths) +{ + if (m_node->headerColumnWidths() != widths) { + m_node->setHeaderColumnWidths(widths); + update(); + } +} + +QList ViewProperties::headerColumnWidths() const +{ + return m_node->headerColumnWidths(); +} + void ViewProperties::setDirProperties(const ViewProperties& props) { setViewMode(props.viewMode()); @@ -302,6 +315,7 @@ void ViewProperties::setDirProperties(const ViewProperties& props) setSortOrder(props.sortOrder()); setSortFoldersFirst(props.sortFoldersFirst()); setVisibleRoles(props.visibleRoles()); + setHeaderColumnWidths(props.headerColumnWidths()); } void ViewProperties::setAutoSaveEnabled(bool autoSave) -- cgit v1.3