1. 19 Nov, 2017 1 commit
    • Andreas Krutzler's avatar
      Fix scrolling during inline renaming causes rename of wrong file · 5bee1889
      Andreas Krutzler authored
      Summary:
      Scrolling during inline renaming accepts the renaming now, like if one would hit Return for example. I chose this approach because it seems the easiest way to fix this.
      This also fixes the “possible” Ui glitch where the renaming KTextField doesn’t move along with the list item. Possible glitch, because I don’t know if this is intentional, but for me it looks broken.
      
      BUG: 378786
      Fixes T7443
      
      Test Plan:
      * Enable "Rename inline" in dolphin settings
      * Go to a folder where you have to scroll through items (many files, big zoom,…)
      * Start to rename a file (context menu, F2, …)
      * Scroll with mouse wheel
      * Rename  accepted -> file is renamed
      
      Reviewers: ngraham, rkflx, #dolphin, elvisangelaccio
      
      Reviewed By: ngraham, rkflx, #dolphin, elvisangelaccio
      
      Subscribers: anthonyfieroni, elvisangelaccio, #dolphin
      
      Maniphest Tasks: T7443
      
      Differential Revision: https://phabricator.kde.org/D8822
      5bee1889
  2. 06 Feb, 2017 1 commit
  3. 13 May, 2016 1 commit
    • Marco Martin's avatar
      use selected icon state for selected sidebar item · 4453d62f
      Marco Martin authored
      Since now the breeze icons can be recolored by kiconloader
      with svg stylesheets, use this feature to recolor the
      currently selected icon in the sidebar and in the
      details view (not the icon view)
      look wouldn't change if used with icon themes that
      don't support this feature
      This makes it look more in line with the breeze style
      
      REVIEW:127877
      4453d62f
  4. 26 Apr, 2016 1 commit
    • Wolfgang Bauer's avatar
      Specify a fallback icon to QIcon::fromTheme() · 44d4d2ea
      Wolfgang Bauer authored
      The default fallback of QIcon::fromTheme() is QIcon(), i.e. a null icon.
      Set the generic "unknown" icon as fallback to prevent missing icons for
      filetypes that specify an icon name that doesn't exist.
      
      This also gets rid of "QPixmap::scaled: Pixmap is a null pixmap"
      warnings in that case.
      
      BUG: 358958
      BUG: 361034
      FIXED-IN: 16.04.1
      REVIEW: 127713
      44d4d2ea
  5. 16 Mar, 2016 1 commit
  6. 27 Mar, 2015 1 commit
  7. 25 Mar, 2015 1 commit
  8. 24 Feb, 2015 1 commit
  9. 06 Feb, 2015 1 commit
  10. 10 Nov, 2014 1 commit
  11. 27 Oct, 2014 1 commit
  12. 21 Oct, 2014 1 commit
  13. 18 Oct, 2014 2 commits
  14. 12 Sep, 2014 1 commit
  15. 04 Aug, 2014 1 commit
  16. 03 Jul, 2014 1 commit
    • Frank Reininghaus's avatar
      Improve drawing selected items in Compact/Details View and Places Panel · 20e13c31
      Frank Reininghaus authored
      This commit removes the icon tinting for the selected item in Compact
      and Details View, and extends the selection rectangle such that it
      includes the icon area as well. The icon tinting can be disturbing, and
      having a selection rectangle that only includes the text can look a bit
      strange, especially in the Places Panel.
      
      BUG: 304643
      REVIEW: 119018
      FIXED-IN: 4.14.0
      20e13c31
  17. 29 Jun, 2014 1 commit
  18. 05 Jun, 2014 1 commit
    • Frank Reininghaus's avatar
      Separate width and height info in the layouting code · e07468c7
      Frank Reininghaus authored
      By separating the width and height info, we can save some unnecessary
      overhead in terms of memory and CPU cycles, and make the calculation of
      the height of a row (or the width of a column in Compact View) a bit
      simpler.
      
      To achieve this, this patch extends the concept of "logical rows"
      (which are actually columns in Compact View) to "logical width" and
      "logical height" (which is the actual height and width, respectively, in
       Compact View). The distinction between rows/columns and "logical"
      rows/columns may be a bit confusing, but the confusion is already in the
      current code, and I hope that it will be mitigated a bit by prefixing
      the corresponding variables with "logical".
      
      REVIEW: 118454
      e07468c7
  19. 05 May, 2014 1 commit
    • Alex Richardson's avatar
      dolphin: convert kitemviews/ to qt5 signal slot syntax · bb642c92
      Alex Richardson authored
      This conversion was performed automatically using convert2qt5signalslot.
      The only manual changes required were changing the overloaded signal
      KDirLister::redirection and KDirLister::completed from KUrl to QUrl. All
      other cases were no problem since these signals are not overloaded and a
      static_cast for disambiguation is not necessary.
      
      Code inside HAVE_BALOO is not converted yet, will do that once I can build
      a version with Baloo.
      bb642c92
  20. 14 Apr, 2014 1 commit
    • Frank Reininghaus's avatar
      Update the "is cut" state of items if necessary · a7562862
      Frank Reininghaus authored
      The icons of items which are "cut" are shown faded in the view. The
      "is cut" state of the widget representing an item is updated if the
      clipboard contents change. Before this commit, if the sort order was
      changed however, then each widget kept the "is cut" state of the item
      which had been shown previously at its position.
      
      The solution is to update the "is cut" state also if any of the
      widget's data change.
      
      BUG: 332792
      REVIEW: 117451
      FIXED-IN: 4.12.5
      a7562862
  21. 05 Mar, 2014 1 commit
  22. 24 Feb, 2014 1 commit
    • Frank Reininghaus's avatar
      Make the handling of the "maximum text lines" setting more robust · 342822e8
      Frank Reininghaus authored
      If the user sets a maximum number of text lines in the settings, this
      number was translated into a maximum height in pixels using
      QFontMetrics::lineSpacing() before this commit.
      
      In KStandardItemListWidgetInformant::itemSizeHint(), this maximum height
      limited the size that is reserved for the item.
      
      However, in KStandardItemListWidget::updateIconsLayoutTextCache(), the
      maximum height was translated back into a maximum number of lines,
      which limits the number of lines that are created using the QTextLayout.
      
      This approach could lead to problems if the real height of the layouted
      text is 1 pixel more or less than QFontMetrics::lineSpacing() times
      "number of lines".
      
      Now we do not store a "maximum height" inside the "maximum size"
      explicitly, but store a maximum number of lines and a maximum with (for
      Compact View) separately, and then use the number of lines also to
      calculate the required size in
      KStandardItemListWidgetInformant::itemSizeHint(). This should make sure
      that the correct height is reserved for each item.
      
      Thanks to Christoph Feck and Emmanuel Pescosta for helping to debug this
      problem and testing the patch.
      
      BUG: 323841
      FIXED-IN: 4.13
      REVIEW: 113871
      342822e8
  23. 12 Jan, 2014 1 commit
    • Emmanuel Pescosta's avatar
      Calculate all item size hints at once. · 3ff6e834
      Emmanuel Pescosta authored
      The speed up is really small, but theses changes are mostly straightforward and make the code a bit nicer - break
      the KStandardItemListWidgetInformant::itemSizeHint beast into three smaller functions.
      
      FIXED-IN: 4.13
      REVIEW: 112979
      3ff6e834
  24. 02 Dec, 2013 1 commit
    • Frank Reininghaus's avatar
      Lazy-load the item data also in Compact View · 03f8c373
      Frank Reininghaus authored
      The recent changes which prevent that all data for each item are saved
      in a QHash already when loading the folder (see
      https://git.reviewboard.kde.org/r/112725/), which save both memory and
      time, do not work yet in Compact View, because
      KItemListWidgetInformant::itemSizeHint() calls the model's data(int)
      method for every item, which then initializes the hash.
      
      This patch prevents that by accessing the file name directly if only
      the "Name" is shown in the view, just like it's done in Icons View.
      
      REVIEW: 113849
      03f8c373
  25. 09 Oct, 2013 1 commit
  26. 04 Sep, 2013 1 commit
    • Frank Reininghaus's avatar
      Try to avoid calling the model's data method if only "text" is needed · 8f7c3619
      Frank Reininghaus authored
      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
      8f7c3619
  27. 25 Aug, 2013 1 commit
    • Frank Reininghaus's avatar
      Fix filename trucation issues in Icons View with maximum number of lines · f830e117
      Frank Reininghaus authored
      When the name of a file is too long to be shown inside the maximum
      number of lines, the last line is elided. However, there were several
      problems before this commit:
      
      (a) "lastTextLine", which contains the text to be elided, was not
          assigned the complete remaining text, but only the part that would
          be put into the last line if there were more lines following. This
          may be less than what would fit into the line because we try to not
          break the text at random points.
      
      (b) QFontMetrics::elidedText() was not given the width that is available
          for the last line (that would be maxWidth), but only the width that
          would be occupied by the text if there were more lines following
          (line.naturalTextWidth()).
      
      (c) The variable "nameWidth", which is required to calculate the QRectF
          that is reserved for the name, was not updated correctly.
      
      The result is that the text was sometimes trucated too early (especially
      if there would be a line break early in the text if we had more lines
      available), that there may be insufficient space to show the "...", and
      that the hover/selection rectangle might be too narrow.
      
      BUG: 304558
      BUG: 321882
      FIXED-IN: 4.11.1
      REVIEW: 112265
      f830e117
  28. 24 Aug, 2013 1 commit
  29. 14 Aug, 2013 2 commits
    • Frank Reininghaus's avatar
      Do not store default values in QHash<QByteArray, QVariant> · 59723fca
      Frank Reininghaus authored
      Storing values which are equivalent to default-constructed QVariants
      does not make much sense because QHash::value returns the same value
      even if the corresponding key is not found in the hash.
      
      This commit reduces Dolphin's memory consumption in large folders by
      up to 7.3% (tested a folder with 100,000 files in Details View) and
      reduces the time required for loading a folder.
      
      BUG: 323517
      FIXED-IN: 4.11.1
      REVIEW: 111922
      59723fca
    • Frank Reininghaus's avatar
      Fix slow scrolling when hidden files or symbolic links are shown · fd5ba3b4
      Frank Reininghaus authored
      The problem was that we drawed the overlays using KIconLoader, which can
      be very slow, every time an item appeared on the screen. This commit
      makes sure that not only the icon, but the icon including overlays is
      cached in QPixmapCache. Therefore, the overlay drawing is done just once
      for each icon+overlays combination.
      
      For previews, the overlay drawing is done in KFileItemModelRolesUpdater
      just after the preview is received.
      
      BUG: 310662
      BUG: 314339
      FIXED-IN: 4.11.1
      REVIEW: 111956
      fd5ba3b4
  30. 26 Jun, 2013 1 commit
  31. 10 Jun, 2013 1 commit
    • Frank Reininghaus's avatar
      Do not rename files unexpectedly when changing the URL · 15b34a0d
      Frank Reininghaus authored
      If the role editor loses focus, it considers the current renaming
      operation finished, and tells DolphinView to rename the file. This is a
      problem when changing the directory, because the URL change happens
      before DolphinView receives the signal, which results in a file in the
      new directory being renamed unexpectedly.
      
      The solution is to establish the connection to the
      slotRoleEditingFinished signal only when the "rename inline" editor is
      opened, and disconnect it when renaming is finished or canceled or the
      URL changes.
      
      BUG: 319912
      FIXED-IN: 4.10.5
      REVIEW: 110908
      15b34a0d
  32. 02 May, 2013 1 commit
  33. 12 Apr, 2013 1 commit
  34. 21 Mar, 2013 1 commit
    • Aurélien Gâteau's avatar
      Fix transition between m_pixmap and m_hoverPixmap · e2a89fc2
      Aurélien Gâteau authored
      The default SourceOver composition mode of QPainter cannot be used
      to interpolate between two images, we must use intermediate buffers
      to perform the interpolation and blend the result on the widget.
      
      More details are available in the review request.
      
      REVIEW: 109614
      FIXED-IN: 4.10.2
      e2a89fc2
  35. 11 Feb, 2013 1 commit
  36. 11 Jan, 2013 1 commit
    • Frank Reininghaus's avatar
      Slightly reduce the tinting for selected icons and previews · d3b92d2d
      Frank Reininghaus authored
      The intention of the tinting was to make it more obvious in icons view
      which icons are selected. However, some icons and previews look quite
      ugly with the current tinting value of 1.0 (i.e., the value passed to
      KIconEffect::colorize). A slight reduction of this value to 0.8 makes
      this a little less ugly. However, the real fix is to remove the tinting
      altogether and find something better to indicate which items are
      selected.
      
      CCBUG: 309722
      d3b92d2d
  37. 07 Dec, 2012 1 commit
  38. 05 Nov, 2012 1 commit
    • Frank Reininghaus's avatar
      Prevent crashes caused by nested event loops run when renaming inline · c0559a2a
      Frank Reininghaus authored
      When renaming inline and starting a drag or invoking the context menu,
      a nested event loop will be run. If the role editor loses focus and
      emits roleEditingFinished(), we must prevent that deleteLater() is
      called because this would delete the role editor inside a nested event
      loop which is run from one of its own functions. We would get a crash
      when returning from that event loop otherwise.
      
      BUG: 308018
      BUG: 309421
      FIXED-IN: 4.9.4
      c0559a2a