Commit graph

33 commits

Author SHA1 Message Date
Emmanuel Pescosta 6747241934 Fix Bug 326210 - Dolphin unnecessarily truncates names of soft links in compact mode
FIXED-IN: 4.13.0
BUG: 326210
BUG: 310592
REVIEW: 116121
2014-03-05 10:48:33 +01:00
Frank Reininghaus 8f7c3619ec Try to avoid calling the model's data method if only "text" is needed
Currently, KStandardItemListWidgetInformant::itemSizeHint() calls the
model's data(int) method for every single item, but the full data is
actually only needed for the size calculation in Compact View. In
Details View, no data is needed at all to determine the size required
for the item, and in Icons View, only the name is needed.

This patch makes it possible for subclasses of
KStandardItemListWidgetInformant to provide an alternative way to
obtain the "text", and implements this in the subclass
KFileItemListWidgetInformant.

The final goal is to achieve that the QHash which contains all data
for a file item is only created if it is really needed, e.g., because
the view needs access to the data for displaying the item on the
screen.

REVIEW: 112253
2013-09-04 21:37:01 +02:00
David Faure eb14263c48 Fix bug 303375 - Dots in directory names treated as file extension.
Patch by Emmanuel Pescosta <emmanuelpescosta099@gmail.com>

BUG: 303375
REVIEW: 105575
FIXED-IN: 4.9.0
2012-08-13 22:25:49 +02:00
Frank Reininghaus f061d2a6b3 Use an italic font for symbolic links
BUG: 298218
FIXED-IN: 4.9.0
2012-05-26 15:32:57 +02:00
Peter Penz d76b113ad1 Places Panel: Allow hiding of items
Related changes:
- Animate changed items for the details-view in case it is not expandable
- Remove the hardcoded "isHidden"-code in KStandardItemListWidget and
  allow derived widgets to define themselves what means "hidden" within
  their context.

The current code needs a lot of bugfixing, but lets make this in smaller
steps during the next days...
2012-05-01 23:14:52 +02:00
Peter Penz ae4d11d918 Prepare view-engine for non-KFileItem usecase
Up to now the view-engine only provided a model-implementation that
supports file-items. The view-engine always had been designed to be able
to work with any kind of model, so now a KStandardItemModel is available.
The plan is to convert the places panel to the new view-engine. It should
be no problem to fix this until the feature freeze - in the worst case
the places-panel code could be reverted while still keeping the
KStandardItemModel changes.
2012-04-21 21:32:42 +02:00
Peter Penz b2e54c3a31 Implement inline-renaming for the new view-engine
BUG: 286893
FIXED-IN: 4.9.0
2012-04-17 18:15:12 +02:00
Peter Penz 4657459937 Show the ratings as stars instead of text 2012-04-04 00:21:05 +02:00
Peter Penz fdab593c01 Fix focus-rectangle issues
Assure that the focus-rectangle exactly matches to the bottom of
the rendered text.

BUG: 297203
BUG: 289804
FIXED-IN: 4.9.0
2012-04-02 22:20:10 +02:00
Peter Penz a4ede4e0eb Allow showing Nepomuk metadata inside views
Metadata like image-size, rating, comments, tags, ... can be shown
now in the view (e.g. as column in the Details mode).

Still open: The rating-information needs to be shown as stars.

In the context of this feature also the following bugs have been
fixed:
- Fix visual glitches in the header of the Details mode
- Improve the minimum column width calculation to respect also
  the headling and not only the content

BUG: 296782
FIXED-IN: 4.9.0
2012-04-01 16:46:54 +02:00
Peter Penz 793311dac1 KItemListView interface and implementation simplification
- Remove KItemListView::preferredRoleColumnWidth() and allow implementing
  this as part of derived classes from KItemListWidget. Those derived
  classes are aware about the layout and hence also can provide the
  preferred role width.

- Make KItemListView::itemSizeHint() non-virtual and also allow
  implementing the size hint as part of derived classes from KItemListWidget.
2012-03-27 00:48:34 +02: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 475f8b1261 Details view: Allow to turn off expandable folders like in Dolphin 1.7
The option for turning off expandable folders has been removed with
the new view-engine. Due to several requests this option has been
readded again.

As for 4.8.x no new user-interface strings may be introduced, the
line
  ExpandableFolders=false
must be manually added below the section "[DetailsMode]" in the file
~/.kde/share/config/dolphinrc if the expandable-folders feature
should be disabled.

Thanks to H.H. "cyberbeat" for the initial patch!

BUG: 289090
FIXED-IN: 4.8.2
2012-03-09 16:19:19 +01:00
Peter Penz 21a5a890b3 Whitespace cleanups and documentation fixes 2012-02-23 17:28:03 +01:00
Peter Penz 0397658b81 Details view: Fix indicator-branches
Up to now no indicator-branches have been drawn when showing a tree. The patch
fixes this so that that the style-dependent branches are drawn.

The main part of the patch is the implementation of
KItemListView::updateSiblingsInformation(). Most of the other changes are
related due to an internal renaming of the expansionsLevel-role to
expandedParentsCount and some related cleanups.

