gui differences in 3.9g-7056

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

gui differences in 3.9g-7056

Bakki Kudva
A newbie question.

I have been playing with the new image and noticed that the window
borders are thicker, some window functions like resize in Monticello
browser stretch the buttons at the top. They also have lost the 3-D
look. (I am on Debian Sarge)

Is this a style change which I can restore to 3.8 style? or is it more
structural due to changes in gui code itself.

If it is a style change can some one please tell me how to copy the
style from 3.8 over to 3.9?

I googled for it and came up empty.

-bakki

Reply | Threaded
Open this post in threaded view
|

RE: gui differences in 3.9g-7056

Ramon Leon-5
> A newbie question.
>
> I have been playing with the new image and noticed that the
> window borders are thicker, some window functions like resize
> in Monticello browser stretch the buttons at the top. They
> also have lost the 3-D look. (I am on Debian Sarge)
>
> Is this a style change which I can restore to 3.8 style? or
> is it more structural due to changes in gui code itself.
>
> If it is a style change can some one please tell me how to
> copy the style from 3.8 over to 3.9?
>
> I googled for it and came up empty.
>
> -bakki
>

Apply the following changes for a more sensible look.

SystemWindow class>>borderWidth
        "Making changes to this for some reason requires repositioning of
CornerGripMorphs. Edit BorderedMorph#addCornerGrip and play with offsets to
get them right if you increase border width. For instance, going from 4 to 6
here and you should updated offsets to (-23@-23 corner: 0@0) for the right
placement of corner grips."

        ^ 2

TopRightCornerGripMorph>>gripLayoutFrame
    ^LayoutFrame
        fractions: (1 @ 0 corner: 1 @ 0)
        offsets: (0 - self defaultWidth @ -20 corner: 0 @ 0)

TopLeftGripMorph>>gripLayoutFrame
    ^LayoutFrame
        fractions: (0 @ 0 corner: 0 @ 0)
        offsets: (0 @ -20 corner: self defaultWidth @ 0)


Reply | Threaded
Open this post in threaded view
|

Re: gui differences in 3.9g-7056

Bakki Kudva
On 9/8/06, Ramon Leon <[hidden email]> wrote:
> Apply the following changes for a more sensible look.

Thanks for the morphic lesson.

> TopRightCornerGripMorph>>gripLayoutFrame

Here you mean TopRightGripMorph.

>     ^LayoutFrame
>         fractions: (1 @ 0 corner: 1 @ 0)
>         offsets: (0 - self defaultWidth @ -20 corner: 0 @ 0)
>
> TopLeftGripMorph>>gripLayoutFrame
>     ^LayoutFrame
>         fractions: (0 @ 0 corner: 0 @ 0)
>         offsets: (0 @ -20 corner: self defaultWidth @ 0)
>
The buttons in the system browser don't change size when the window is
resized but the buttons at the top of Monticello browser still do. So
this must  not be happening in the morphic classes but the layout used
in building the browser window in Monticello itself. Monticello uses
Monticello-UI classes which in turn use
ToolBuilder>>pluggableWindowSpec ..etc I kind of got lost in trying to
follow the chain to find where layout methods are.

Where can this be fixed?

THanks,

bakki

Reply | Threaded
Open this post in threaded view
|

RE: gui differences in 3.9g-7056

Ramon Leon-5
> On 9/8/06, Ramon Leon <[hidden email]> wrote:
> > Apply the following changes for a more sensible look.
>
> Thanks for the morphic lesson.

Ha, I know shit about morphic, that was found with lot's of trial and error.

> > TopRightCornerGripMorph>>gripLayoutFrame
>
> Here you mean TopRightGripMorph.
>
> >     ^LayoutFrame
> >         fractions: (1 @ 0 corner: 1 @ 0)
> >         offsets: (0 - self defaultWidth @ -20 corner: 0 @ 0)
> >
> > TopLeftGripMorph>>gripLayoutFrame
> >     ^LayoutFrame
> >         fractions: (0 @ 0 corner: 0 @ 0)
> >         offsets: (0 @ -20 corner: self defaultWidth @ 0)
> >
> The buttons in the system browser don't change size when the
> window is resized but the buttons at the top of Monticello
> browser still do. So this must  not be happening in the
> morphic classes but the layout used in building the browser
> window in Monticello itself. Monticello uses Monticello-UI
> classes which in turn use
> ToolBuilder>>pluggableWindowSpec ..etc I kind of got lost in trying to
> follow the chain to find where layout methods are.
>
> Where can this be fixed?

Haven't a clue, but I'd ask John Pierce, the dude that did the
LookEnhancements package, 3.9's new look, bet he could fix it in a few
minutes.

>
> THanks,
>
> bakki
>


Reply | Threaded
Open this post in threaded view
|

Re: gui differences in 3.9g-7056

Bert Freudenberg
In reply to this post by Bakki Kudva
Bakki Kudva schrieb:

