Implementing an image browser application
This application will load a directory that contains some images, provide a summary of the content in a status bar at the bottom of the window, and use most of the space to show each image. The images will be loaded as thumbnails (smaller versions of the images) and we will display the image information under each thumbnail.
Creating the layout
To start this example, we will create the layout of the application and the image items that will display in the central grid. Let's understand each of these actions in detail:
- First, we set up the image items. We wish to have the image name underneath the image. While this could be positioned manually, the items will be more responsive to changes in size if we use
BorderLayout
. We will create acanvas.Text
element in thebottom
position and usecanvas.Rectangle
to represent the image that we will load later:func makeImageItem() fyne.CanvasObject { label...