Skip to content

Commit

Permalink
DeskTop: Allow selection in list views
Browse files Browse the repository at this point in the history
This constitutes two changes:

* Adds support to IconTK for a "small icon" flag where the icon is
  in-line with and the same height as the label.

* Reworks DeskTop to use "small icons" for the list view, effectively
  as an overlay on top of the other columns.

Because all views now have icons, this actually removes many special
cases and saves bytes in main memory.

Room for future improvement:

* Selection is lost when changing view type. This is not a regression
  since it was previously lost anyway, but would be nice to fix.

* Renaming an icon when View > by Name is selected causes the window
  to refresh to reflect the new sort order. Ditto.

* Now that list views are not useless, it would be nice to
  save/restore the view type in addition to the window bounds across
  restarts.

Resolves #28
  • Loading branch information
inexorabletash committed Oct 22, 2022
1 parent a099ac4 commit 988b88f
Show file tree
Hide file tree
Showing 9 changed files with 362 additions and 231 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Project Page: https://github.com/a2stuff/a2d
* CD-ROM drives now shown with a CD icon.
* Unhighlight more correctly when dragging icons over folders.
* Show keyboard shortcut for File > Delete in menu.
* Support selection in list views. ([#28](https://github.com/a2stuff/a2d/issues/28))

### Disk Copy

Expand Down
7 changes: 5 additions & 2 deletions desktop/internal.inc
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@ kWindowHeaderHeight = 14
;;; --------------------------------------------------
;;; List views

kFirstRowBaseline = 16
kListViewInitialTop = kWindowHeaderHeight + kIconBBoxPaddingTop
kListViewInitialLeft = 4

kListViewFirstBaseline = kListViewInitialTop - 2
kListViewWidth = 410
kListViewRowHeight = kSystemFontHeight + 1
kListViewRowHeight = kListItemHeight

;;; --------------------------------------------------
;;; Icon views
Expand Down

0 comments on commit 988b88f

Please sign in to comment.