Commit graph

18 commits

Author SHA1 Message Date
Peter Penz
6c3d9acbc2 KItemViews: Internal directory restructuration
- Move all private headers from the kitemviews-directory into
the 'private' subdirectory.

- Get rid of DolphinDirLister and just use a directory-lister
  internally in KFileItemModel.

- Minor interface-cleanups for signals
2012-04-11 16:08:32 +02:00
Peter Penz
e70c2f8aa4 Details view: Don't reset to automatic resizing when adding columns
Until now when a new column is added in the case where custom column widths
are used, the automatic resizing has been turned on again. The patch fixes
this so that the current widths stay and the new column gets a proper default
width.
2012-03-25 22:58:16 +02:00
Peter Penz
1cbe55b97c Cleanup and minor fixes for column-handling 2012-03-24 23:47:42 +01:00
Peter Penz
3f88f79f86 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
2012-03-23 22:31:55 +01:00
Peter Penz
3fc96ef97b Details view: Expand the name-column like in Dolphin 1.x
With the new view-engine the name-column always has been expanded
to the maximum width of all available names. But this makes it
impossible to see other columns without scrolling when having long
filenames, so per default the Dolphin 1.x behavior has been applied
to the new view-engine so that the name-column-width gets decreased
to be able to show the other columns.

This patch will be released with KDE applications 4.8.2. For
Dolphin 2.1 (KDE applications 4.9) user-modified widths of the
columns will be remembered per directory also between different
sessions.

CCBUG: 264434
2012-03-22 15:47:01 +01:00
Peter Penz
4815fbd00b Bypass crash with Polyester-style
The Polyester style crashes when drawing a header where the
parent widget is 0.

BUG: 296453
FIXED-IN: 4.8.2
2012-03-20 21:09:52 +01:00
Peter Penz
08a485349f Allow custom sorting of details-view columns
Fix regression that Dolphin 2.0 did not allow to adjust the sorting
of the details-view columns.

BUG: 164696
FIXED-IN: 4.8.2
2012-03-07 22:18:59 +01:00
Peter Penz
42adf258b6 Remember sort settings
If the user has changed the sort-role or sort-order by clicking on the view-header of the details-view, the settings have been adjusted to the model but not remembered in the directory settings.
2011-12-11 20:24:38 +01:00
Peter Penz
8d44ebc148 Details-view: Fix column-width issue
The column-width must respect the minimum width of the
header-roles.
2011-10-08 22:47:52 +02:00
Peter Penz
6551c000fc Context menu cleanups
- Open the context menu on the mouse-press event, not on the
  mouse-release event.
- Provide an explicit position-information and don't use
  QCursor::pos(). This fixes the issue that opening a context-menu
  by the keyboard opens below the cursor.
- Provide different signals in the KItemListController for
  the different context-menu types (item vs. view vs. header).
- Implement turning on/off roles by the header-context-menu.
2011-10-08 21:43:55 +02:00
Peter Penz
16d4f059c3 Use QFontMetrics::height() instead of averageCharWidth()
QFontMetrics::averageCharWidth() is quite slow and does not work
well on fonts with broken characters. In the
usecases required by Dolphin QFontMetrics::height() is a better
and faster alternative to get a font-dependent minimum width.

Thanks go to Christoph Feck for this hint!
2011-10-06 16:45:15 +02:00
Peter Penz
af3c3a4328 Elide the texts if the user shrinks the column-widths 2011-10-02 17:34:18 +02:00
Peter Penz
56852cff39 Allow resizing of columns by the user
Still open:
- Column content is not clipped correctly
- First column is not automatically increased to the available
  width like in Dolphin 1.7
2011-09-23 19:11:05 +02:00
Peter Penz
ba1993af7c KItemListHeader: Allow resizing and change of the sorting
KItemListView does not react on the resizing yet. Toggling the
sort order and changing the sort role is already possible.
2011-09-22 21:35:14 +02:00
Peter Penz
bc96a10234 Improve drawing of list-header 2011-09-21 23:42:28 +02:00
Peter Penz
51cd727066 Show the role-description in the header of the details view 2011-09-20 18:01:34 +02:00
Peter Penz
06f057d385 Draw styled header for the details-view 2011-09-19 20:35:30 +02:00
Peter Penz
f9bcd0a47c Rough draft for getting back the header for the details-view 2011-09-19 16:39:08 +02:00