1. 20 Aug, 2021 2 commits
  2. 31 Jul, 2021 1 commit
    • James Westman's avatar
      network-tile-source: Read into a GBytes · f91e574d
      James Westman authored
      When receiving tiles from the server, read them into a GBytes first
      using GMemoryOutputStream, then stream them into a pixbuf. This allows
      us to skip re-encoding the pixbuf later when we save it to the file
      cache.
      f91e574d
  3. 28 Jul, 2021 1 commit
    • James Westman's avatar
      Add support for rotation · c54ed6c6
      James Westman authored
      Add support for rotating the map using touchscreen/trackpad gestures.
      This involved changing the gesture tracking code to support zooming and
      rotating at the same time. Also, some of the viewport methods had to be
      changed since the calculations now depend on both coordinates.
      c54ed6c6
  4. 23 Jul, 2021 2 commits
  5. 06 Jul, 2021 5 commits
    • Corentin Noël's avatar
      map: Rename ShumateView into ShumateMap · 41944bb6
      Corentin Noël authored and Corentin Noël's avatar Corentin Noël committed
      Makes it clearer that it is the widgets that shoes a map.
      41944bb6
    • James Westman's avatar
      map-layer: Fix flashing when zoom level changes · f4eb91d1
      James Westman authored and Corentin Noël's avatar Corentin Noël committed
      Previously, the screen would flash every time the zoom level changed.
      This was because the tiles from the previous zoom level were all deleted
      as soon as the zoom level changed.
      
      Now, those old tiles are kept around until all the tiles at the new zoom
      level are loaded. This provides something to fill the screen while the
      tiles load.
      
      This commit also simplifies the size_allocate logic. Instead of
      iterating through the expected tile locations and finding them in the
      hash table, it iterates the hash table directly and calculates the
      correct location for each tile.
      f4eb91d1
    • James Westman's avatar
      tile: Use widget size rather than texture size · 31b94b2a
      James Westman authored and Corentin Noël's avatar Corentin Noël committed
      Draw the tile texture to cover the widget, rather than at the size of
      the texture, since they may be different.
      31b94b2a
    • James Westman's avatar
      map-layer: Move logic out of size_allocate · ee550bd6
      James Westman authored and Corentin Noël's avatar Corentin Noël committed
      Move a lot of the tile grid logic out of size_allocate into
      recompute_grid(). This is neater since size_allocate isn't really
      supposed to modify the content of the widget, only position it on
      screen.
      
      Part of this change is that tiles are stored in the hash map by their
      unwrapped grid coordinates, not by coordinates in the screen grid. This
      makes much of the logic simpler, especially the logic around
      invalidating tiles. Also, tiles are no longer reused; once a tile is
      created, its x/y/zoom will not change, and it will be deleted and
      replaced when it moves out of view.
      ee550bd6
    • James Westman's avatar
      map-layer: Use hash table instead of pointer array · 2a33b579
      James Westman authored and Corentin Noël's avatar Corentin Noël committed
      Store the tiles in a hash table rather than a pointer array. This is a
      more suitable data structure since we often look up tiles by their grid
      position, and hash tables can still be easily iterated.
      2a33b579
  6. 01 Jul, 2021 1 commit
  7. 30 Jun, 2021 1 commit
  8. 21 Jun, 2021 2 commits
  9. 18 Jun, 2021 2 commits
  10. 08 Jun, 2021 1 commit
  11. 04 Jun, 2021 2 commits
  12. 23 May, 2021 1 commit
  13. 22 May, 2021 1 commit
  14. 20 May, 2021 3 commits
  15. 18 May, 2021 1 commit
  16. 17 May, 2021 1 commit
  17. 12 May, 2021 1 commit
    • James Westman's avatar
      marker: Remove global selection color variables · eb46a131
      James Westman authored
      ShumateMarker no longer draws any selection color--it's just a container
      for other widgets. Besides, global variables wouldn't be a good way to
      do this anyway. We could get the selection color from the GTK theme if
      we needed.
      
      Fixes #19.
      eb46a131
  18. 06 May, 2021 2 commits
  19. 19 Apr, 2021 1 commit
  20. 17 Apr, 2021 3 commits
  21. 09 Apr, 2021 1 commit
  22. 08 Apr, 2021 1 commit
    • James Westman's avatar
      file-cache: Fix bug when updating tiles · 14f77633
      James Westman authored
      When store_tile() was called and the tile already existed in the cache,
      it would fail to overwrite it, because it was using
      g_file_create_async() instead of g_file_replace_async().
      14f77633
  23. 07 Apr, 2021 4 commits