Accéder au contenu principal

Boxes' thumbnails overhaul

I recently spent quite some time reworking the overall look of Boxes' machine thumbnails. Here is the result.

Boxes' new thumbnails

Stopped boxes

Up until now, Boxes' stopped machines were represented by a black box. It was nice as it represented the idea of a shut down screen, but it was pretty hard to differentiate a stopped machine from a running one displaying a black screen. This was stated in bug #730258 where Jimmac suggested to follow this design where thumbnails are draw as gray frames with a medium sized emblem in their center, using the system-shutdown-symbolic icon to suggest the stopped state.

Boxes' old thumbnail for stopped machines Boxes' new thumbnail for stopped machines
Boxes' thumbnail for stopped machines: old (left) and new (right)

Updating the other thumbnails

Machines under construction used to simply display their thumbnail with a spinner on top. This doesn't change but stopped machines being constructed now display their spinner in a frame, to be consistent with the new thumbnail for stopped machines.

Boxes' old thumbnail for machines being imported Boxes' new thumbnail for machines being imported
Boxes' thumbnail for machines being imported: old (left) and new (right)

The default thumbnail for machines was a big computer-symbolic icon. It have been changed to the new gray frame style, keeping the computer-symbolic icon as the thumbnail's emblem.

Boxes' old default machine thumbnail Boxes' new default machine thumbnail
Boxes' default machine thumbnail: old (left) and new (right)

Thumnails are now consistent, elegant, and the machine's status is more understandable.

Working on this feature helped me to discover bug #751494: GDMainIconView draw pictures without their last column of pixel.

Favorites

The way a machine is shown as favorite has also been revamped. A big heart shaped icon (the emblem-favorite-symbolic icon) was added to the bottom right corner of the thumbnail, and this was causing multiple problems (see bug #745757):

  • the standard icon to show something is favorited is a star (the starred-symbolic icon),
  • and more importantly, its position was conflicting with the one of the selection checkbox!
Boxes' old emblem for favorite machines Boxes' new emblem for favorite machines
Boxes' emblem for favorite machines: old (left) and new (right)

A machine is now shown as favorited by adding a tiny star to the bottom left corner of its thumbnail.

Unfortunately, problems still exist as the white star becomes invisible on a white thumbnail (see bug #751478). I tried to solve this problem, by making the star casting a shadow, which worked well but it required me to implement a blurring function into Boxes' code, adding 100 lines of Vala to an already complex codebase for one tiny functionality which has nothing to do with the application's domain, hence this solution haven't been retained.

The emblem for favorite machines is invisible on a white thumbnail Adding a shadow under the emblem solves this problem
The 'favorites' emblem with and without a shadow

Zeeshan suggested trying to solve this by using the image's energy, as the code to do such a thing already exists. This solution still has to be explored.

Commentaires

Posts les plus consultés de ce blog

GTK+ Apps on Phones

As some of you may already know, I recently joined Purism to help developing GTK+ apps for the upcoming Librem 5 phone . Purism and GNOME share a lot of ideas and values, so the GNOME HIG and GNOME apps are what we will focus on primarily: we will do all we can to not fork nor to reinvent the wheel but to help allowing existing GTK+ applications to work on phones. How Fit are Existing GTK+ Apps? Phones are very different from laptops and even tablets: their screen is very small and their main input method is a single thumb on a touchscreen. Luckily, many GNOME applications are touch-friendly and are fit for small screens. Many applications present you a tree of information you can browse and I see two main layouts used by for GNOME applications to let you navigate it. A first kind of layout is found in applications like Documents, I'll call it stack UI : it uses all the available space to display the collection of information sources (in that case, documents), clicking a...

libhandy 0.0.10

libhandy 0.0.10 just got released, and it comes with a few new adaptive widgets for your GTK app. You can get this new version here . The View Switcher GNOME applications typically use a GtkStackSwitcher to switch between their views. This design works fine on a desktop, but not so well on really narrow devices like mobile phones, so Tobias Bernard designed a more modern and adaptive replacement — now available in libhandy as the HdyViewSwitcher . In many ways, the HdyViewSwitcher functions very similarly to a GtkStackSwitcher : you assign it a GtkStack containing your application's pages, and it will display a row of side-by-side, homogeneously-sized buttons, each representing a page. It differs in that it can display both the title and the icon of your pages, and that the layout of the buttons automatically adapts to a narrower version, depending on the available width. We have also added a view switcher bar, designed to be used at he bottom of the window: HdyView...

Boxes' hardening sprint: two weeks in

Finishing my 4th year of CS studies I spent the last two weeks working hard on the report and the presentation of the project my colleagues and I worked on all the semester long: creating the Stibbons multi-agent system programming language and development environment. I am very proud of what we accomplished and I’ll probably present it to you in the upcoming weeks. =) Planning the port of Boxes' installation wizard to GtkAssistant All this work unfortunately let me little time to work on Boxes, but I nonetheless took some time to look at how its installation wizard is implemented and planned how to port it to GtkAssistant. Boxes' installation wizard Currently, the wizard is ordered that way: WizardWindow WizardToolbar: the toolbar containing the navigation buttons Wizard: the stack of pages Most of the wizard’s intelligence seems to lie in Wizard and its pages, I’ll have to dig further into Boxes' code in order to fully understand h...