Re: [PATCH] Zooming for icons in list view + MVC design problem?



On 29 Apr 2002, David Emory Watson wrote:

> Upside: This patch makes the icons in the list view zoomable.
> 
> Downside: FMListModel contains the pixbufs used in FMListView, thus in
> order to implement zooming I had to change code in the model.  My
> question is: isn't this a MVC design problem?  Shouldn't the view be
> independent of the model?
> 
> If this isn't a big deal, well, great! :)
> 
> Otherwise, can anyone see a way around this without redesigning
> FMListModel (probably too late in the game for that...)?

Another way would be to have several columns. One for each zoom level. 
Then change which column the pixbuf rendered shows.

Dunno which one is best.

Shouldn't the change_zoom_level in your version emit changed for every row 
though? Otherwise the view won't notice something changed.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an immortal Amish gentleman spy on the run. She's a radical communist 
bounty hunter on the trail of a serial killer. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]