Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to Gtk4 #2082

Draft
wants to merge 458 commits into
base: master
Choose a base branch
from
Draft

Port to Gtk4 #2082

wants to merge 458 commits into from

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Sep 7, 2022

Fixes #1941
Fixes #2033
Fixes #631

Very much a work in progress but pushing for visibility.

Complicated chains of signals are replaced where possible with actions on the main window and its main children, which can be activated directly by child widgets. Where possible classes are merged and abstract classes replaced by interfaces.Convenience functions and properties are maintained only if much used.

The initial aim is to produce the simplest possible code (using best features of Gtk4) that produces an acceptably similar UX to the current master. Animations and extreme corner cases are left for now.

In the interest of simpler code and not supporting both dynamic lists and TreeModel/CellRenderers the List View only supports a single level (using Gtk.ColumnView). We already have a horizontally expandable view in Files.ColumnView. It may be possible to reimplement expandable rows with a TreeListModel at a later date.

  • Comment out or modify anything that does not compile
  • Replace DynamicNotebook with Adwaita widgets
  • Use Adw.Headerbar
    • Reimplement forward/back popdown menus
  • Replace Handy with Adwaita
  • Replace IconView with GridView
  • Use EventControllers
  • Use PopoverMenus
  • Rework PrivacyModeOn placeholder
  • Rework Sidebar drag and drop
    • Row animation
    • Drop file between row
    • Drop file onto row
    • Reorder rows
    • Correct default actions
    • Honor keyboard and button state
  • Rework View Drag and Drop
    • Unmodified Primary drag with correct preferred action
    • Modified Primary drag with correct action ( to force ASK)
    • Secondary drag to force ASK action
  • Replace Files.ColumnView/Miller with GridView/MultiSlot with one column of vertically laid out items
  • Replace Gtk.TreeView with Gtk.ColumnView to avoid CellRenderers altogether
    • Basic implementation
    • Implement subdirectories
      • Load subdirectories into expandable rows
      • Fix file operations on subdirectories
    • Implement column header click sorting
      • Add sorters to each column
      • Fix sorting directories first in reverse
    • Implement column header context menu
  • Replace multipurpose LocationBar with stack of separate widgets
    • Create basic pathbar with breadcrumbs and path entry only
    • Add action button(s) to path entry
    • Add context menu to breadcrumbs
    • Add completion to entry
    • Add icons to breadcrumbs for special directories
    • Add search functionality
    • Reimplement animation (if desired)
    • Implement dropping files on breadcrumb
  • Modify MultiSlot (Miller) view so that it works with new widgets (simplify where possible)
    • Make MultiSlot not an AbstractSlot but member of ViewContainer
    • Replace AbstractSlot with simpler SlotInterface
    • Move Paned widgets from Slot to MultiSlot
    • Lose Slot list in MultiSlot
    • Unlink Slot and ViewContainer, use win actions instead
    • Reimplement key control
    • Reimplement smart scrolling
    • Reimplement animation (simple)
  • Reimplement Connect Server Dialog (same design)
  • Get plugins working
    • Update plugin interface
    • Get trash plugin working
    • Get color tag plugin working
    • Get git plugin working
    • Get cloud plugin working
    • Get contractor plugin working (still needed?)
  • Improve performance of view with large folders
    • Add initial files to model without sorting and disconnected from view
  • Find and Fix memory leaks
  • Find and fix RTL issues
  • Find and fix locale issues (multibyte character, different keyboard layout)

@jeremypw
Copy link
Collaborator Author

jeremypw commented Sep 7, 2022

Current appearance. ViewMode buttons moved to balance central widget in Adwaita headbar.

Screenshot from 2022-09-07 19 51 27

@jeremypw
Copy link
Collaborator Author

MultiSlot (Miller) View (temporarily using GridView pending development of new ColumnView)
Screenshot from 2022-11-18 17 01 43

IconView (just uses the expanded first column of MultiSlot)
Screenshot from 2022-11-18 17 05 34

@jeremypw
Copy link
Collaborator Author

Multislot view using GridView with modified GridViewItems:
Screenshot from 2022-11-19 16 48 46

@jeremypw
Copy link
Collaborator Author

jeremypw commented Apr 2, 2023

Comparison of PR (bottom) and master (top) in IconView at small window size.
DIFFERENCES NOTED:

  • PR lays out fileitems more compactly (difference varies depending on window/icon size)
  • The sidebar bookmarks are more spaced out when can drop between (regression)
  • The emblem is smaller and does not overlay the icon (regression)
  • The PR pathbar is more readable - scrolls horizontally. (improvement)
  • Some PR Headerbar icons smaller (regression)
  • Headerbar vertical margins bigger (gtk4 stylesheet ?)
    Screenshot from 2023-04-02 16 22 39

@jeremypw
Copy link
Collaborator Author

jeremypw commented Apr 2, 2023

Comparison of ListView between master (top) and PR (bottom).

ISSUES NOTED:

  • In this case master is more compact for the same icon size
  • PR is truncating the date in the modifed column
    Screenshot from 2023-04-02 16 55 06

@jeremypw
Copy link
Collaborator Author

jeremypw commented Apr 2, 2023

Comparison of ColumnView between master (top) and PR (bottom) after navigating from /usr to `/usr/share/glib-2.0

ISSUES NOTED:

  • Master is more compact for the same icon size
  • Master keeps the clicked folders selected (hence showing the overlaybar)

Screenshot from 2023-04-02 17 08 22

@jeremypw
Copy link
Collaborator Author

Leaving open to aid incorporating changes into new development focus main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port to GTK4 Doesn't select file Simpler path bar
1 participant