On Sat, 2003-03-22 at 23:40, Luc Pionchon wrote:
> On 20 Mar 2003 18:35:06 +1030
> Robert Mibus <mibus_at_iprimus.com.au> wrote:
>
> > On Mon, 2003-03-17 at 00:51, Philip Blundell wrote:
> > > On Sun, 2003-03-16 at 12:11, Luc Pionchon wrote:
> > > > Some more sugestions,
> > > >
> > > > Icons could be selectable, with a different visual aspect
> > > > (darker?) and react to double-click.
> > Blah! Select? Double-click? Waaaah I'm going insane :-S
> > Does anybody even use iconlist-in-appmgr other than me? It's not even
I said '-in-appmgr' :-P
> luccio_at_dsotm$ grep -r 'gpe-iconlist.h' ../* |grep include
> ../gpe-appmgr/main.c:#include <gpe/gpe-iconlist.h>
> ../gpe-appmgr/popupmenu.c:#include <gpe/gpe-iconlist.h>
> ../gpe-bluetooth/main.c:#include <gpe/gpe-iconlist.h>
> ../gpe-bluetooth/dun.c:#include <gpe/gpe-iconlist.h>
> ../gpe-bluetooth/sdp.c:#include <gpe/gpe-iconlist.h>
> ../gpe-filemanager/main.c:#include <gpe/gpe-iconlist.h>
> ../gpe-gallery/main.c:#include <gpe/gpe-iconlist.h>
> ../gpe-mapviewer/main.c:#include <gpe/gpe-iconlist.h>
> ../gpe-sketchbook/src/selector-gui.c:#include "gpe/gpe-iconlist.h"
> ../gpe-sketchbook/src/selector.c:#include "gpe/gpe-iconlist.h"
> ../gpe-sketchbook/src/sketchpad-cb.c:#include "gpe/gpe-iconlist.h"
Wow! That's insanely cool :-S
No wonder people keep whinging about code I wrote broken months ago
(based on the assumption that gpe-fm and gpe-appmgr would be the only
apps using it :)
> :)
:-D
> Well, I am having a look at the layout issues...
>
> First when you invoke _recalc, shouldn't the allocation be taken from the GtkViewport (instead of the GtkScrolledwindow aka iconlist) ? see patch onclosed.
> It seems it fixes the "grow indefinitly problem". But at first, it lays out only one column.
Hmm... Maybe on the first _recalc, the Viewport hasn't picked up its size from the ScrolledWindow? That might be why it's picking up a small size...
> Also, clicking on the right side, where no icon is, will select the next one (!)
>
> Do you have time to investigate on that ?
Uh, maybe. pb might have a better clue whats going on, last time I
looked at the layout code, everything was hard-coded for use on appmgr,
none of this LABEL_MARGIN business ;-)
> or could you give short guidelines on the layout part - I am a bit confused.
> see diagram enclosed.
ta.
/me looks through _expose()
Well, the way I see it (and saw it when writing it, so it may be wrong
;-)
Each "icon" has "space". (*draws box that contains icon, label, and some
padding*)
The 'icon' starts 5px down from the top of the space, but exactly along
the left hand side... no, wait, someone fixed that, it's centered :-S
(normally if the icon is the right size (eg. 48x48) it will end up
centred anyway as that is the column width, but someone removed the
scaling code and made the icon be centred).
OK, so its 5px down and centred (but if it's the right size, it's also
left-aligned and fills the whole row).
Labels:
r1.x=col * il_col_width (il);
r1.y=row * il_row_height (il) + il->_priv->icon_size +
LABEL_YMARGIN;
r1.width = il_col_width (il);
r1.height = label_height;
This is all exactly what you have in your diagram. (Though the r1.height
thing forces only 1 row of text! Which is interesting since the
get_line_count() stuff later assumes up to 2 lines...)
OK now I think I get some of what is confusing ;-)
There is no lower LABEL_YMARGIN. It's just row_height - LABEL_YMARGIN -
5 - label_height - col_width. Yeah I know it's stupid (the col_width is
the size allocated to the 'icon' part, in appmgr it's 48x48). Or at
least I *think* that's right.
If/when iconlist is moved to a GObject-container, the drawing may be
pushed into the individual object's stuff, at which point iconlist is
soley for the overall layout (columns, rows, width/height) and each
'iconlistitem' draws its own bits inside. (Which could theoretically
allow fun stuff with iconlistitem subclasses doing their own specialised
drawing, eg. CPU monitors etc. :-)
Oh hey, BTW, if it's going to be used on largeish layouts, someone tell
me (or fix themselves) so the background image can be tiled horizontally
as well as vertically. ;-)
I hope that helped a little... if you want something more specific, feel
free to ask. If I can't help, just bash me around with your cool stick:
> `·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.´¯`·.¸¸.´
and ask pb :-D
> luc
mibus
PS. CCd to the list incase I got something wrong and pb/etc. can inflict
pain on me and point out the correct answers to you ;-)
-- Robert Mibus <mibus_at_iprimus.com.au> "`Is not a quine' is not a quine" is a quine.Received on Sun Mar 23 2003 - 22:37:35 EST
This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:19:03 EDT