BUG: 290276
FIXED-IN: 4.8.1
2012-02-14 18:05:29 +01:00
Peter Penz 72af3125a8 Icons view: Layout optimizations
- Assure that landscape-previews use the whole available width of the icon-area
  instead of only using the square width. This waste of space occured if the
  text-width was larger than the icon-width.

- Only use one margin instead of two between the icons and the text to improve the
  visual appearance (thanks to Martin Zilz for the hint)

BUG: 293268
FIXED-IN: 4.8.1
CCMAIL: martin@kreativkonzentrat.de
2012-02-04 22:22:19 +01:00
Peter Penz b2cb38214e Introduce "isExpandable" role
The role is used to determine whether a directory can be expanded at all. This
is e.g. not the case if a directory has 0 items or the target-URL is different
from the item-URL.

The expansion toggle will get hidden if a directory is not expandable.

CCBUG: 288521
2011-12-23 23:19:48 +01:00
Peter Penz 6c29a1d98a Fix icon boundaries issue
The size of the icon boundaries should be as minimal as possible.
The patch for fixing the zooming-issues with the selection resulted
into a minor regression where the icon boundaries might be too large.
This patch remembers the original size of the pixmap to be able
to scale m_iconRect.
2011-12-07 15:34:34 +01:00
Peter Penz d7f89808f7 Apply icon effect for cut items
Fix issue that no icon effect got applied to icons that have
been cut.
2011-11-27 00:29:25 +01:00
Peter Penz ba0c58c221 Fix wrong position of selection-toggle
When switching between view-modes the selection-toggle sometimes
had a wrong position.
2011-11-18 22:05:32 +01:00
Peter Penz fdab9ee644 Fix colors for the selection/hover-area
Thanks to Hugo Pereira Da Costa for pointing this out and
the initial patch!

CCMAIL: hugo@oxygen-icons.org
2011-11-18 20:53:22 +01:00
Peter Penz e560a2f646 Fix selection style issues
Don't use a custom drawing code for showing the hover-indication
or selection of the text.
- The default style for items is used.
- Merge icon-rectangle and text-rectangle if possible.
- Fix background and minor focus-issues
2011-11-13 20:58:43 +01:00
Peter Penz 2438b61d8e Bring back the selection-markers
Still some finetuning is necessary, but lets first bring
back the missing features from Dolphin 1.x to 2.0 before starting
with this.
2011-11-13 16:21:56 +01:00
Peter Penz 517ebd721e Improve group-header layout
- Apply a dynamic width
- Use a height that depends on the style
- Cleanup some interfaces and replace xxxBoundingRect() by
  xxxRect()
2011-10-23 21:32:35 +02:00
Peter Penz 740e956932 Fix size-hint calculation in KFileItemListView
The current approach works fine but should be replaced in the longterm
by a helper class shared by KFileItemListWidget and
KFileItemListView to share information that is required to
calculate the size hints in KFileItemListView and to represent
the actual data in KFileItemListWidget.
2011-09-24 00:20:24 +02:00
Peter Penz 63e1e3bc14 Change signature of setVisibleRoles()
Simply use a QList<QByteArray> instead of QHash<QByteArray, int>.
2011-09-20 15:20:16 +02:00
Peter Penz c7272df5c1 Improve cache handling in KItemListWidget
Provide a hook for derived KItemListWidget where the cache
can be updated.
2011-09-09 20:35:57 +02:00
Peter Penz f0debd9377 Version control: show pixmap overlays for the version state 2011-09-08 20:29:27 +02:00
Peter Penz b8c718a6fd First step to reactivate version control plugin functionality
- Add a DolphinFileItemListWidget that provides icon-overlays
  and colored text for the version state (implementation is
  missing yet)
- Allow KFileItemListWidget to have custom text colors
- Update interface of VersionControlObserver to work with
  KFileItemModel instead of the old model-interface.
2011-09-06 23:45:41 +02:00
Peter Penz 188d1a9c7d Move drawing of textbackground to KItemListWidget
As the textbounding-rectangle is now a property of KItemListWidget
also the default visual appearance is moved now from
KFileItemListWidget to KItemListWidget.
2011-08-14 16:11:57 +02:00
Peter Penz 5472115751 Rename KItemListWidget::hoverBoundingRect()
It has been split now to iconBoundingRect() and textBoundingRect().
This is required to implement the rubberband in an efficient way
and makes it more explicit what rectangle is returned.
2011-08-14 15:47:31 +02:00
Peter Penz 3957884bf2 Improvements for selections, smooth scrolling, tooltips and info-panel 2011-08-09 16:22:36 +02:00
Peter Penz f23e9496f3 Merged very early alpha-version of Dolphin 2.0
Dolphin 2.0 will get a new view-engine with the
following improvements:
- Better performance
- Animated transitions
- No clipped filenames due to dynamic item-sizes
- Grouping support for all view-modes
- Non-rectangular selection areas
- Simplified code for better maintenance

More details will be provided in a blog-entry during
the next days.

Please note that the code is in a very
early alpha-stage and although the most tricky parts
have been implemented already very basic things like
drag and drop or selections have not been pushed yet.
Those things are rather trivial to implement but this
still will take some time.
2011-07-30 20:13:41 +02:00