ignatenkobrain / gnome-news

GNU General Public License v3.0
20 stars 7 forks source link

Open images in a light box #81

Open allanday opened 8 years ago

allanday commented 8 years ago

Currently, when you click on an image, it is opened in a browser tab. It would be better to display the image in News instead, using a light box.

There's a wireframe for this in the mockups:

https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/news/news-wires.png

ignatenkobrain commented 8 years ago

@mcatanzaro I've implemented handling image clicks in 0d282fd9937db275609825ba98005ced0f715813. Probably this might be extension, but I have noe experience how to write it. How code looks for you ?

brunelli commented 8 years ago

@allanday Is there a specific widget for a lightbox, or it would be just a custom GtkDialog, or something done with HTML5? (Just for the sake of curiosity, because I'm implementing something similar in one of my projects...)

felipeborges commented 8 years ago

@ianbrunelli there's no specific widget for that in Gtk, but that could be easily written using GtkOverlay. I've written this snippet to show what I have in mind: https://gist.github.com/felipeborges/01d1097b3beddc81e8b6 of course it'd be way more polished in a real life implementation.

P.S. (in case you can't run the snippet) screencast from 08-11-2015 10-05-21 pm

brunelli commented 8 years ago

@felipeborges Very nice. It will indeed be a good addition to News.

I don't think that's the solution that better fits my app, though.