Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Krita Krita
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Bugzilla
    • Bugzilla
  • Merge requests 77
    • Merge requests 77
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • GraphicsGraphics
  • KritaKrita
  • Merge requests
  • !1258

Reduce length of recent file menu item text and limit the number of files shown in menu

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Alvin Wong requested to merge alvinwong/krita:alvin/recent-files-menu into master Dec 24, 2021
  • Overview 2
  • Commits 2
  • Pipelines 4
  • Changes 2

https://bugs.kde.org/show_bug.cgi?id=447332

Note that we only hide excessive items in the menu but not the list on the welcome screen. The welcome screen has a scroll bar for the recent files list so it is at least manageable.

The way I limit the items is to hide the QAction in KRecentFilesAction instead of outright removing them, because the model for the welcome screen still depends on the state of KRecentFilesAction. This also means the file icons are still loaded regardless of whether the item is visible on-screen (but this is not a regression).

In the future, we can add a "More Recent Files..." action to show a pop-up with the full recent files listing and a text box for searching from the list. (Inspiration from VSCode but I'm sure there are other software with similar features.)

Test Plan

(Tell us how to test the changes you made.)

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • n/a I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: alvin/recent-files-menu