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

Re: [sc-dev] FlowView vertical margin is 0?



On Mon, Dec 8, 2008 at 9:32 AM, jostM <sc3@xxxxxxxx> wrote:
> Well FlowView is part of CrucialLib, and I think that the new look  of all
> the automatic gui stuff depends an that setting. not sure though (can't test
> it now) . I had some trouble with the margin at first too, but felix really
> did a fantastic remake of his gui, so ....

Yes, I agree, the new gui code on his side is cleaner and a lot more
robust. I'm raising only a minor, minor cosmetic point.

It's easier to see if the FlowView has a background color. To me it
looks a little off to have the views crammed right up against the top,
e.g.

w = GUI.window.new("Demo", Rect(10, 50, 200, 160)).front;
w.view.decorator = FlowLayout(w.view.bounds);

GUI.staticText.new(w, Rect(0, 0, 190, 50)).string_("spacer").align_(\center);

f = FlowView(w, Rect(0, 0, 190, 100)).background_(Color.gray);
GUI.button.new(f, Rect(0, 0, 100, 20))
	.states_([["OK"]]);


// vs. with a vertical margin, looks cleaner to me

w = GUI.window.new("Demo", Rect(10, 50, 200, 160)).front;
w.view.decorator = FlowLayout(w.view.bounds);

GUI.staticText.new(w, Rect(0, 0, 190, 50)).string_("spacer").align_(\center);

f = FlowView(w, Rect(0, 0, 190, 100), margin: 2@2).background_(Color.gray);
GUI.button.new(f, Rect(0, 0, 100, 20))
	.states_([["OK"]]);


I could just go thru every use of FlowView in my lib and explicitly
state the margin. But I tend to think the default behavior should be
aesthetically pleasing / what users would expect.

hjh


-- 
James Harkins /// dewdrop world
jamshark70@xxxxxxxxxxxxxxxxx
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/