r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3 GUI]

Cyphre
26-Jan-2011
[5608]
also another possibility is to change also the max-size if user forces 
to change the size using the inline pair!
Ladislav
26-Jan-2011
[5609]
BTW, if you don't want to have any Max-size limit, you can just tell 
something like:

    max-size: 2147483647x2147483647

, which is exactly as good as "no limit"
Pekr
26-Jan-2011
[5610]
facets: [
		init-size: 130x24
		max-size: 230x24
		min-size: 80x24
		....
	]


In above code, I thought, that we could allow setting of init-size, 
which would readjust the max-size .....
Cyphre
26-Jan-2011
[5611]
that's what I meant
BrianH
26-Jan-2011
[5612]
Does a style have to have a max-size? I am worried about scaling 
to large screens. I remember that was a weakness of Carl's GUI. I 
know you guys changed the resizing algorithm, but I didn't catch 
what the new algorithm was.
Ladislav
26-Jan-2011
[5613]
No mind reading, if you want to change the Max-size, you need to 
know, what do *you* want it to be.
Pekr
26-Jan-2011
[5614]
aha, clear, hmm ....
BrianH
26-Jan-2011
[5615]
Are faces still scaled proportionally relative to their max-size?
Cyphre
26-Jan-2011
[5616x2]
by default every style has the max-size set to the 2147483647x2147483647 
value so I think that is enough
by default = unless it is not redefined in the style definiton
Ladislav
26-Jan-2011
[5618x2]
Brian: re the "does a style have to have a max-size?" - see my above 
note, how to arrange a Max-size as good as "no limit"
Re: "Are faces still scaled proportionally relative to their max-size?" 
- not at all
Rebolek
26-Jan-2011
[5620]
Cyphre - without init-size in the options definition you won't be 
able to set the size like: button XxY

You cannot do that right now, so what's the point.
Pekr
26-Jan-2011
[5621]
the trouble is, that the max-size for a button is lower, than what 
user might want as an init-size? The "fix" is to allow much larger 
buttons, no? Why does henrik want to prevent that?
BrianH
26-Jan-2011
[5622]
I got that (was typing while you posted that). Second question: good, 
I didn't like that about Carl's GUI.
Cyphre
26-Jan-2011
[5623]
Rebolek, my point was we should change the button init code so it 
changes max-size if user specifies the inline pair!
BrianH
26-Jan-2011
[5624]
(Those were in reply to Ladislav)
Rebolek
26-Jan-2011
[5625]
Cyphre yes, that's what I'm suggesting from beginning, but it requires 
Ladislav's death ;)
Cyphre
26-Jan-2011
[5626]
Are faces still scaled proportionally relative to their max-size?

 - no ,this was too confusing in the Carls version...max-size is just 
 simple limit no magic here.
Ladislav
26-Jan-2011
[5627]
we should change the button init code so it changes max-size if user 
specifies the inline pair!

 - I am against that change, you don't know (not being able to read 
 mind) what is the Max-size user wants to have anyway
Rebolek
26-Jan-2011
[5628]
it's the size user specified in layout dialect
BrianH
26-Jan-2011
[5629]
Can you specify more than one pair inline? Don't know the current 
dialect processing code.
Cyphre
26-Jan-2011
[5630]
yes, you can
Ladislav
26-Jan-2011
[5631]
it's the size user specified in layout dialect

 - if the user specifies Max-size, then I do agree, if not, then there 
 is no reason why to "read his mind"
BrianH
26-Jan-2011
[5632x2]
init-size min-size max-size?
Whatever order you feel is appropriate.
Rebolek
26-Jan-2011
[5634]
Here are my two proposals:


1) [button "text" 100x100] is equivalent of [button "text" [min-size: 
100x100 init-size: 100x100 max-size: 100x100]


2) [button "text" 100x100] is error, because size cannot be specified 
in dialect.
Cyphre
26-Jan-2011
[5635]
I think it is still better to specify it either using stylize or 
button options [...]
Rebolek
26-Jan-2011
[5636]
But current behaviour, where you can write [button "text" 100x100] 
and button hapilly ignores that value is unacceptable IMO.
Pekr
26-Jan-2011
[5637]
options: [
		text-body: [string! block!]
		area-color: [tuple!]
		init-size: [pair!]
		wide: [percent!]
	] 


you may specifiy only one pair for a button - init-size, inlined, 
that is ...
BrianH
26-Jan-2011
[5638]
Same here, but I am trying to make it easier for Pekr. Or at least 
what he thinks is easier.
Cyphre
26-Jan-2011
[5639]
So my proposal is:
remove init-size [pair!] from Options

add [init-width [number!]] and use it for changing the init-size/x 
value only
Rebolek
26-Jan-2011
[5640x2]
That's same problem as now.
[button "wiiideeee" 10000] won't make 10000px wide button.
Cyphre
26-Jan-2011
[5642]
so what
Rebolek
26-Jan-2011
[5643]
so what's it good for?
Pekr
26-Jan-2011
[5644x2]
its useless, confusing, bad :-)
having such non logical behaviour, then better remove the option 
altogether. Cyphre's proposal is an interim solution, sitll bettter 
than having it the way it is now ...
BrianH
26-Jan-2011
[5646]
Can't init-size when specified (especially inline) push out max-size 
in both dimensions if it's larger?
Pekr
26-Jan-2011
[5647]
Brianh - that was EXACTLY my idea, and it contradicts nothing ...
Cyphre
26-Jan-2011
[5648]
From my POV either you accept there was some intention of the style-maker 
to define limits or you have to make own derived style.
Rebolek
26-Jan-2011
[5649]
Cyphre, so your POV changed from 11:48 where you proposed that init 
code for button should set max-size if user sets size in dialect?
BrianH
26-Jan-2011
[5650]
That approach would make sense if there was a good reason for the 
limit, like a larger limit would screw up the draw blocks or something. 
Cyphre, is that the case with the button style?
Cyphre
26-Jan-2011
[5651]
No, also it is on the style-maker to define what should be done with 
the inline pair! so it depends always on the style implementation 
and not as generic rule.
Rebolek
26-Jan-2011
[5652]
Yes, but we are not talking about some generic rule, but about button.
BrianH
26-Jan-2011
[5653]
Right. So it looks like Pekr wants to be a style maker, but for some 
reason is doing it in the layout block instead of with stylize (or 
whatever it's called)?
Cyphre
26-Jan-2011
[5654x2]
The thing is if we implement it for button then Pekr will be shouting 
why it won't work for field etc. ? ;)
Brian, yes, that's my understanding as well.
Pekr
26-Jan-2011
[5656]
I want simple things to be simple, yet complex things being possible 
...
BrianH
26-Jan-2011
[5657]
So this gets back to a "Render unto Ceaser that which is Ceaser's. 
Render unto God that which is God's." argument, even if both are 
Pekr :)