> The buttons in the system browser don't change size when the window is
> resized but the buttons at the top of Monticello browser still do. So
> this must  not be happening in the morphic classes but the layout used
> in building the browser window in Monticello itself. Monticello uses
> Monticello-UI classes which in turn use
> ToolBuilder>>pluggableWindowSpec ..etc I kind of got lost in trying to
> follow the chain to find where layout methods are.
>
> Where can this be fixed?

You would have to fix, or maybe even extend, ToolBuilder itself. I think
currently its layout does not support fixed sizes for selected components.

- Bert -

Reply | Threaded
Open this post in threaded view
|

Re: gui differences in 3.9g-7056

Bakki Kudva
On 9/8/06, Bert Freudenberg <[hidden email]> wrote:
> You would have to fix, or maybe even extend, ToolBuilder itself. I think
> currently its layout does not support fixed sizes for selected components.
>
> - Bert -

It works fine in the 3.8 image. What would cause it to behave
differently under 3.9?

I think the ToolBuilder layout code is in:
MorphicToolBuilder>>setLayout: layout in: widget
        layout == #proportional ifTrue:[
                widget layoutPolicy: ProportionalLayout new.
                ^self].
        layout == #horizontal ifTrue:[
                widget layoutPolicy: TableLayout new.
                widget listDirection: #leftToRight.
                widget submorphsDo:[:m| m hResizing: #spaceFill; vResizing: #spaceFill].
                "and then some..."
                ^self].
        layout == #vertical ifTrue:[
                widget layoutPolicy: TableLayout new.
                widget listDirection: #topToBottom.
                widget submorphsDo:[:m| m hResizing: #spaceFill; vResizing: #spaceFill].
                "and then some..."
                ^self].
        ^self error: 'Unknown layout: ', layout.

Not sure where Monticello sets the layout policy. It appears to me
that the policy used is proportional which is why the buttons stretch.
If someone who knows this stuff can explain this better I'd really
appreciate it. Thanks,

bakki

Reply | Threaded
Open this post in threaded view
|

RE: gui differences in 3.9g-7056

Gary Chambers
Try these:

In MCTool

buildWith: builder
        |  windowBuilder |

        windowBuilder := MCToolWindowBuilder builder: builder tool: self.
        self widgetSpecs do:
                [:spec | | send fractions offsets |
                send := spec first.
                fractions := spec at: 2 ifAbsent: [#(0 0 1 1)].
                offsets := spec at: 3 ifAbsent: [#(0 0 0 0)].
                windowBuilder frame: (LayoutFrame
                        fractions: (fractions first @ fractions second corner: fractions third @
fractions fourth)
                        offsets: (offsets first @ offsets second corner: offsets third @ offsets
fourth)).
                windowBuilder perform: send first withArguments: send allButFirst].

        ^ windowBuilder build

In MorphicToolBuilder

setFrame: aRectangle in: widget
        | frame |
        aRectangle ifNil:[^nil].
        frame := aRectangle isRectangle
                ifTrue: [self asFrame: aRectangle]
                ifFalse: [aRectangle].
        widget layoutFrame: frame.
        widget hResizing: #spaceFill; vResizing: #spaceFill.
        (parent isSystemWindow) ifTrue:[
                widget borderWidth: 2; borderColor: #inset.
        ].

Of course, there are some other fixes that are useful with respect to pane
splitters. Too many to show here.
These changes are part of a raft of look enhancements and, if there is
interest, could be made available to the community!

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Bakki
> Kudva
> Sent: 08 September 2006 7:52 PM
> To: The general-purpose Squeak developers list
> Subject: Re: gui differences in 3.9g-7056
>
>
> On 9/8/06, Bert Freudenberg <[hidden email]> wrote:
> > You would have to fix, or maybe even extend, ToolBuilder itself. I think
> > currently its layout does not support fixed sizes for selected
> components.
> >
> > - Bert -
>
> It works fine in the 3.8 image. What would cause it to behave
> differently under 3.9?
>
> I think the ToolBuilder layout code is in:
> MorphicToolBuilder>>setLayout: layout in: widget
> layout == #proportional ifTrue:[
> widget layoutPolicy: ProportionalLayout new.
> ^self].
> layout == #horizontal ifTrue:[
> widget layoutPolicy: TableLayout new.
> widget listDirection: #leftToRight.
> widget submorphsDo:[:m| m hResizing: #spaceFill;
> vResizing: #spaceFill].
> "and then some..."
> ^self].
> layout == #vertical ifTrue:[
> widget layoutPolicy: TableLayout new.
> widget listDirection: #topToBottom.
> widget submorphsDo:[:m| m hResizing: #spaceFill;
> vResizing: #spaceFill].
> "and then some..."
> ^self].
> ^self error: 'Unknown layout: ', layout.
>
> Not sure where Monticello sets the layout policy. It appears to me
> that the policy used is proportional which is why the buttons stretch.
> If someone who knows this stuff can explain this better I'd really
> appreciate it. Thanks,
>
> bakki
>