Skip to content

gui_toolkit 0.329.0

Choose a tag to compare

@sachahjkl sachahjkl released this 19 Nov 16:42
· 480 commits to master since this release
v0.329.0
81d6e44

Added

  • The file browser's views: a button at the end of its bar opens a menu of the list's views (details, names, columns, cards of four sizes); Ctrl+wheel over the list and Ctrl+= / Ctrl+- in it step them. A card shows the file's thumbnail (the computer's pictures, the system's thumbnails of other files, a program's source through File_Source.thumbnail) or its kind's icon, and its size. Several files are selected with a rectangle. Each dialog remembers its view by its remember_id; the preview is the same in every view.
  • Thumbnails of files: File_Source.thumbnail asks a source for a picture of a file, answered with pixels by file_reply_thumbnail, so a server's source can make its own. local_files() decodes the pictures gt:image reads (a large one read from, and kept in, the system's cache) and gives the system's thumbnail for the other files. Thumb_Cache keeps them as textures under a count and a byte budget: only the cards built ask, the newest first and a few at a time, an ask whose card scrolled away is dropped, and what is on screen is never evicted (thumb_cache_get, thumb_cache_frame, thumb_picture, thumb_key).
  • A table's views (Table.zoom): the same rows as details, as names alone, as names in columns scrolled sideways, or as cards at four sizes (a picture, the name cut in its middle with its extension kept, a weak line), the filter, the sort and the selection the same in every view. In the grid the arrows move by card and by row, in the columns view by name and by column. Table.zoom_keys gives Ctrl+wheel and the zoom keys to the table (Table_Events.zoomed), Table.rubber_band selects the items a rectangle covers (Escape gives the selection back). table_zoom_step, table_set_zoom, table_set_view, table_zoom_label, table_zoom_icon, table_zoom_key; for a program's own view of items, item_move_target and Item_Band. A table starts in Details, as before.